Home
last modified time | relevance | path

Searched refs:metrics (Results 1 – 25 of 176) sorted by relevance

12345678

/external/fonttools/Lib/fontTools/ttLib/tables/
D_h_m_t_x.py23 metrics = array.array("h", data[:4 * numberOfMetrics])
25 metrics.byteswap()
35 self.metrics = {}
39 self.metrics[glyphName] = list(metrics[i*2:i*2+2])
40 lastAdvance = metrics[-2]
43 self.metrics[glyphName] = [lastAdvance, sideBearings[i]]
46 metrics = []
48 metrics.append(self.metrics[glyphName])
49 lastAdvance = metrics[-1][0]
50 lastIndex = len(metrics)
[all …]
DE_B_D_T_.py131 glyph.exportMetrics = glyph.metrics
133 glyph.exportMetrics = curIndexSubTable.metrics
267 metrics = bitmapObject.exportMetrics
272 writer.begintag('rowimagedata', bitDepth=bitDepth, width=metrics.width, height=metrics.height)
274 for curRow in range(metrics.height):
275 rowData = bitmapObject.getRow(curRow, bitDepth=bitDepth, metrics=metrics)
283 metrics = SmallGlyphMetrics()
284 metrics.width = safeEval(attrs['width'])
285 metrics.height = safeEval(attrs['height'])
295 bitmapObject.setRows(dataRows, bitDepth=bitDepth, metrics=metrics)
[all …]
/external/freetype/src/autofit/
Dafindic.c36 af_indic_metrics_init( AF_CJKMetrics metrics, in af_indic_metrics_init() argument
43 metrics->units_per_em = face->units_per_EM; in af_indic_metrics_init()
49 af_cjk_metrics_init_widths( metrics, face ); in af_indic_metrics_init()
52 af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars ); in af_indic_metrics_init()
54 af_cjk_metrics_check_digits( metrics, face ); in af_indic_metrics_init()
64 af_indic_metrics_scale( AF_CJKMetrics metrics, in af_indic_metrics_scale() argument
68 af_cjk_metrics_scale( metrics, scaler ); in af_indic_metrics_scale()
74 AF_CJKMetrics metrics ) in af_indic_hints_init() argument
77 return af_cjk_hints_init( hints, metrics ); in af_indic_hints_init()
85 AF_CJKMetrics metrics ) in af_indic_hints_apply() argument
[all …]
Dafloader.c105 AF_StyleMetrics metrics = loader->metrics; in af_loader_load_g() local
146 FT_Bool size_changed = face->size->metrics.x_ppem in af_loader_load_g()
165 AF_WRITING_SYSTEM_CLASSES_GET[metrics->style_class->writing_system]; in af_loader_load_g()
168 writing_system_class->style_metrics_getstdw( metrics, in af_loader_load_g()
186 face->size->metrics.x_scale ), in af_loader_load_g()
190 globals->stem_darkening_for_ppem = face->size->metrics.x_ppem; in af_loader_load_g()
205 face->size->metrics.y_scale ), in af_loader_load_g()
209 globals->stem_darkening_for_ppem = face->size->metrics.x_ppem; in af_loader_load_g()
271 loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance, in af_loader_load_g()
285 AF_StyleClass style_class = metrics->style_class; in af_loader_load_g()
[all …]
Daflatin.c61 af_latin_metrics_init_widths( AF_LatinMetrics metrics, in af_latin_metrics_init_widths() argument
72 af_style_names[metrics->root.style_class->style] )); in af_latin_metrics_init_widths()
76 metrics->axis[AF_DIMENSION_HORZ].width_count = 0; in af_latin_metrics_init_widths()
77 metrics->axis[AF_DIMENSION_VERT].width_count = 0; in af_latin_metrics_init_widths()
87 AF_FaceGlobals globals = metrics->root.globals; in af_latin_metrics_init_widths()
90 AF_StyleClass style_class = metrics->root.style_class; in af_latin_metrics_init_widths()
130 p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx ); in af_latin_metrics_init_widths()
135 glyph_index = af_shaper_get_elem( &metrics->root, in af_latin_metrics_init_widths()
158 dummy->units_per_em = metrics->units_per_em; in af_latin_metrics_init_widths()
177 AF_LatinAxis axis = &metrics->axis[dim]; in af_latin_metrics_init_widths()
[all …]
Dafdummy.c27 AF_StyleMetrics metrics ) in af_dummy_hints_init() argument
29 af_glyph_hints_rescale( hints, metrics ); in af_dummy_hints_init()
31 hints->x_scale = metrics->scaler.x_scale; in af_dummy_hints_init()
32 hints->y_scale = metrics->scaler.y_scale; in af_dummy_hints_init()
33 hints->x_delta = metrics->scaler.x_delta; in af_dummy_hints_init()
34 hints->y_delta = metrics->scaler.y_delta; in af_dummy_hints_init()
Dafcjk.c70 af_cjk_metrics_init_widths( AF_CJKMetrics metrics, in af_cjk_metrics_init_widths() argument
81 af_style_names[metrics->root.style_class->style] )); in af_cjk_metrics_init_widths()
85 metrics->axis[AF_DIMENSION_HORZ].width_count = 0; in af_cjk_metrics_init_widths()
86 metrics->axis[AF_DIMENSION_VERT].width_count = 0; in af_cjk_metrics_init_widths()
96 AF_FaceGlobals globals = metrics->root.globals; in af_cjk_metrics_init_widths()
99 AF_StyleClass style_class = metrics->root.style_class; in af_cjk_metrics_init_widths()
134 p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx ); in af_cjk_metrics_init_widths()
139 glyph_index = af_shaper_get_elem( &metrics->root, in af_cjk_metrics_init_widths()
165 dummy->units_per_em = metrics->units_per_em; in af_cjk_metrics_init_widths()
184 AF_CJKAxis axis = &metrics->axis[dim]; in af_cjk_metrics_init_widths()
[all …]
Dafglobal.c396 if ( globals->metrics[nn] ) in af_face_globals_free()
405 writing_system_class->style_metrics_done( globals->metrics[nn] ); in af_face_globals_free()
407 FT_FREE( globals->metrics[nn] ); in af_face_globals_free()
441 AF_StyleMetrics metrics = NULL; in af_face_globals_get_metrics() local
466 metrics = globals->metrics[style]; in af_face_globals_get_metrics()
467 if ( metrics == NULL ) in af_face_globals_get_metrics()
473 if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) ) in af_face_globals_get_metrics()
476 metrics->style_class = style_class; in af_face_globals_get_metrics()
477 metrics->globals = globals; in af_face_globals_get_metrics()
481 error = writing_system_class->style_metrics_init( metrics, in af_face_globals_get_metrics()
[all …]
/external/freetype/src/sfnt/
Dttsbit.c240 FT_Size_Metrics* metrics ) in tt_face_load_strike_metrics() argument
257 metrics->x_ppem = (FT_UShort)strike[44]; in tt_face_load_strike_metrics()
258 metrics->y_ppem = (FT_UShort)strike[45]; in tt_face_load_strike_metrics()
260 metrics->ascender = (FT_Char)strike[16] * 64; /* hori.ascender */ in tt_face_load_strike_metrics()
261 metrics->descender = (FT_Char)strike[17] * 64; /* hori.descender */ in tt_face_load_strike_metrics()
273 if ( metrics->descender > 0 ) in tt_face_load_strike_metrics()
277 metrics->descender = -metrics->descender; in tt_face_load_strike_metrics()
280 else if ( metrics->descender == 0 ) in tt_face_load_strike_metrics()
282 if ( metrics->ascender == 0 ) in tt_face_load_strike_metrics()
288 metrics->x_ppem, metrics->y_ppem )); in tt_face_load_strike_metrics()
[all …]
/external/pdfium/third_party/freetype/src/cid/
Dcidgload.c172 FT_Incremental_MetricsRec metrics; in cid_load_glyph() local
175 metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x ); in cid_load_glyph()
176 metrics.bearing_y = 0; in cid_load_glyph()
177 metrics.advance = FIXED_TO_INT( decoder->builder.advance.x ); in cid_load_glyph()
178 metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y ); in cid_load_glyph()
181 glyph_index, FALSE, &metrics ); in cid_load_glyph()
183 decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x ); in cid_load_glyph()
184 decoder->builder.advance.x = INT_TO_FIXED( metrics.advance ); in cid_load_glyph()
185 decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v ); in cid_load_glyph()
294 glyph->x_scale = cidsize->metrics.x_scale; in cid_slot_load_glyph()
[all …]
/external/lldb/examples/summaries/cocoa/
Dmetrics.py46 def __init__(self,metrics): argument
47 self.metrics = metrics
50 for key,value in self.metrics.metrics.items():
55 def __init__(self,metrics): argument
56 self.metrics = metrics
59 for key,value in self.metrics.metrics.items():
65 self.metrics = {}
68 self.metrics[name] = Counter()
71 self.metrics[metric].update(trigger)
74 return self.metrics[key]
[all …]
/external/pdfium/third_party/freetype/src/type1/
Dt1gload.c102 FT_Incremental_MetricsRec metrics; in T1_Parse_Glyph_And_Get_Char_String() local
105 metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x ); in T1_Parse_Glyph_And_Get_Char_String()
106 metrics.bearing_y = 0; in T1_Parse_Glyph_And_Get_Char_String()
107 metrics.advance = FIXED_TO_INT( decoder->builder.advance.x ); in T1_Parse_Glyph_And_Get_Char_String()
108 metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y ); in T1_Parse_Glyph_And_Get_Char_String()
111 glyph_index, FALSE, &metrics ); in T1_Parse_Glyph_And_Get_Char_String()
113 decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x ); in T1_Parse_Glyph_And_Get_Char_String()
114 decoder->builder.advance.x = INT_TO_FIXED( metrics.advance ); in T1_Parse_Glyph_And_Get_Char_String()
115 decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v ); in T1_Parse_Glyph_And_Get_Char_String()
312 glyph->x_scale = t1size->metrics.x_scale; in T1_Load_Glyph()
[all …]
/external/pdfium/third_party/freetype/src/sfnt/
Dttsbit.c239 FT_Size_Metrics* metrics ) in tt_face_load_strike_metrics() argument
254 metrics->x_ppem = (FT_UShort)strike[44]; in tt_face_load_strike_metrics()
255 metrics->y_ppem = (FT_UShort)strike[45]; in tt_face_load_strike_metrics()
257 metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */ in tt_face_load_strike_metrics()
258 metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */ in tt_face_load_strike_metrics()
259 metrics->height = metrics->ascender - metrics->descender; in tt_face_load_strike_metrics()
262 metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB */ in tt_face_load_strike_metrics()
305 metrics->x_ppem = ppem; in tt_face_load_strike_metrics()
306 metrics->y_ppem = ppem; in tt_face_load_strike_metrics()
308 metrics->ascender = ppem * hori->Ascender * 64 / upem; in tt_face_load_strike_metrics()
[all …]
/external/freetype/src/base/
Dftobjs.c355 FT_ZERO( &slot->metrics ); in ft_glyphslot_clear()
562 FT_Glyph_Metrics* metrics = &slot->metrics; in ft_glyphslot_grid_fit_metrics() local
568 metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX ); in ft_glyphslot_grid_fit_metrics()
569 metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY ); in ft_glyphslot_grid_fit_metrics()
571 right = FT_PIX_CEIL( metrics->vertBearingX + metrics->width ); in ft_glyphslot_grid_fit_metrics()
572 bottom = FT_PIX_CEIL( metrics->vertBearingY + metrics->height ); in ft_glyphslot_grid_fit_metrics()
574 metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX ); in ft_glyphslot_grid_fit_metrics()
575 metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY ); in ft_glyphslot_grid_fit_metrics()
577 metrics->width = right - metrics->vertBearingX; in ft_glyphslot_grid_fit_metrics()
578 metrics->height = bottom - metrics->vertBearingY; in ft_glyphslot_grid_fit_metrics()
[all …]
/external/pdfium/third_party/freetype/src/base/
Dftobjs.c344 FT_ZERO( &slot->metrics ); in ft_glyphslot_clear()
551 FT_Glyph_Metrics* metrics = &slot->metrics; in ft_glyphslot_grid_fit_metrics() local
557 metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX ); in ft_glyphslot_grid_fit_metrics()
558 metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY ); in ft_glyphslot_grid_fit_metrics()
560 right = FT_PIX_CEIL( metrics->vertBearingX + metrics->width ); in ft_glyphslot_grid_fit_metrics()
561 bottom = FT_PIX_CEIL( metrics->vertBearingY + metrics->height ); in ft_glyphslot_grid_fit_metrics()
563 metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX ); in ft_glyphslot_grid_fit_metrics()
564 metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY ); in ft_glyphslot_grid_fit_metrics()
566 metrics->width = right - metrics->vertBearingX; in ft_glyphslot_grid_fit_metrics()
567 metrics->height = bottom - metrics->vertBearingY; in ft_glyphslot_grid_fit_metrics()
[all …]
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DDisplayTest.java28 DisplayMetrics metrics = new DisplayMetrics(); in shouldProvideDisplayMetrics() local
30 display.getMetrics(metrics); in shouldProvideDisplayMetrics()
32 assertEquals(1.5f, metrics.density, 0.05); in shouldProvideDisplayMetrics()
33 assertEquals(DisplayMetrics.DENSITY_MEDIUM, metrics.densityDpi); in shouldProvideDisplayMetrics()
34 assertEquals(1.6f, metrics.scaledDensity, 0.05); in shouldProvideDisplayMetrics()
35 assertEquals(1024, metrics.widthPixels); in shouldProvideDisplayMetrics()
36 assertEquals(600, metrics.heightPixels); in shouldProvideDisplayMetrics()
37 assertEquals(183.0f, metrics.xdpi, 0.05); in shouldProvideDisplayMetrics()
38 assertEquals(184.0f, metrics.ydpi, 0.05); in shouldProvideDisplayMetrics()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowTypedValue.java47 public static float complexToDimension(int data, DisplayMetrics metrics) in complexToDimension() argument
52 metrics); in complexToDimension()
57 DisplayMetrics metrics) in complexToDimensionPixelOffset() argument
62 metrics); in complexToDimensionPixelOffset()
67 DisplayMetrics metrics) in complexToDimensionPixelSize() argument
73 metrics); in complexToDimensionPixelSize()
82 public static float complexToDimensionNoisy(int data, DisplayMetrics metrics) in complexToDimensionNoisy() argument
84 float res = complexToDimension(data, metrics); in complexToDimensionNoisy()
97 public static float applyDimension(int unit, float value, DisplayMetrics metrics) { in applyDimension() argument
102 return value * metrics.density; in applyDimension()
[all …]
/external/skia/src/fonts/
DSkTestScalerContext.cpp125 void SkTestTypeface::getFontMetrics(SkPaint::FontMetrics* metrics) { in getFontMetrics() argument
126 *metrics = fTestFont->fMetrics; in getFontMetrics()
272 void generateFontMetrics(SkPaint::FontMetrics* metrics) override { in generateFontMetrics() argument
273 fFace->getFontMetrics(metrics); in generateFontMetrics()
274 if (metrics) { in generateFontMetrics()
276 metrics->fTop = SkScalarMul(metrics->fTop, scale); in generateFontMetrics()
277 metrics->fAscent = SkScalarMul(metrics->fAscent, scale); in generateFontMetrics()
278 metrics->fDescent = SkScalarMul(metrics->fDescent, scale); in generateFontMetrics()
279 metrics->fBottom = SkScalarMul(metrics->fBottom, scale); in generateFontMetrics()
280 metrics->fLeading = SkScalarMul(metrics->fLeading, scale); in generateFontMetrics()
[all …]
DSkGScalerContext.cpp140 void SkGScalerContext::generateFontMetrics(SkPaint::FontMetrics* metrics) { in generateFontMetrics() argument
141 fProxy->getFontMetrics(metrics); in generateFontMetrics()
142 if (metrics) { in generateFontMetrics()
144 metrics->fTop = SkScalarMul(metrics->fTop, scale); in generateFontMetrics()
145 metrics->fAscent = SkScalarMul(metrics->fAscent, scale); in generateFontMetrics()
146 metrics->fDescent = SkScalarMul(metrics->fDescent, scale); in generateFontMetrics()
147 metrics->fBottom = SkScalarMul(metrics->fBottom, scale); in generateFontMetrics()
148 metrics->fLeading = SkScalarMul(metrics->fLeading, scale); in generateFontMetrics()
149 metrics->fAvgCharWidth = SkScalarMul(metrics->fAvgCharWidth, scale); in generateFontMetrics()
150 metrics->fXMin = SkScalarMul(metrics->fXMin, scale); in generateFontMetrics()
[all …]
/external/pdfium/third_party/freetype/src/truetype/
Dttobjs.c780 FT_Size_Metrics* metrics = &exec->metrics; in tt_size_run_fpgm() local
784 metrics->x_ppem = 0; in tt_size_run_fpgm()
785 metrics->y_ppem = 0; in tt_size_run_fpgm()
786 metrics->x_scale = 0; in tt_size_run_fpgm()
787 metrics->y_scale = 0; in tt_size_run_fpgm()
993 TT_Size_Metrics* metrics = &size->ttmetrics; in tt_size_init_bytecode() local
996 metrics->rotated = FALSE; in tt_size_init_bytecode()
997 metrics->stretched = FALSE; in tt_size_init_bytecode()
1000 metrics->compensations[0] = 0; /* gray */ in tt_size_init_bytecode()
1001 metrics->compensations[1] = 0; /* black */ in tt_size_init_bytecode()
[all …]
Dttgload.c192 FT_Incremental_MetricsRec metrics; in tt_get_metrics_incr_overrides() local
196 metrics.bearing_x = loader->left_bearing; in tt_get_metrics_incr_overrides()
197 metrics.bearing_y = 0; in tt_get_metrics_incr_overrides()
198 metrics.advance = loader->advance; in tt_get_metrics_incr_overrides()
199 metrics.advance_v = 0; in tt_get_metrics_incr_overrides()
203 glyph_index, FALSE, &metrics ); in tt_get_metrics_incr_overrides()
207 left_bearing = (FT_Short)metrics.bearing_x; in tt_get_metrics_incr_overrides()
208 advance_width = (FT_UShort)metrics.advance; in tt_get_metrics_incr_overrides()
213 metrics.bearing_x = 0; in tt_get_metrics_incr_overrides()
214 metrics.bearing_y = loader->top_bearing; in tt_get_metrics_incr_overrides()
[all …]
/external/freetype/src/truetype/
Dttobjs.c822 FT_Size_Metrics* metrics = &exec->metrics; in tt_size_run_fpgm() local
826 metrics->x_ppem = 0; in tt_size_run_fpgm()
827 metrics->y_ppem = 0; in tt_size_run_fpgm()
828 metrics->x_scale = 0; in tt_size_run_fpgm()
829 metrics->y_scale = 0; in tt_size_run_fpgm()
1035 TT_Size_Metrics* metrics = &size->ttmetrics; in tt_size_init_bytecode() local
1038 metrics->rotated = FALSE; in tt_size_init_bytecode()
1039 metrics->stretched = FALSE; in tt_size_init_bytecode()
1042 metrics->compensations[0] = 0; /* gray */ in tt_size_init_bytecode()
1043 metrics->compensations[1] = 0; /* black */ in tt_size_init_bytecode()
[all …]
Dttgload.c197 FT_Incremental_MetricsRec metrics; in tt_get_metrics_incr_overrides() local
201 metrics.bearing_x = loader->left_bearing; in tt_get_metrics_incr_overrides()
202 metrics.bearing_y = 0; in tt_get_metrics_incr_overrides()
203 metrics.advance = loader->advance; in tt_get_metrics_incr_overrides()
204 metrics.advance_v = 0; in tt_get_metrics_incr_overrides()
208 glyph_index, FALSE, &metrics ); in tt_get_metrics_incr_overrides()
212 left_bearing = (FT_Short)metrics.bearing_x; in tt_get_metrics_incr_overrides()
213 advance_width = (FT_UShort)metrics.advance; in tt_get_metrics_incr_overrides()
218 metrics.bearing_x = 0; in tt_get_metrics_incr_overrides()
219 metrics.bearing_y = loader->top_bearing; in tt_get_metrics_incr_overrides()
[all …]
/external/webrtc/src/modules/audio_processing/
Decho_cancellation_impl.cc240 int EchoCancellationImpl::GetMetrics(Metrics* metrics) { in GetMetrics() argument
242 if (metrics == NULL) { in GetMetrics()
252 memset(metrics, 0, sizeof(Metrics)); in GetMetrics()
260 metrics->residual_echo_return_loss.instant = my_metrics.rerl.instant; in GetMetrics()
261 metrics->residual_echo_return_loss.average = my_metrics.rerl.average; in GetMetrics()
262 metrics->residual_echo_return_loss.maximum = my_metrics.rerl.max; in GetMetrics()
263 metrics->residual_echo_return_loss.minimum = my_metrics.rerl.min; in GetMetrics()
265 metrics->echo_return_loss.instant = my_metrics.erl.instant; in GetMetrics()
266 metrics->echo_return_loss.average = my_metrics.erl.average; in GetMetrics()
267 metrics->echo_return_loss.maximum = my_metrics.erl.max; in GetMetrics()
[all …]
/external/skia/src/ports/
DSkScalerContext_win_dw.cpp469 void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* metrics) { in generateFontMetrics() argument
470 if (NULL == metrics) { in generateFontMetrics()
474 sk_bzero(metrics, sizeof(*metrics)); in generateFontMetrics()
491 metrics->fAscent = -fTextSizeRender * SkIntToScalar(dwfm.ascent) / upem; in generateFontMetrics()
492 metrics->fDescent = fTextSizeRender * SkIntToScalar(dwfm.descent) / upem; in generateFontMetrics()
493 metrics->fLeading = fTextSizeRender * SkIntToScalar(dwfm.lineGap) / upem; in generateFontMetrics()
494 metrics->fXHeight = fTextSizeRender * SkIntToScalar(dwfm.xHeight) / upem; in generateFontMetrics()
495 metrics->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem; in generateFontMetrics()
496 metrics->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem); in generateFontMetrics()
498 metrics->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; in generateFontMetrics()
[all …]

12345678