WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
130163
"Lucida Grande" is hardcoded in RenderTextControlSingleLine.cpp
https://bugs.webkit.org/show_bug.cgi?id=130163
Summary
"Lucida Grande" is hardcoded in RenderTextControlSingleLine.cpp
Myles C. Maxfield
Reported
2014-03-12 16:08:19 PDT
Not all platforms use this default font, and there should be one source of truth for what the default font is.
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2023-07-02 16:13:13 PDT
We still have this:
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderTextControlSingleLine.cpp#337
& #if !PLATFORM(IOS_FAMILY) // Since Lucida Grande is the default font, we want this to match the width // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and // IE for some encodings (in IE, the default font is encoding specific). // 901 is the avgCharWidth value in the OS/2 table for MS Shell Dlg. if (style().fontCascade().firstFamily() == "Lucida Grande"_s) return scaleEmToUnits(901); #endif _______
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderTextControlSingleLine.cpp#360
#if !PLATFORM(IOS_FAMILY) const AtomString& family = style().fontCascade().firstFamily(); // Since Lucida Grande is the default font, we want this to match the width // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and // IE for some encodings (in IE, the default font is encoding specific). // 4027 is the (xMax - xMin) value in the "head" font table for MS Shell Dlg. if (family == "Lucida Grande"_s) maxCharWidth = scaleEmToUnits(4027); else if (style().fontCascade().hasValidAverageCharWidth()) maxCharWidth = roundf(style().fontCascade().primaryFont().maxCharWidth()); #endif _______
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug