Lines Matching refs:hdc

149 static unsigned calculateGlyphCount(HDC hdc, const LOGFONT& lf) {
151 if (0 == GetTextMetrics(hdc, &textMetric)) {
154 GetTextMetrics(hdc, &textMetric);
163 if (GDI_ERROR != GetFontData(hdc, SkOTTableMaximumProfile::TAG, 4, &glyphs, sizeof(glyphs))) {
174 if (GetGlyphOutlineW(hdc, mid, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0,
185 static unsigned calculateUPEM(HDC hdc, const LOGFONT& lf) {
187 if (0 == GetTextMetrics(hdc, &textMetric)) {
190 GetTextMetrics(hdc, &textMetric);
198 unsigned int otmRet = GetOutlineTextMetrics(hdc, sizeof(otm), &otm);
201 otmRet = GetOutlineTextMetrics(hdc, sizeof(otm), &otm);
1735 HDC hdc = CreateCompatibleDC(nullptr);
1737 HFONT savefont = (HFONT)SelectObject(hdc, font);
1747 unsigned int otmRet = GetOutlineTextMetrics(hdc, sizeof(otm), &otm);
1750 otmRet = GetOutlineTextMetrics(hdc, sizeof(otm), &otm);
1752 if (!otmRet || !GetTextFace(hdc, LF_FACESIZE, lf.lfFaceName)) {
1757 SelectObject(hdc, designFont);
1758 if (!GetOutlineTextMetrics(hdc, sizeof(otm), &otm)) {
1761 glyphCount = calculateGlyphCount(hdc, fLogFont);
1773 populate_glyph_to_unicode(hdc, glyphCount, &(info->fGlyphToUnicode));
1815 if (GetCharABCWidths(hdc, stem_chars[i], stem_chars[i], &abcWidths)) {
1826 SelectObject(hdc, savefont);
1829 DeleteDC(hdc);
1938 HDC hdc = ::CreateCompatibleDC(nullptr);
1940 HFONT savefont = (HFONT)SelectObject(hdc, font);
1945 DWORD bufferSize = GetFontData(hdc, tables[i], 0, nullptr, 0);
1948 bufferSize = GetFontData(hdc, tables[i], 0, nullptr, 0);
1952 if (GetFontData(hdc, tables[i], 0, (void*)stream->getMemoryBase(), bufferSize)) {
1961 SelectObject(hdc, savefont);
1963 DeleteDC(hdc);
1968 static void bmpCharsToGlyphs(HDC hdc, const WCHAR* bmpChars, int count, uint16_t* glyphs,
1971 DWORD result = GetGlyphIndicesW(hdc, bmpChars, count, glyphs, GGI_MARK_NONEXISTING_GLYPHS);
1994 static uint16_t nonBmpCharToGlyph(HDC hdc, SCRIPT_CACHE* scriptCache, const WCHAR utf16[2]) {
2014 HRZM(ScriptShape(hdc, scriptCache, utf16, numWCHAR, maxGlyphs, &si[0].a,
2046 SkAutoHDC hdc(fLogFont);
2049 if (0 == GetTextMetrics(hdc, &tm)) {
2051 if (0 == GetTextMetrics(hdc, &tm)) {
2088 bmpCharsToGlyphs(hdc, scratch, runLength, &glyphs[glyphIndex], Ox1FHack);
2095 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch);
2115 bmpCharsToGlyphs(hdc, currentUtf16, runLength, &glyphs[glyphIndex], Ox1FHack);
2122 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, currentUtf16);
2143 bmpCharsToGlyphs(hdc, scratch, runLength, &glyphs[glyphIndex], Ox1FHack);
2150 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch);
2173 HDC hdc = ::CreateCompatibleDC(nullptr);
2175 HFONT savefont = (HFONT)SelectObject(hdc, font);
2177 unsigned int glyphCount = calculateGlyphCount(hdc, fLogFont);
2179 SelectObject(hdc, savefont);
2181 DeleteDC(hdc);
2187 HDC hdc = ::CreateCompatibleDC(nullptr);
2189 HFONT savefont = (HFONT)SelectObject(hdc, font);
2191 unsigned int upem = calculateUPEM(hdc, fLogFont);
2193 SelectObject(hdc, savefont);
2195 DeleteDC(hdc);
2239 HDC hdc = ::CreateCompatibleDC(nullptr);
2241 HFONT savefont = (HFONT)SelectObject(hdc, font);
2247 DWORD bufferSize = GetFontData(hdc, tag, (DWORD) offset, data, (DWORD) length);
2250 bufferSize = GetFontData(hdc, tag, (DWORD) offset, data, (DWORD) length);
2253 SelectObject(hdc, savefont);
2255 DeleteDC(hdc);
2363 HDC hdc = ::CreateCompatibleDC(nullptr);
2364 ::EnumFontFamiliesEx(hdc, &lf, enum_family_proc, (LPARAM)&fArray, 0);
2365 ::DeleteDC(hdc);
2408 HDC hdc = ::CreateCompatibleDC(nullptr);
2409 ::EnumFontFamiliesEx(hdc, &lf, enum_family_proc, (LPARAM)&fLogFontArray, 0);
2410 ::DeleteDC(hdc);