Changeset 190848 in webkit


Ignore:
Timestamp:
Oct 11, 2015 1:23:26 PM (9 years ago)
Author:
mmaxfield@apple.com
Message:

Test font-variant-* and font-feature-settings with mocked preinstalled fonts
https://bugs.webkit.org/show_bug.cgi?id=149777

Reviewed by Simon Fraser.

Tools:

Include FontWithFeatures in DumpRenderTree and WebKitTestRunner. Add it
to the list of tests to preinstall at startup time.

Also, update the generation of the 'name' table in the FontWithFeatures font.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet):
(activateTestingFonts):
(activateFontsIOS):

  • FontWithFeatures/FontWithFeatures/FontCreator.cpp:

(Generator::generate):
(Generator::appendCFFTable):
(Generator::appendNameSubtable):
(Generator::appendNAMETable):

  • FontWithFeatures/FontWithFeatures/main.cpp:

(main):

  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:

(WTR::allowedFontFamilySet):
(WTR::activateFonts):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet):

LayoutTests:

See per-file comments.

  • css3/font-feature-settings-preinstalled-fonts.html: Removed. Superseded by

css3/font-feature-settings-rendering.html.

  • css3/font-feature-settings-rendering-2-expected.html: Removed.
  • css3/font-feature-settings-rendering-2.html: Removed. Renamed to

css3/font-feature-settings-rendering.html

  • css3/font-feature-settings-rendering-expected.html: Added.
  • css3/font-feature-settings-rendering.html:
  • css3/font-variant-all-expected.html:
  • css3/font-variant-all.html:
  • css3/resources/FontWithFeatures.otf: Update for new 'name' table.
  • css3/resources/FontWithFeatures.ttf: Ditto.
