Changeset 152144 in webkit


Ignore:
Timestamp:
Jun 27, 2013 6:02:03 PM (11 years ago)
Author:
dino@apple.com
Message:

[Mac] Add Mavericks system font to Test systems
https://bugs.webkit.org/show_bug.cgi?id=118109

Reviewed by Simon Fraser.

OS X Mavericks uses a different font for system controls. Tell DRT and
WKTR about them otherwise they use a fallback font. Unfortunately the
fonts are hidden (not found in the list of available fonts) so I
had to add them manually.

Even though there is only one at the moment, I implemented this
as a set so it will be easier to add new fonts if necessary.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet): Fixed typo.
(systemHiddenFontFamilySet): New method that returns the system control font.
(drt_NSFontManager_availableFonts): Merge the hidden fonts.

  • WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:

(WTR::allowedFontFamilySet): Fixed typo.
(WTR::systemHiddenFontFamilySet): As above.
(WTR::wtr_NSFontManager_availableFonts):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r152143 r152144  
     12013-06-26  Dean Jackson  <dino@apple.com>
     2
     3        [Mac] Add Mavericks system font to Test systems
     4        https://bugs.webkit.org/show_bug.cgi?id=118109
     5
     6        Reviewed by Simon Fraser.
     7
     8        OS X Mavericks uses a different font for system controls. Tell DRT and
     9        WKTR about them otherwise they use a fallback font. Unfortunately the
     10        fonts are hidden (not found in the list of available fonts) so I
     11        had to add them manually.
     12
     13        Even though there is only one at the moment, I implemented this
     14        as a set so it will be easier to add new fonts if necessary.
     15
     16        * DumpRenderTree/mac/DumpRenderTree.mm:
     17        (allowedFontFamilySet): Fixed typo.
     18        (systemHiddenFontFamilySet): New method that returns the system control font.
     19        (drt_NSFontManager_availableFonts): Merge the hidden fonts.
     20        * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
     21        (WTR::allowedFontFamilySet): Fixed typo.
     22        (WTR::systemHiddenFontFamilySet): As above.
     23        (WTR::wtr_NSFontManager_availableFonts):
     24
    1252013-06-27  Anders Carlsson  <andersca@apple.com>
    226
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r151954 r152144  
    237237static NSSet *allowedFontFamilySet()
    238238{
    239     static NSSet *fontFamiliySet = [[NSSet setWithObjects:
     239    static NSSet *fontFamilySet = [[NSSet setWithObjects:
    240240        @"Ahem",
    241241        @"Al Bayan",
     
    356356        nil] retain];
    357357   
    358     return fontFamiliySet;
     358    return fontFamilySet;
     359}
     360
     361static NSSet *systemHiddenFontFamilySet()
     362{
     363    static NSSet *fontFamilySet = [[NSSet setWithObjects:
     364        @".LucidaGrandeUI",
     365        nil] retain];
     366
     367    return fontFamilySet;
    359368}
    360369
     
    392401        }
    393402    }
    394    
     403
     404    for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
     405        [availableFontList addObject:hiddenFontFamily];
     406    }
     407
    395408    availableFonts = availableFontList;
    396409    return availableFonts;
  • trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm

    r151954 r152144  
    4343static NSSet *allowedFontFamilySet()
    4444{
    45     static NSSet *fontFamiliySet = [[NSSet setWithObjects:
     45    static NSSet *fontFamilySet = [[NSSet setWithObjects:
    4646        @"Ahem",
    4747        @"Al Bayan",
     
    162162        nil] retain];
    163163   
    164     return fontFamiliySet;
     164    return fontFamilySet;
     165}
     166
     167static NSSet *systemHiddenFontFamilySet()
     168{
     169    static NSSet *fontFamilySet = [[NSSet setWithObjects:
     170        @".LucidaGrandeUI",
     171        nil] retain];
     172
     173    return fontFamilySet;
    165174}
    166175
     
    198207        }
    199208    }
    200    
     209
     210    for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
     211        [availableFontList addObject:hiddenFontFamily];
     212    }
     213
    201214    availableFonts = availableFontList;
    202215    return availableFonts;
Note: See TracChangeset for help on using the changeset viewer.