218 {
220
226
230 FT_UInt style_options = AF_STYLE_NONE_DFLT;
233
234
236 return FT_THROW( Invalid_Size_Handle );
237
239
242 {
243
244
245
246
249
250#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS
251 {
253
254
255
256
257
267
269 face->units_per_EM );
271 face->units_per_EM );
275 }
276#endif
277 }
278
279
280
281
282
283
284
285
286
287
293
296
297
298
302
303#ifdef FT_OPTION_AUTOFIT2
304
305 if ( load_flags & ( 1UL << 20 ) )
306 style_options = AF_STYLE_LTN2_DFLT;
307#endif
308
309
310
311
312
313
314
316 style_options, &style_metrics );
319
321 writing_system_class =
323
324 loader->metrics = style_metrics;
325
328 else
329 style_metrics->
scaler = scaler;
330
332 {
334 style_metrics );
337 }
338
339
340
341
342
343
344
345
349 load_flags &= ~FT_LOAD_RENDER;
350
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
381 ( !
face->internal->no_stem_darkening ||
382 (
face->internal->no_stem_darkening < 0 &&
383 !
module->no_stem_darkening ) ) )
385
387 if ( loader->transformed )
388 {
390
391
394
395 inverse = loader->trans_matrix;
398 }
399
400 switch (
slot->format )
401 {
403
404 if ( loader->transformed )
406 loader->trans_delta.x,
407 loader->trans_delta.y );
408
409
410
411 loader->pp1.x =
hints->x_delta;
412 loader->pp1.y =
hints->y_delta;
415 loader->pp2.y =
hints->y_delta;
416
417
418 if (
slot->outline.n_points == 0 )
419 goto Hint_Metrics;
420
421
422
424 {
426 glyph_index,
429 style_metrics );
432 }
433
434
435
437 {
439
440
442 {
446
448
451
452
453
454 FT_Pos pp1x_uh = new_lsb - old_lsb;
456
457
458
459
460
461 if ( old_lsb < 24 )
462 pp1x_uh -= 8;
463
464 if ( old_rsb < 24 )
465 pp2x_uh += 8;
466
469
470 if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
471 loader->pp1.x -= 64;
472
473 if ( loader->pp2.x <= edge2->
pos && old_rsb > 0 )
474 loader->pp2.x += 64;
475
476 slot->lsb_delta = loader->pp1.x - pp1x_uh;
477 slot->rsb_delta = loader->pp2.x - pp2x_uh;
478 }
479 else
480 {
481 FT_Pos pp1x = loader->pp1.x;
482 FT_Pos pp2x = loader->pp2.x;
483
484
487
488 slot->lsb_delta = loader->pp1.x - pp1x;
489 slot->rsb_delta = loader->pp2.x - pp2x;
490 }
491 }
492
493
494 else
495 {
496 FT_Pos pp1x = loader->pp1.x;
497 FT_Pos pp2x = loader->pp2.x;
498
499
502
503 slot->lsb_delta = loader->pp1.x - pp1x;
504 slot->rsb_delta = loader->pp2.x - pp2x;
505 }
506
507 break;
508
509 default:
510
512 }
513
514 Hint_Metrics:
515 {
518
519
520 vvector.
x =
slot->metrics.vertBearingX -
slot->metrics.horiBearingX;
521 vvector.
y =
slot->metrics.vertBearingY -
slot->metrics.horiBearingY;
524
525
526 if ( loader->transformed )
527 {
530 }
531
532
533
534 if ( loader->pp1.x )
536
538
543
548
551
552
553
554
559 {
560 slot->metrics.horiAdvance =
563
564
565
568 }
569 else
570 {
571
572 if (
slot->metrics.horiAdvance )
573 slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
574 }
575
578
581
583 }
584
587 }
af_face_globals_is_digit(AF_FaceGlobals globals, FT_UInt gindex)
af_face_globals_get_metrics(AF_FaceGlobals globals, FT_UInt gindex, FT_UInt options, AF_StyleMetrics *ametrics)
af_writing_system_classes[]
#define AF_HINTS_DO_ADVANCE(h)
static FT_Error af_loader_embolden_glyph_in_slot(AF_Loader loader, FT_Face face, AF_StyleMetrics style_metrics)
af_loader_reset(AF_Loader loader, AF_Module module, FT_Face face)
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
#define FT_LOAD_TARGET_MODE(x)
#define FT_LOAD_IGNORE_TRANSFORM
#define FT_IS_FIXED_WIDTH(face)
FT_Vector_Transform(FT_Vector *vector, const FT_Matrix *matrix)
#define FT_LOAD_LINEAR_DESIGN
FT_Matrix_Invert(FT_Matrix *matrix)
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
FT_Render_Mode render_mode
AF_WritingSystem writing_system
FT_Bool digits_have_same_width
AF_StyleClass style_class
AF_WritingSystem_InitHintsFunc style_hints_init
AF_WritingSystem_ScaleMetricsFunc style_metrics_scale
AF_WritingSystem_ApplyHintsFunc style_hints_apply
FT_Size_Metrics autohint_metrics
FT_Render_Mode autohint_mode
FT_Bool glyph_transformed