Bug 17070 - CSS: Request for proprietary extension to generic font families 2: 'blackletter'
Summary: CSS: Request for proprietary extension to generic font families 2: 'blackletter'
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Enhancement
Assignee: Nicholas Shanks
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-29 13:39 PST by Nicholas Shanks
Modified: 2022-07-16 19:50 PDT (History)
6 users (show)

See Also:


Attachments
Patch, for comments only (20.79 KB, patch)
2011-09-26 15:33 PDT, Nicholas Shanks
no flags Details | Formatted Diff | Diff
Patch with heuristics (29.59 KB, patch)
2011-10-05 16:46 PDT, Nicholas Shanks
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Shanks 2008-01-29 13:39:26 PST
I would like to have a generic font family called 'blackletter', which would include Fraktur, Old English and similar kinds of fonts. This is a large section of typography that the CSS sepcs neglect. and 'Fantasy' doesn't cut it, since that is usually Apple Chancery, Papyrus, Comic Sans or something along those lines, nothing like a blackletter face.
Comment 1 Nicholas Shanks 2011-09-26 15:33:27 PDT
Created attachment 108734 [details]
Patch, for comments only

I have based this on the code committed in r91777 for bug 65197. Tests and ChangeLogs not provided as I do not intend this diff for commit. Please provide feedback.

I have chosen Lucida Blackletter as the default font for Windows, and hesitantly, Blackmoor LET as the font for Mac OS X (it shipped with several versions of AppleWorks).

To reiterate, the goal is to provide a "blackletter" generic font family, because whilst many systems have a blackletter font installed, there has been no ubiquitous typeface on Mac or Windows that web authors can rely on, such as Times New Roman or Helvetica. The generic families are supposed to cater for exactly this situation.
Comment 2 WebKit Review Bot 2011-09-26 15:38:11 PDT
Attachment 108734 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/WebCore.exp.in', u'Source/W..." exit_code: 1

Source/WebKit/win/WebPreferences.cpp:655:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.cpp:662:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit2/UIProcess/API/C/WKPreferences.h:112:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebKit/win/WebPreferences.h:94:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.h:97:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.h:98:  The parameter name "family" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Nicholas Shanks 2011-09-26 16:38:20 PDT
The tab was Xcode trying to be 'helpful'. The other five style issues are in keeping with the code in those particular files.
Comment 4 Darin Adler 2011-09-27 10:22:54 PDT
(In reply to comment #1)
> Blackmoor LET as the font for Mac OS X

This is a font most OS X users won’t have. Hardcoding it into WebKit seems like a bad idea.
Comment 5 Nicholas Shanks 2011-09-28 03:21:31 PDT
Yeah, since Mac OS X ships with no blackletter font at all, any specific face named is likely to be installed on only a minority of systems.

I looked at http://www.codestyle.org/css/font-family/sampler-MacResultsFull.shtml but found no blackletter font listed at all. The only blackletter font I saw on the Windows page, http://www.codestyle.org/css/font-family/sampler-WindowsResultsFull.shtml was an engraved face (like Academy Engraved) which I didn't feel was suitable.

Another option I considered, which would make the patch considerably more complex, would be to do a runtime search for any font with a PostScript, QuickDraw or OpenType name field containing a substring or pattern match for values like these: {"blackletter","old english","cloister black","rotunda","fraktur","schwabach","gotisch","textualis",/textura?\b/,/deutsche.*schrift/,/schrift.*deutsche/}

The inclusion of old english and cloister black in that list is due to the large number of blackletter typefaces that include those words in their names—Letraset, Bitstream, URW and Ascender all have faces with Old English in their names. (oddly, alt deutsch is not common)

I could not simple include schrift as a substring as that was catching too many false positives (according to searches I performed at myfonts.com)

My inspiration page is http://web.nickshanks.com/languages/english/eneydos which up until today used the following CSS: font-family: "Cloister Black", "Cloister Black BT", "Cloister Black CT", "Old English", "Old English Text", "Old English Text MT", "Engravers' Old English", "Engravers Old English", "Collins Old English", "London Text", "Goudy Text", "Goudy Text Oldstyle", "Goudy Text CT", "Lucida Blackletter", "Linotext", "Fette Gotisch", "London", blackletter;
Comment 6 Nicholas Shanks 2011-09-28 04:01:11 PDT
I've just spotted "Old English Text MT" in the codestyle Windows results at nearly 60% penetration. I don't have the Monotype version, so missed it as it was just listed in my -webkit-body font (Helvetica Neue). This seems like a good default for both platforms.
Comment 7 Nicholas Shanks 2011-09-28 04:24:35 PDT
A little more research, Old English Text MT is supplied with Microsoft Office (which I don't have) amongst other things, probably just their Windows versions: http://www.microsoft.com/typography/fonts/font.aspx?FMID=1010 and apparently doesn't have a "mysterious disease" http://www.microsoft.com/typography/fonts/family.aspx?FID=127 :-)
Comment 8 Darin Adler 2011-09-28 09:37:13 PDT
If we’re not taking advantage of fonts already on people’s computers, then I don’t see the point of this feature.
Comment 9 Nicholas Shanks 2011-10-05 16:46:15 PDT
Created attachment 109880 [details]
Patch with heuristics

Okay, I'll take that as a cue that the patch should include the more complicated font sniffing I had wanted to do. I have added a platform-specific default preferences override system, currently only implemented for Mac and WTF::String preferences. I do not know enough about other platforms' APIs to port the font iteration code.
Comment 10 WebKit Review Bot 2011-10-05 16:50:08 PDT
Attachment 109880 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/WebCore.exp.in', u'Source/W..." exit_code: 1

Source/WebKit/win/WebPreferences.cpp:655:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.cpp:662:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.h:94:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.h:97:  Extra space after ( in function call  [whitespace/parens] [4]
Source/WebKit/win/WebPreferences.h:98:  The parameter name "family" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 5 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Nicholas Shanks 2011-10-06 09:56:39 PDT
Also, I know it leaks a HashMap. I am still re-reading http://www.webkit.org/coding/RefPtr.html to work out what I'm supposed to do.
Comment 12 Ryosuke Niwa 2011-10-08 00:18:54 PDT
Comment on attachment 109880 [details]
Patch with heuristics

r- because it's missing change logs and tests.
Comment 13 Brent Fulgham 2022-07-11 16:11:04 PDT
This idea should be discussed with the relevant CSS working groups.
Comment 14 Myles C. Maxfield 2022-07-16 19:50:53 PDT
Right, Brent is right. The correct place to request this feature is at https://github.com/w3c/csswg-drafts/issues/new