Lines Matching defs:metrics
325 // If the user requested aliased, do so with aliased compatible metrics.
343 // render high quality rotated glyphs but measure using bitmap metrics.
453 "Could not get gdi compatible glyph metrics.");
457 "Could not get design metrics.");
471 // DirectWrite produced 'compatible' metrics, but while close,
785 void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) {
786 if (nullptr == metrics) {
790 sk_bzero(metrics, sizeof(*metrics));
807 metrics->fAscent = -fTextSizeRender * SkIntToScalar(dwfm.ascent) / upem;
808 metrics->fDescent = fTextSizeRender * SkIntToScalar(dwfm.descent) / upem;
809 metrics->fLeading = fTextSizeRender * SkIntToScalar(dwfm.lineGap) / upem;
810 metrics->fXHeight = fTextSizeRender * SkIntToScalar(dwfm.xHeight) / upem;
811 metrics->fCapHeight = fTextSizeRender * SkIntToScalar(dwfm.capHeight) / upem;
812 metrics->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem;
813 metrics->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem);
814 metrics->fStrikeoutThickness = fTextSizeRender * SkIntToScalar(dwfm.strikethroughThickness) / upem;
815 metrics->fStrikeoutPosition = -(fTextSizeRender * SkIntToScalar(dwfm.strikethroughPosition) / upem);
817 metrics->fFlags |= SkFontMetrics::kUnderlineThicknessIsValid_Flag;
818 metrics->fFlags |= SkFontMetrics::kUnderlinePositionIsValid_Flag;
819 metrics->fFlags |= SkFontMetrics::kStrikeoutThicknessIsValid_Flag;
820 metrics->fFlags |= SkFontMetrics::kStrikeoutPositionIsValid_Flag;
826 metrics->fFlags |= SkFontMetrics::kBoundsInvalid_Flag;
833 metrics->fTop = -fTextSizeRender * SkIntToScalar(dwfm1.glyphBoxTop) / upem;
834 metrics->fBottom = -fTextSizeRender * SkIntToScalar(dwfm1.glyphBoxBottom) / upem;
835 metrics->fXMin = fTextSizeRender * SkIntToScalar(dwfm1.glyphBoxLeft) / upem;
836 metrics->fXMax = fTextSizeRender * SkIntToScalar(dwfm1.glyphBoxRight) / upem;
838 metrics->fMaxCharWidth = metrics->fXMax - metrics->fXMin;
847 metrics->fTop = -fTextSizeRender * (int16_t)SkEndian_SwapBE16(head->yMax) / upem;
848 metrics->fBottom = -fTextSizeRender * (int16_t)SkEndian_SwapBE16(head->yMin) / upem;
849 metrics->fXMin = fTextSizeRender * (int16_t)SkEndian_SwapBE16(head->xMin) / upem;
850 metrics->fXMax = fTextSizeRender * (int16_t)SkEndian_SwapBE16(head->xMax) / upem;
852 metrics->fMaxCharWidth = metrics->fXMax - metrics->fXMin;
857 metrics->fFlags |= SkFontMetrics::kBoundsInvalid_Flag;
858 metrics->fTop = metrics->fAscent;
859 metrics->fBottom = metrics->fDescent;