亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fontcachemac.mm

?? linux下開(kāi)源瀏覽器WebKit的源碼,市面上的很多商用瀏覽器都是移植自WebKit
?? MM
字號(hào):
/* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1.  Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer.  * 2.  Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in the *     documentation and/or other materials provided with the distribution.  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of *     its contributors may be used to endorse or promote products derived *     from this software without specific prior written permission.  * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */#import "config.h"#import "FontCache.h"#import "Font.h"#import "SimpleFontData.h"#import "FontPlatformData.h"#import "WebCoreSystemInterface.h"#import "WebFontCache.h"#include <wtf/StdLibExtras.h>#ifdef BUILDING_ON_TIGERtypedef int NSInteger;#endifnamespace WebCore {static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*){    fontCache()->invalidate();}void FontCache::platformInit(){    wkSetUpFontCache();    // FIXME: Passing kATSFontNotifyOptionReceiveWhileSuspended may be an overkill and does not seem to work anyway.    ATSFontNotificationSubscribe(fontCacheATSNotificationCallback, kATSFontNotifyOptionReceiveWhileSuspended, 0, 0);}static int toAppKitFontWeight(FontWeight fontWeight){    static int appKitFontWeights[] = {        2,  // FontWeight100        3,  // FontWeight200        4,  // FontWeight300        5,  // FontWeight400        6,  // FontWeight500        8,  // FontWeight600        9,  // FontWeight700        10, // FontWeight800        12, // FontWeight900    };    return appKitFontWeights[fontWeight];}static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight){    return appKitFontWeight >= 7;}const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length){    const FontPlatformData& platformData = font.fontDataAt(0)->fontDataForCharacter(characters[0])->platformData();    NSFont *nsFont = platformData.font();    NSString *string = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(characters) length:length freeWhenDone:NO];    NSFont *substituteFont = wkGetFontInLanguageForRange(nsFont, string, NSMakeRange(0, length));    [string release];    if (!substituteFont && length == 1)        substituteFont = wkGetFontInLanguageForCharacter(nsFont, characters[0]);    if (!substituteFont)        return 0;    // Use the family name from the AppKit-supplied substitute font, requesting the    // traits, weight, and size we want. One way this does better than the original    // AppKit request is that it takes synthetic bold and oblique into account.    // But it does create the possibility that we could end up with a font that    // doesn't actually cover the characters we need.    NSFontManager *fontManager = [NSFontManager sharedFontManager];    NSFontTraitMask traits;    NSInteger weight;    CGFloat size;    if (nsFont) {        traits = [fontManager traitsOfFont:nsFont];        if (platformData.m_syntheticBold)            traits |= NSBoldFontMask;        if (platformData.m_syntheticOblique)            traits |= NSFontItalicTrait;        weight = [fontManager weightOfFont:nsFont];        size = [nsFont pointSize];    } else {        // For custom fonts nsFont is nil.        traits = font.italic() ? NSFontItalicTrait : 0;        weight = toAppKitFontWeight(font.weight());        size = font.pixelSize();    }    if (NSFont *bestVariation = [fontManager fontWithFamily:[substituteFont familyName] traits:traits weight:weight size:size])        substituteFont = bestVariation;    substituteFont = font.fontDescription().usePrinterFont() ? [substituteFont printerFont] : [substituteFont screenFont];    NSFontTraitMask substituteFontTraits = [fontManager traitsOfFont:substituteFont];    NSInteger substituteFontWeight = [fontManager weightOfFont:substituteFont];    FontPlatformData alternateFont(substituteFont,         !font.isPlatformFont() && isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(substituteFontWeight),        !font.isPlatformFont() && (traits & NSFontItalicTrait) && !(substituteFontTraits & NSFontItalicTrait));    return getCachedFontData(&alternateFont);}FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font){    // Attempt to find an appropriate font using a match based on     // the presence of keywords in the the requested names.  For example, we'll    // match any name that contains "Arabic" to Geeza Pro.    FontPlatformData* platformData = 0;    const FontFamily* currFamily = &font.fontDescription().family();    while (currFamily && !platformData) {        if (currFamily->family().length()) {            static String* matchWords[3] = { new String("Arabic"), new String("Pashto"), new String("Urdu") };            DEFINE_STATIC_LOCAL(AtomicString, geezaStr, ("Geeza Pro"));            for (int j = 0; j < 3 && !platformData; ++j)                if (currFamily->family().contains(*matchWords[j], false))                    platformData = getCachedFontPlatformData(font.fontDescription(), geezaStr);        }        currFamily = currFamily->next();    }    return platformData;}FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& fontDescription){    DEFINE_STATIC_LOCAL(AtomicString, timesStr, ("Times"));    DEFINE_STATIC_LOCAL(AtomicString, lucidaGrandeStr, ("Lucida Grande"));    // FIXME: Would be even better to somehow get the user's default font here.  For now we'll pick    // the default that the user would get without changing any prefs.    FontPlatformData* platformFont = getCachedFontPlatformData(fontDescription, timesStr);    if (!platformFont)        // The Times fallback will almost always work, but in the highly unusual case where        // the user doesn't have it, we fall back on Lucida Grande because that's        // guaranteed to be there, according to Nathan Taylor. This is good enough        // to avoid a crash at least.        platformFont = getCachedFontPlatformData(fontDescription, lucidaGrandeStr);    return platformFont;}void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector<unsigned>& traitsMasks){    [WebFontCache getTraits:traitsMasks inFamily:familyName];}FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family){    NSFontTraitMask traits = fontDescription.italic() ? NSFontItalicTrait : 0;    NSInteger weight = toAppKitFontWeight(fontDescription.weight());    float size = fontDescription.computedPixelSize();    NSFont *nsFont = [WebFontCache fontWithFamily:family traits:traits weight:weight size:size];    if (!nsFont)        return 0;    NSFontManager *fontManager = [NSFontManager sharedFontManager];    NSFontTraitMask actualTraits = 0;    if (fontDescription.italic())        actualTraits = [fontManager traitsOfFont:nsFont];    NSInteger actualWeight = [fontManager weightOfFont:nsFont];    NSFont *platformFont = fontDescription.usePrinterFont() ? [nsFont printerFont] : [nsFont screenFont];    bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(actualWeight);    bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);    return new FontPlatformData(platformFont, syntheticBold, syntheticOblique);}} // namespace WebCore

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠狠色丁香婷婷综合激情 | 色噜噜狠狠一区二区三区果冻| 久99久精品视频免费观看| 午夜视频在线观看一区| 天堂精品中文字幕在线| 午夜欧美大尺度福利影院在线看| 亚洲国产视频一区二区| 亚洲国产成人av| 免费国产亚洲视频| 国内精品写真在线观看| 国产毛片一区二区| av不卡免费电影| 色又黄又爽网站www久久| 欧美三级中文字幕| 欧美精品高清视频| 日韩一区二区高清| 久久久蜜臀国产一区二区| 国产精品三级av在线播放| 国产精品久久久久婷婷二区次| 最新热久久免费视频| 亚洲制服丝袜av| 亚欧色一区w666天堂| 麻豆久久一区二区| 成人涩涩免费视频| 一本久道中文字幕精品亚洲嫩| 欧美日韩高清影院| 欧美va在线播放| 国产精品美女久久福利网站| 亚洲精品v日韩精品| 婷婷成人激情在线网| 国内久久精品视频| 91浏览器打开| 欧美大片日本大片免费观看| 久久精品亚洲国产奇米99| 亚洲欧美日韩综合aⅴ视频| 午夜私人影院久久久久| 国产尤物一区二区| 在线观看国产91| 精品乱码亚洲一区二区不卡| 国产精品久久久爽爽爽麻豆色哟哟| 一级日本不卡的影视| 久久66热re国产| 色综合天天综合网国产成人综合天| 欧美日韩精品欧美日韩精品 | 成人性生交大合| 日本道在线观看一区二区| 日韩精品最新网址| 国产精品热久久久久夜色精品三区 | 久久日韩粉嫩一区二区三区| 亚洲免费电影在线| 日韩中文字幕av电影| 成人精品一区二区三区中文字幕| 欧美精品视频www在线观看| 日本一区二区视频在线| 日韩国产一区二| 99久久99久久精品国产片果冻| 欧美一级电影网站| 国产精品久久久久毛片软件| 免费成人美女在线观看.| 91色|porny| 久久综合九色综合久久久精品综合| 伊人色综合久久天天| 丁香婷婷综合网| 精品久久久久久久久久久久包黑料 | 色国产综合视频| 久久久久久99久久久精品网站| 亚洲综合视频在线观看| 国产福利91精品一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 国产精品传媒视频| 精品亚洲国内自在自线福利| 欧美日本一区二区三区四区| 亚洲欧美日本韩国| 国产99久久久久久免费看农村| 7777女厕盗摄久久久| 色婷婷综合中文久久一本| 欧美v亚洲v综合ⅴ国产v| 久久精工是国产品牌吗| 精品国产伦理网| 国产激情视频一区二区在线观看| 国产精品无人区| 在线日韩av片| 狠狠色丁香婷婷综合| 亚洲最大成人网4388xx| 成人自拍视频在线观看| 成人综合在线观看| 欧美综合色免费| 亚洲天堂2014| 成人av先锋影音| 中文字幕精品在线不卡| 国产精品资源在线| 久久美女艺术照精彩视频福利播放| 日韩高清一级片| 欧美精品精品一区| 日本欧美韩国一区三区| 欧美日韩国产综合视频在线观看| 一区二区三区 在线观看视频| 91在线观看地址| 中文字幕一区在线| 9色porny自拍视频一区二区| 中文字幕第一区| 成人av资源站| 亚洲色图视频网站| 91在线国产观看| 综合久久国产九一剧情麻豆| 91性感美女视频| proumb性欧美在线观看| 国产精品美女久久久久高潮| 97精品国产97久久久久久久久久久久| 国产精品嫩草99a| 99久久99久久精品免费看蜜桃| 亚洲欧洲国产日韩| 91啪在线观看| 亚洲综合色在线| 欧美一区二区三区影视| 精品亚洲成a人在线观看| 国产亚洲欧美激情| 成人久久18免费网站麻豆 | 秋霞国产午夜精品免费视频| 亚洲女同一区二区| 国产偷v国产偷v亚洲高清| 久草精品在线观看| 国产清纯美女被跳蛋高潮一区二区久久w| 国产一区二区三区综合| 欧美国产禁国产网站cc| 91在线视频在线| 日韩精品成人一区二区在线| 精品免费一区二区三区| 成人性生交大合| 亚洲一区视频在线| 日韩亚洲欧美成人一区| 丁香激情综合国产| 亚洲免费大片在线观看| 欧美一区二区三区在线视频| 国产精品亚洲第一区在线暖暖韩国| 国产精品色噜噜| 欧美日韩国产在线播放网站| 国内精品在线播放| 中文字幕欧美一区| 欧美精选午夜久久久乱码6080| 久久99国产精品尤物| 国产精品国产a| 欧美男女性生活在线直播观看| 精品一区二区在线视频| 亚洲视频图片小说| 欧美一区二区视频在线观看| 成人不卡免费av| 日韩精品色哟哟| 中文欧美字幕免费| 欧美性一级生活| 激情综合色综合久久综合| 91在线视频免费91| 欧美成人官网二区| 最近日韩中文字幕| 免费av网站大全久久| 精品视频在线免费观看| 国内精品写真在线观看| 亚洲综合色区另类av| 久久伊人中文字幕| 欧美在线观看一二区| 国产精品亚洲午夜一区二区三区| 一区二区三区精品在线| 久久综合网色—综合色88| 在线免费av一区| 国产一区二区调教| 亚洲超碰精品一区二区| 国产精品三级在线观看| 日韩欧美国产三级电影视频| 日本丰满少妇一区二区三区| 国产在线视频一区二区三区| 亚洲成人免费视| 国产精品不卡一区二区三区| 日韩欧美亚洲一区二区| 91网页版在线| 国产成人亚洲精品狼色在线| 免费看日韩精品| 五月天亚洲精品| 亚洲日本欧美天堂| 国产女人18毛片水真多成人如厕| 91精品在线观看入口| 在线视频一区二区三区| www.成人网.com| 成人91在线观看| 国产精品影视天天线| 黄页网站大全一区二区| 视频一区视频二区中文字幕| 亚洲精品成人精品456| 中文字幕日韩av资源站| 欧美激情一区二区三区蜜桃视频 | 欧美日韩性生活| 91视频免费播放| heyzo一本久久综合| 丁香六月综合激情| 国产成人免费在线视频| 国产精品一区在线观看你懂的| 久久国产精品第一页| 精品一区二区日韩| 精品一区二区免费视频| 韩国女主播成人在线观看| 久久电影国产免费久久电影|