Location:
trunk
Files:
3 added
15 deleted
16 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190847 r190848  
     12015-10-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Test font-variant-* and font-feature-settings with mocked preinstalled fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=149777
     5
     6        Reviewed by Simon Fraser.
     7
     8        See per-file comments.
     9
     10        * css3/font-feature-settings-preinstalled-fonts.html: Removed. Superseded by
     11        css3/font-feature-settings-rendering.html.
     12        * css3/font-feature-settings-rendering-2-expected.html: Removed.
     13        * css3/font-feature-settings-rendering-2.html: Removed. Renamed to
     14        css3/font-feature-settings-rendering.html
     15        * css3/font-feature-settings-rendering-expected.html: Added.
     16        * css3/font-feature-settings-rendering.html:
     17        * css3/font-variant-all-expected.html:
     18        * css3/font-variant-all.html:
     19        * css3/resources/FontWithFeatures.otf: Update for new 'name' table.
     20        * css3/resources/FontWithFeatures.ttf: Ditto.
     21
    1222015-10-11  Yusuke Suzuki  <utatane.tea@gmail.com>
    223
  • trunk/LayoutTests/css3/font-feature-settings-rendering.html

    r190564 r190848  
     1<!DOCTYPE html>
     2<html>
    13<head>
    24<style>
    35@font-face {
    4     /* FeatureTest.ttf is a small font for testing OpenType features.
    5      * It contains:
    6      * - The black box glyph which is associated with 'W', 'e', 'b', 'K', 'i' and 't'.
    7      * - A discretionary ligature glyph of 'WebKit'.
    8      */
    9     font-family: 'test';
    10     src: url(resources/FeatureTest.ttf);
     6    font-family: "FontFeaturesTestOTF";
     7    src: url("resources/FontWithFeatures.otf") format("opentype");
    118}
    12 .dligOn {
    13     font-family: 'test';
    14     font-feature-settings: 'dlig';
    15 }
    16 .dligOff {
    17     font-family: 'test';
    18     font-feature-settings: 'dlig' 0;
    19 }
    20 .dligNone {
    21     font-family: 'test';
     9@font-face {
     10    font-family: "FontFeaturesTestTTF";
     11    src: url("resources/FontWithFeatures.ttf") format("truetype");
    2212}
    2313</style>
     14</head>
     15<body>
     16This tests that font features are able to be turned on and off as desired. It uses a special font
     17designed specifically for this purpose. The test passes if you see a sequence of alternating check
     18marks and X below.
     19<div id="insertionPoint"></div>
     20<div id="insertionPoint2"></div>
     21<div id="insertionPoint3"></div>
     22<div id="insertionPoint4"></div>
    2423<script>
    25 if (window.testRunner)
    26     window.testRunner.waitUntilDone();
     24var insertionPoint = document.getElementById("insertionPoint");
     25var insertionPoint2 = document.getElementById("insertionPoint2");
     26var insertionPoint3 = document.getElementById("insertionPoint3");
     27var insertionPoint4 = document.getElementById("insertionPoint4");
     28function addElement(placeToInsert, familyName, feature, c) {
     29    ["0", "1"].map(function(state) {
     30        var element = document.createElement("span");
     31        element.textContent = c;
     32        element.style.fontFamily = familyName;
     33        element.style.fontFeatureSettings = '"' + feature + '" ' + state;
     34        placeToInsert.appendChild(element);
     35    });
     36    placeToInsert.appendChild(document.createTextNode(" "));
     37}
    2738
    28 function test() {
    29     document.body.offsetTop;
    30     if (window.testRunner)
    31         testRunner.notifyDone();
    32 }
     39addElement(insertionPoint, "FontFeaturesTestOTF", "liga", "C");
     40addElement(insertionPoint, "FontFeaturesTestOTF", "clig", "D");
     41addElement(insertionPoint, "FontFeaturesTestOTF", "dlig", "E");
     42addElement(insertionPoint, "FontFeaturesTestOTF", "hlig", "F");
     43addElement(insertionPoint, "FontFeaturesTestOTF", "calt", "G");
     44addElement(insertionPoint, "FontFeaturesTestOTF", "subs", "H");
     45addElement(insertionPoint, "FontFeaturesTestOTF", "sups", "I");
     46addElement(insertionPoint, "FontFeaturesTestOTF", "smcp", "J");
     47addElement(insertionPoint, "FontFeaturesTestOTF", "c2sc", "K");
     48addElement(insertionPoint, "FontFeaturesTestOTF", "pcap", "L");
     49addElement(insertionPoint, "FontFeaturesTestOTF", "c2pc", "M");
     50addElement(insertionPoint, "FontFeaturesTestOTF", "unic", "N");
     51addElement(insertionPoint, "FontFeaturesTestOTF", "titl", "O");
     52addElement(insertionPoint, "FontFeaturesTestOTF", "lnum", "P");
     53addElement(insertionPoint, "FontFeaturesTestOTF", "onum", "Q");
     54addElement(insertionPoint, "FontFeaturesTestOTF", "pnum", "R");
     55addElement(insertionPoint, "FontFeaturesTestOTF", "tnum", "S");
     56addElement(insertionPoint, "FontFeaturesTestOTF", "frac", "T");
     57//addElement(insertionPoint, "FontFeaturesTestOTF", "afrc", "U");
     58addElement(insertionPoint, "FontFeaturesTestOTF", "ordn", "V");
     59addElement(insertionPoint, "FontFeaturesTestOTF", "zero", "W");
     60addElement(insertionPoint, "FontFeaturesTestOTF", "hist", "X");
     61addElement(insertionPoint, "FontFeaturesTestOTF", "jp78", "Y");
     62addElement(insertionPoint, "FontFeaturesTestOTF", "jp83", "Z");
     63addElement(insertionPoint, "FontFeaturesTestOTF", "jp90", "a");
     64addElement(insertionPoint, "FontFeaturesTestOTF", "jp04", "b");
     65addElement(insertionPoint, "FontFeaturesTestOTF", "smpl", "c");
     66addElement(insertionPoint, "FontFeaturesTestOTF", "trad", "d");
     67addElement(insertionPoint, "FontFeaturesTestOTF", "fwid", "e");
     68addElement(insertionPoint, "FontFeaturesTestOTF", "pwid", "f");
     69addElement(insertionPoint, "FontFeaturesTestOTF", "ruby", "g");
     70
     71addElement(insertionPoint2, "FontFeaturesTestTTF", "liga", "C");
     72addElement(insertionPoint2, "FontFeaturesTestTTF", "liga", "D");
     73addElement(insertionPoint2, "FontFeaturesTestTTF", "clig", "C");
     74addElement(insertionPoint2, "FontFeaturesTestTTF", "clig", "D");
     75addElement(insertionPoint2, "FontFeaturesTestTTF", "dlig", "G");
     76addElement(insertionPoint2, "FontFeaturesTestTTF", "hlig", "I");
     77addElement(insertionPoint2, "FontFeaturesTestTTF", "calt", "L");
     78addElement(insertionPoint2, "FontFeaturesTestTTF", "subs", "O");
     79addElement(insertionPoint2, "FontFeaturesTestTTF", "sups", "P");
     80addElement(insertionPoint2, "FontFeaturesTestTTF", "smcp", "S");
     81addElement(insertionPoint2, "FontFeaturesTestTTF", "c2sc", "V");
     82addElement(insertionPoint2, "FontFeaturesTestTTF", "pcap", "T");
     83addElement(insertionPoint2, "FontFeaturesTestTTF", "c2pc", "W");
     84addElement(insertionPoint2, "FontFeaturesTestTTF", "unic", "Y");
     85addElement(insertionPoint2, "FontFeaturesTestTTF", "titl", "a");
     86addElement(insertionPoint2, "FontFeaturesTestTTF", "lnum", "c");
     87addElement(insertionPoint2, "FontFeaturesTestTTF", "onum", "d");
     88addElement(insertionPoint2, "FontFeaturesTestTTF", "pnum", "f");
     89addElement(insertionPoint2, "FontFeaturesTestTTF", "tnum", "g");
     90addElement(insertionPoint2, "FontFeaturesTestTTF", "frac", "i");
     91addElement(insertionPoint2, "FontFeaturesTestTTF", "afrc", "j");
     92addElement(insertionPoint2, "FontFeaturesTestTTF", "ordn", "Q");
     93addElement(insertionPoint2, "FontFeaturesTestTTF", "zero", "k");
     94addElement(insertionPoint2, "FontFeaturesTestTTF", "hist", "K");
     95addElement(insertionPoint2, "FontFeaturesTestTTF", "jp78", "m");
     96addElement(insertionPoint2, "FontFeaturesTestTTF", "jp83", "n");
     97addElement(insertionPoint2, "FontFeaturesTestTTF", "jp90", "o");
     98addElement(insertionPoint2, "FontFeaturesTestTTF", "jp04", "p");
     99addElement(insertionPoint2, "FontFeaturesTestTTF", "smpl", "q");
     100addElement(insertionPoint2, "FontFeaturesTestTTF", "trad", "r");
     101addElement(insertionPoint2, "FontFeaturesTestTTF", "fwid", "t");
     102addElement(insertionPoint2, "FontFeaturesTestTTF", "pwid", "u");
     103addElement(insertionPoint2, "FontFeaturesTestTTF", "ruby", "v");
     104
     105addElement(insertionPoint3, "FontWithFeaturesOTF", "liga", "C");
     106addElement(insertionPoint3, "FontWithFeaturesOTF", "clig", "D");
     107addElement(insertionPoint3, "FontWithFeaturesOTF", "dlig", "E");
     108addElement(insertionPoint3, "FontWithFeaturesOTF", "hlig", "F");
     109addElement(insertionPoint3, "FontWithFeaturesOTF", "calt", "G");
     110addElement(insertionPoint3, "FontWithFeaturesOTF", "subs", "H");
     111addElement(insertionPoint3, "FontWithFeaturesOTF", "sups", "I");
     112addElement(insertionPoint3, "FontWithFeaturesOTF", "smcp", "J");
     113addElement(insertionPoint3, "FontWithFeaturesOTF", "c2sc", "K");
     114addElement(insertionPoint3, "FontWithFeaturesOTF", "pcap", "L");
     115addElement(insertionPoint3, "FontWithFeaturesOTF", "c2pc", "M");
     116addElement(insertionPoint3, "FontWithFeaturesOTF", "unic", "N");
     117addElement(insertionPoint3, "FontWithFeaturesOTF", "titl", "O");
     118addElement(insertionPoint3, "FontWithFeaturesOTF", "lnum", "P");
     119addElement(insertionPoint3, "FontWithFeaturesOTF", "onum", "Q");
     120addElement(insertionPoint3, "FontWithFeaturesOTF", "pnum", "R");
     121addElement(insertionPoint3, "FontWithFeaturesOTF", "tnum", "S");
     122addElement(insertionPoint3, "FontWithFeaturesOTF", "frac", "T");
     123//addElement(insertionPoint3, "FontWithFeaturesOTF", "afrc", "U");
     124addElement(insertionPoint3, "FontWithFeaturesOTF", "ordn", "V");
     125addElement(insertionPoint3, "FontWithFeaturesOTF", "zero", "W");
     126addElement(insertionPoint3, "FontWithFeaturesOTF", "hist", "X");
     127addElement(insertionPoint3, "FontWithFeaturesOTF", "jp78", "Y");
     128addElement(insertionPoint3, "FontWithFeaturesOTF", "jp83", "Z");
     129addElement(insertionPoint3, "FontWithFeaturesOTF", "jp90", "a");
     130addElement(insertionPoint3, "FontWithFeaturesOTF", "jp04", "b");
     131addElement(insertionPoint3, "FontWithFeaturesOTF", "smpl", "c");
     132addElement(insertionPoint3, "FontWithFeaturesOTF", "trad", "d");
     133addElement(insertionPoint3, "FontWithFeaturesOTF", "fwid", "e");
     134addElement(insertionPoint3, "FontWithFeaturesOTF", "pwid", "f");
     135addElement(insertionPoint3, "FontWithFeaturesOTF", "ruby", "g");
     136
     137addElement(insertionPoint4, "FontWithFeaturesTTF", "liga", "C");
     138addElement(insertionPoint4, "FontWithFeaturesTTF", "liga", "D");
     139addElement(insertionPoint4, "FontWithFeaturesTTF", "clig", "C");
     140addElement(insertionPoint4, "FontWithFeaturesTTF", "clig", "D");
     141addElement(insertionPoint4, "FontWithFeaturesTTF", "dlig", "G");
     142addElement(insertionPoint4, "FontWithFeaturesTTF", "hlig", "I");
     143addElement(insertionPoint4, "FontWithFeaturesTTF", "calt", "L");
     144addElement(insertionPoint4, "FontWithFeaturesTTF", "subs", "O");
     145addElement(insertionPoint4, "FontWithFeaturesTTF", "sups", "P");
     146addElement(insertionPoint4, "FontWithFeaturesTTF", "smcp", "S");
     147addElement(insertionPoint4, "FontWithFeaturesTTF", "c2sc", "V");
     148addElement(insertionPoint4, "FontWithFeaturesTTF", "pcap", "T");
     149addElement(insertionPoint4, "FontWithFeaturesTTF", "c2pc", "W");
     150addElement(insertionPoint4, "FontWithFeaturesTTF", "unic", "Y");
     151addElement(insertionPoint4, "FontWithFeaturesTTF", "titl", "a");
     152addElement(insertionPoint4, "FontWithFeaturesTTF", "lnum", "c");
     153addElement(insertionPoint4, "FontWithFeaturesTTF", "onum", "d");
     154addElement(insertionPoint4, "FontWithFeaturesTTF", "pnum", "f");
     155addElement(insertionPoint4, "FontWithFeaturesTTF", "tnum", "g");
     156addElement(insertionPoint4, "FontWithFeaturesTTF", "frac", "i");
     157addElement(insertionPoint4, "FontWithFeaturesTTF", "afrc", "j");
     158addElement(insertionPoint4, "FontWithFeaturesTTF", "ordn", "Q");
     159addElement(insertionPoint4, "FontWithFeaturesTTF", "zero", "k");
     160addElement(insertionPoint4, "FontWithFeaturesTTF", "hist", "K");
     161addElement(insertionPoint4, "FontWithFeaturesTTF", "jp78", "m");
     162addElement(insertionPoint4, "FontWithFeaturesTTF", "jp83", "n");
     163addElement(insertionPoint4, "FontWithFeaturesTTF", "jp90", "o");
     164addElement(insertionPoint4, "FontWithFeaturesTTF", "jp04", "p");
     165addElement(insertionPoint4, "FontWithFeaturesTTF", "smpl", "q");
     166addElement(insertionPoint4, "FontWithFeaturesTTF", "trad", "r");
     167addElement(insertionPoint4, "FontWithFeaturesTTF", "fwid", "t");
     168addElement(insertionPoint4, "FontWithFeaturesTTF", "pwid", "u");
     169addElement(insertionPoint4, "FontWithFeaturesTTF", "ruby", "v");
    33170</script>
    34 </head>
    35 <body onload="setTimeout(test, 300)">
    36 <p>Test for font-feature-settings property.  The first word of the following three words should be displayed like "WebKit", while others should be displayed as black boxes.</p>
    37 <div class="dligOn">WebKit</div>
    38 <div class="dligOff">WebKit</div>
    39 <div class="dligNone">WebKit</div>
    40171</body>
     172</html>
  • trunk/LayoutTests/platform/efl/TestExpectations

    r190609 r190848  
    7878
    7979# Need to implement font feature seeting for EFL port since r188146.
    80 css3/font-feature-settings-preinstalled-fonts.html [ Skip ]
    81 css3/font-feature-settings-rendering-2.html [ Skip ]
     80css3/font-feature-settings-rendering.html [ Skip ]
    8281
    8382# ----------------------------------------
  • trunk/LayoutTests/platform/mac/TestExpectations

    r190802 r190848  
    259259fast/css/draggable-region-parser.html
    260260
    261 # Font feature settings is not implemented.
    262 css3/font-feature-settings-rendering.html
    263 
    264 webkit.org/b/149246 [ Mavericks ] css3/font-feature-settings-rendering-2.html
    265 webkit.org/b/149246 [ Mavericks ] css3/font-variant-all-webfont.html
    266 webkit.org/b/149246 [ Mavericks ] css3/font-variant-parsing.html
     261webkit.org/b/149246 [ Mavericks Yosemite ] css3/font-feature-settings-rendering.html [ ImageOnlyFailure ]
     262webkit.org/b/149246 [ Mavericks Yosemite ] css3/font-variant-all.html [ ImageOnlyFailure ]
    267263
    268264# This feature is disabled on Mavericks.
  • trunk/LayoutTests/platform/win/TestExpectations

    r190657 r190848  
    473473# Font feature settings is not implemented.
    474474css3/font-feature-settings-rendering.html [ Skip ]
    475 css3/font-feature-settings-rendering-2.html [ Skip ]
    476475
    477476# TODO HiDPI tests require test infrastructure enhancements (e.g. testRunner.setBackingScaleFactor)
     
    637636
    638637# font-variant-* not implemented on Windows
    639 webkit.org/b/149630 css3/font-variant-all-webfont.html [ ImageOnlyFailure ]
     638webkit.org/b/149630 css3/font-variant-all.html [ ImageOnlyFailure ]
    640639
    641640################################################################################
  • trunk/Tools/ChangeLog

    r190846 r190848  
     12015-10-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Test font-variant-* and font-feature-settings with mocked preinstalled fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=149777
     5
     6        Reviewed by Simon Fraser.
     7
     8        Include FontWithFeatures in DumpRenderTree and WebKitTestRunner. Add it
     9        to the list of tests to preinstall at startup time.
     10
     11        Also, update the generation of the 'name' table in the FontWithFeatures font.
     12
     13        * DumpRenderTree/mac/DumpRenderTree.mm:
     14        (allowedFontFamilySet):
     15        (activateTestingFonts):
     16        (activateFontsIOS):
     17        * FontWithFeatures/FontWithFeatures/FontCreator.cpp:
     18        (Generator::generate):
     19        (Generator::appendCFFTable):
     20        (Generator::appendNameSubtable):
     21        (Generator::appendNAMETable):
     22        * FontWithFeatures/FontWithFeatures/main.cpp:
     23        (main):
     24        * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
     25        (WTR::allowedFontFamilySet):
     26        (WTR::activateFonts):
     27        * WebKitTestRunner/mac/TestControllerMac.mm:
     28        (WTR::allowedFontFamilySet):
     29
    1302015-10-11  Jinyoung Hur  <hur.ims@navercorp.com>
    231
  • trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r190415 r190848  
    129129                C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */; };
    130130                C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */; };
     131                C23EA2081BC9F05100C980B7 /* FontWithFeatures.otf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = C23EA2061BC9EABA00C980B7 /* FontWithFeatures.otf */; };
     132                C23EA2091BC9F05100C980B7 /* FontWithFeatures.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */; };
    131133                E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */; };
    132134/* End PBXBuildFile section */
     
    191193                        dstSubfolderSpec = 7;
    192194                        files = (
     195                                C23EA2081BC9F05100C980B7 /* FontWithFeatures.otf in Copy Font Files */,
     196                                C23EA2091BC9F05100C980B7 /* FontWithFeatures.ttf in Copy Font Files */,
    193197                                5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */,
    194198                                5DB9AC980F722C3600684641 /* WebKitWeightWatcher100.ttf in Copy Font Files */,
     
    371375                C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJSAfterRemovingPluginElement.cpp; sourceTree = "<group>"; };
    372376                C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NullNPPGetValuePointer.cpp; sourceTree = "<group>"; };
     377                C23EA2061BC9EABA00C980B7 /* FontWithFeatures.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FontWithFeatures.otf; path = fonts/FontWithFeatures.otf; sourceTree = "<group>"; };
     378                C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FontWithFeatures.ttf; path = fonts/FontWithFeatures.ttf; sourceTree = "<group>"; };
    373379                E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockGeolocationProvider.h; path = mac/MockGeolocationProvider.h; sourceTree = "<group>"; };
    374380                E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MockGeolocationProvider.mm; path = mac/MockGeolocationProvider.mm; sourceTree = "<group>"; };
     
    627633                                375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */,
    628634                                375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */,
     635                                C23EA2061BC9EABA00C980B7 /* FontWithFeatures.otf */,
     636                                C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */,
    629637                        );
    630638                        name = Resources;
  • trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig

    r188566 r190848  
    2626#include "BaseTarget.xcconfig"
    2727
    28 OTHER_LDFLAGS_FONTS = -sectcreate __DATA Ahem fonts/AHEM____.TTF -sectcreate __DATA WeightWatcher100 fonts/WebKitWeightWatcher100.ttf -sectcreate __DATA WeightWatcher200 fonts/WebKitWeightWatcher200.ttf -sectcreate __DATA WeightWatcher300 fonts/WebKitWeightWatcher300.ttf -sectcreate __DATA WeightWatcher400 fonts/WebKitWeightWatcher400.ttf -sectcreate __DATA WeightWatcher500 fonts/WebKitWeightWatcher500.ttf -sectcreate __DATA WeightWatcher600 fonts/WebKitWeightWatcher600.ttf -sectcreate __DATA WeightWatcher700 fonts/WebKitWeightWatcher700.ttf -sectcreate __DATA WeightWatcher800 fonts/WebKitWeightWatcher800.ttf -sectcreate __DATA WeightWatcher900 fonts/WebKitWeightWatcher900.ttf;
     28OTHER_LDFLAGS_FONTS = -sectcreate __DATA Ahem fonts/AHEM____.TTF -sectcreate __DATA WeightWatcher100 fonts/WebKitWeightWatcher100.ttf -sectcreate __DATA WeightWatcher200 fonts/WebKitWeightWatcher200.ttf -sectcreate __DATA WeightWatcher300 fonts/WebKitWeightWatcher300.ttf -sectcreate __DATA WeightWatcher400 fonts/WebKitWeightWatcher400.ttf -sectcreate __DATA WeightWatcher500 fonts/WebKitWeightWatcher500.ttf -sectcreate __DATA WeightWatcher600 fonts/WebKitWeightWatcher600.ttf -sectcreate __DATA WeightWatcher700 fonts/WebKitWeightWatcher700.ttf -sectcreate __DATA WeightWatcher800 fonts/WebKitWeightWatcher800.ttf -sectcreate __DATA WeightWatcher900 fonts/WebKitWeightWatcher900.ttf -sectcreate __DATA FontWithFeaturesTTF fonts/FontWithFeatures.ttf -sectcreate __DATA FontWithFeaturesOTF fonts/FontWithFeatures.otf;
    2929
    3030OTHER_LDFLAGS = $(PLATFORM_OTHER_LDFLAGS) $(ASAN_OTHER_LDFLAGS);
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r190578 r190848  
    411411        @"Webdings",
    412412        @"WebKit WeightWatcher",
     413        @"FontWithFeaturesOTF",
     414        @"FontWithFeaturesTTF",
    413415        @"Wingdings 2",
    414416        @"Wingdings 3",
     
    559561        "WebKitWeightWatcher800.ttf",
    560562        "WebKitWeightWatcher900.ttf",
     563        "FontWithFeatures.ttf",
     564        "FontWithFeatures.otf",
    561565        0
    562566    };
     
    629633    fontData(WeightWatcher800);
    630634    fontData(WeightWatcher900);
     635    fontData(FontWithFeaturesTTF);
     636    fontData(FontWithFeaturesOTF);
    631637}
    632638#endif // !PLATFORM(IOS)
  • trunk/Tools/FontWithFeatures/FontWithFeatures/FontCreator.cpp

    r190697 r190848  
    296296    std::vector<uint8_t> generate(Type type)
    297297    {
     298        if (type == Type::OpenType)
     299            name = "FontWithFeaturesOTF";
     300        else
     301            name = "FontWithFeaturesTTF";
     302
    298303        featureDescription = generateFeatureDescription();
    299304
     
    573578
    574579        // Name INDEX
    575         std::string fontName = "MylesFont";
     580        std::string fontName = name;
    576581        append16(1); // INDEX contains 1 element
    577582        result.push_back(4); // Offsets in this INDEX are 4 bytes long
     
    10831088        append16(3); // Unicode version 2.0 or later
    10841089        append16(0); // Language
    1085         append16(m_baseStringIndex + nameIdentifier); // Name identifier
    1086         append16(s.length());
     1090        append16(nameIdentifier); // Name identifier
     1091        append16(s.length() * 2); // Code units get 2 bytes each
    10871092        append16(m_nameOffset); // Offset into name data
    10881093        m_nameOffset += s.size() * 2; // Code units get 2 bytes each
     
    10971102    void appendNAMETable()
    10981103    {
    1099         std::string familyName = "MylesFont"; // 1: Font Family
    1100 
    1101         uint16_t numberOfRecords = m_stringIndex + 1;
     1104        std::string familyName = name; // 1: Font Family
     1105        std::string version = "1.0";
     1106
     1107        uint16_t numberOfRecords = m_stringIndex + 6;
    11021108        append16(0); // Format selector
    11031109        append16(numberOfRecords); // Number of name records in table
    11041110        append16(6 + 12 * numberOfRecords); // Offset in bytes to the beginning of name character strings
    11051111
    1106         appendNameSubtable(familyName, 1); // 1: Font Family
     1112        appendNameSubtable(familyName, 1); // 1: Font Family.
     1113        appendNameSubtable(familyName, 2); // 2: Font Subfamily.
     1114        appendNameSubtable(familyName, 3); // 3: Unique subfamily identification.
     1115        appendNameSubtable(familyName, 4); // 4: Full name of the font.
     1116        appendNameSubtable(version, 5); // 5: Version of the name table.
     1117        appendNameSubtable(familyName, 6); // 6: PostScript name of the font.
    11071118        for (FeatureType& type : featureDescription) {
    1108             appendNameSubtable(type.name, type.stringIndex);
     1119            appendNameSubtable(type.name, m_baseStringIndex + type.stringIndex);
    11091120            for (FeatureSelector& selector : type.selectors)
    1110                 appendNameSubtable(selector.name, selector.stringIndex);
    1111         }
    1112 
     1121                appendNameSubtable(selector.name, m_baseStringIndex + selector.stringIndex);
     1122        }
     1123
     1124        append2ByteASCIIString(familyName);
     1125        append2ByteASCIIString(familyName);
     1126        append2ByteASCIIString(familyName);
     1127        append2ByteASCIIString(familyName);
     1128        append2ByteASCIIString(version);
    11131129        append2ByteASCIIString(familyName);
    11141130        for (FeatureType& type : featureDescription) {
     
    11721188    std::vector<FeatureType> featureDescription;
    11731189    std::vector<uint8_t> result;
     1190    std::string name;
    11741191};
    11751192
  • trunk/Tools/FontWithFeatures/FontWithFeatures/main.cpp

    r190697 r190848  
    127127    Type type = Type::TrueType;
    128128    const std::vector<uint8_t> fontVector = generateFont(type);
    129     std::ofstream outputFile("/Volumes/Data/home/mmaxfield/tmp/output.ttf", std::ios::out | std::ios::binary);
     129    std::ofstream outputFile("/Volumes/Data/home/mmaxfield/src/WebKit/OpenSource/LayoutTests/css3/resources/FontWithFeatures.ttf", std::ios::out | std::ios::binary);
    130130    for (uint8_t b : fontVector)
    131131        outputFile << b;
  • trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm

    r188566 r190848  
    161161        @"Webdings",
    162162        @"WebKit WeightWatcher",
     163        @"FontWithFeaturesOTF",
     164        @"FontWithFeaturesTTF",
    163165        @"Wingdings 2",
    164166        @"Wingdings 3",
     
    300302        "WebKitWeightWatcher800.ttf",
    301303        "WebKitWeightWatcher900.ttf",
     304        "FontWithFeatures.otf",
     305        "FontWithFeatures.ttf",
    302306        0
    303307    };
  • trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj

    r190368 r190848  
    4848                0FEB90A51905C016000FDBF3 /* CrashReporterInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */; };
    4949                0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEBF8591BB61DF20028722D /* HIDEventGenerator.mm */; settings = {ASSET_TAGS = (); }; };
     50                1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */ = {isa = PBXBuildFile; fileRef = 1CA211C71BCA107300B2101F /* FontWithFeatures.otf */; };
     51                1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */; };
    5052                29210EAE144CACB700835BB5 /* AccessibilityUIElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29210EA9144CACB200835BB5 /* AccessibilityUIElement.cpp */; };
    5153                29210EB0144CACBD00835BB5 /* AccessibilityController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29210EA2144CAAA500835BB5 /* AccessibilityController.cpp */; };
     
    196198                0FEBF85C1BB62D460028722D /* UIKitSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIKitSPI.h; sourceTree = "<group>"; };
    197199                1A3326051B75396500F89F62 /* TestOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; };
     200                1CA211C71BCA107300B2101F /* FontWithFeatures.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = FontWithFeatures.otf; sourceTree = "<group>"; };
     201                1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = FontWithFeatures.ttf; sourceTree = "<group>"; };
    198202                26D758E5160BECDC00268472 /* GeolocationProviderMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationProviderMock.cpp; sourceTree = "<group>"; };
    199203                26D758E6160BECDD00268472 /* GeolocationProviderMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationProviderMock.h; sourceTree = "<group>"; };
     
    644648                                6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */,
    645649                                6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */,
     650                                1CA211C71BCA107300B2101F /* FontWithFeatures.otf */,
     651                                1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */,
    646652                        );
    647653                        name = Resources;
     
    885891                                6510A78211EC643800410867 /* AHEM____.TTF in Resources */,
    886892                                6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
     893                                1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */,
    887894                                6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */,
    888895                                6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */,
     
    892899                                6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */,
    893900                                6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */,
     901                                1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */,
    894902                                6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */,
    895903                        );
  • trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm

    r190510 r190848  
    247247        @"Webdings",
    248248        @"WebKit WeightWatcher",
     249        @"FontWithFeaturesOTF",
     250        @"FontWithFeaturesTTF",
    249251        @"Wingdings 2",
    250252        @"Wingdings 3",
Note: See TracChangeset for help on using the changeset viewer.