Opened 18 years ago
Closed 16 years ago
#3575 closed defect (duplicate)
Can Trac style sheets use pt font-size rather than px?
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | none |
Severity: | normal | Keywords: | layout font |
Cc: | Martin.vGagern@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Can you consider using pt-based font-sizes in future versions of Trac, rather than px? My display is 120dpi, and 10px equates to about 2mm.
Attachments (0)
Change History (7)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
In the book Bulletproof Web Design Dan Cederholm suggests using font-size:small for the body tag, and using percentages for all other fonts. This ensures that texts can be resized by all browsers (MSIE has problems resizing px sized fonts).
comment:3 by , 18 years ago
I'm using Firefox and Opera under Linux. Both can use the system DPI, although I admit this isn't the default.
With reference to the link you posted, neither browser I mentioned scales "px".
I think most web designers use px because it lets them relate text size to images, so any browser that scales px would also need to scale images (which opera does when you "zoom").
I think it's likely that with screen resolutions increasing, support for device independent font sizes will only improve.
comment:4 by , 18 years ago
I've had a bit of a play with the various ways of specifying font-size in the web apps I maintain: medium vs pt vs px vs %. In the limitted range of browsers I use (IE, Opera and Firefox), pt gave the most consistent result, but I chose to implement a "font size" user preference as well (with font-sizes within the app specified with % relative to body).
comment:5 by , 18 years ago
Cc: | added |
---|
I too had real problems reading those fonts at 111dpi using Firefox on Linux. Worst was the browser view, I overrode that with two settings:
table.code tbody tr td { font-size: 11pt; } table.code th { font-size: 9pt; }
Generally using purely percentage based font sizes might be the best choice for most text areas, as it not only takes the screen resolution into account (where supported), but also the user configured default font size. So a disabled person might choose a bigger font and read stuff at this size.
Pixel based font sizes really only make sense where the interplay between different components, especially bitmaps, is important. So maybe that's the menu bar or areas like that' you'd have to try. But the less pixel based font sizes, the better. Theoretically you can even specify image sizes in CSS using pt. Don't know about backgrounds, though.
comment:7 by , 16 years ago
Milestone: | 1.0 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Closing as duplicate of #633.
Which OS and browser are you using where that change would actually help? http://webkit.opendarwin.org/blog/?p=57 points out that browsers commonly don't care about physical DPI.