コード例 #1
0
ファイル: FontCacheWinCE.cpp プロジェクト: 1833183060/wke
static HFONT createMLangFont(IMLangFontLink* langFontLink, HDC hdc, const FontPlatformData& refFont, DWORD codePageMask)
{
    HFONT mlangFont;
    LRESULT result = langFontLink->MapFont(hdc, codePageMask, refFont.hfont(), &mlangFont);

    return result == S_OK ? mlangFont : 0;
}
コード例 #2
0
void paintSkiaText(GraphicsContext* context,
                   const FontPlatformData& data,
                   int numGlyphs,
                   const WORD* glyphs,
                   const int* advances,
                   const GOFFSET* offsets,
                   const SkPoint* origin)
{
    paintSkiaText(context, data.hfont(), data.typeface(), data.size(), data.lfQuality(),
                  numGlyphs, glyphs, advances, offsets, origin);
}
void paintSkiaText(GraphicsContext* context,
                   const FontPlatformData& data,
                   int numGlyphs,
                   const WORD* glyphs,
                   const int* advances,
                   const GOFFSET* offsets,
                   const SkPoint& origin,
                   const SkRect& textRect)
{
    paintSkiaText(context, data.hfont(), data.typeface(), data.size(), data.paintTextFlags(),
                  numGlyphs, glyphs, advances, offsets, origin, textRect);
}
コード例 #4
0
ファイル: FontCacheWinCE.cpp プロジェクト: Wrichik1999/webkit
static HFONT createMLangFont(IMLangFontLinkType* langFontLink, HDC hdc, const FontPlatformData& refFont, DWORD codePageMask, UChar character = 0)
{
    HFONT mlangFont;

#if USE(IMLANG_FONT_LINK2)
    HRESULT result = langFontLink->MapFont(hdc, codePageMask, character, &mlangFont);
#else
    HRESULT result = langFontLink->MapFont(hdc, codePageMask, refFont.hfont(), &mlangFont);
#endif

    if (SUCCEEDED(result))
        return mlangFont;
    return 0;
}