Closed Bug 90440 Opened 23 years ago Closed 7 years ago

we should remove "font.size.unit" in nsPresContext.cpp, or fix other code that uses "font.size.*" to use it

Categories

(Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Future
Tracking Status
firefox59 --- fixed

People

(Reporter: sspitzer, Assigned: n.nethercote)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

we should remove "font.size.unit" in nsPresContext.cpp, or fix other code that
uses "font.size." to use it

that pref is to allow users to say their fonts are in pixels (px) or points (pt)

there's a whole bunch of other font code that looks like it is assuming fonts
are in pixels.

if a user set "font.size.unit", all that other code would break.

sorry asa, I wanted to assign this to erik, but he's gone.
Blocks: 89842
->layout 
Assignee: asa → karnaze
Component: Browser-General → Layout
QA Contact: doronr → petersen
->i18n
Assignee: karnaze → nhotta
Component: Layout → Internationalization
QA Contact: petersen → andreasb
Reassign to yokoyama, cc to shanjian, ftang.
Assignee: nhotta → yokoyama
Status: NEW → ASSIGNED
Target Milestone: --- → Future
I suggest to combine the value and the unit as in CSS, i.e., prefs values can
now be specified as font.size = '10px'. This is easy to remember and less
error-prone now that the CSS syntax is getting entrenched in people's habits.

Then the nsPresContext.cpp code can be changed to RFind() 'px' or 'pt' (this is
the only place to do so, hence less invasive). And to remind people to
explicitly set the unit, an assertion could be fired when a value without unit
is found, but a value without unit would be assumed to be in pixel.

How does this sound. I am in the midst of font changes (bug 74186 and friends)
and can easily incorpoprate this in my changes.
ftang, shanjian: can you comment on rbs's?
Sounds good to me, if we have to continue supporting 'pt' at all. :-)
Changing QA contact to bobj for now. Bob, please re-assign further as you see is
appropriate.
QA Contact: andreasb → bobj
QA Contact: bobj → i18n
Attached patch Remove the font.size.unit pref (deleted) — Splinter Review
The default value is 'px'. The alternative value is 'pt', but it's not clear
that changing it to 'pt' will actually work sensibly.

It was first suggested that this pref be removed 17 years ago, and it doesn't
appear to have become more useful since then. It's not set anywhere. Let's
remove it.
Attachment #8928734 - Flags: review?(dbaron)
Assignee: tetsuroy → n.nethercote
Blocks: 1188411
Attachment #8928734 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/mozilla-central/rev/6fafc2b0045e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
No longer blocks: 1188411
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: