Edgewall Software
Modify

Opened 13 years ago

Closed 11 years ago

#3575 closed defect (duplicate)

Can Trac style sheets use pt font-size rather than px?

Reported by: andrewm@… 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:

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 Christopher Lenz, 13 years ago

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.

comment:2 by andrejk, 13 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 anonymous, 13 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 anonymous, 13 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 Martin.vGagern@…, 13 years ago

Cc: Martin.vGagern@… 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:6 by Christian Boos, 12 years ago

Keywords: layout font added
Milestone: 1.0

Worth considering.

comment:7 by Christian Boos, 11 years ago

Milestone: 1.0
Resolution: duplicate
Status: newclosed

Closing as duplicate of #633.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.