219 {
221
227
231 FT_UInt style_options = AF_STYLE_NONE_DFLT;
234
235#ifdef FT_CONFIG_OPTION_PIC
237#endif
238
239
241 return FT_THROW( Invalid_Size_Handle );
242
244
247 {
248
249
250
251
254
255#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS
256 {
258
259
260
261
262
272
274 face->units_per_EM );
276 face->units_per_EM );
280 }
281#endif
282 }
283
284
285
286
287
288
289
290
291
292
298
301
302
303
307
308#ifdef FT_OPTION_AUTOFIT2
309
310 if ( load_flags & ( 1UL << 20 ) )
311 style_options = AF_STYLE_LTN2_DFLT;
312#endif
313
314
315
316
317
318
319
321 style_options, &style_metrics );
324
326 writing_system_class =
328
329 loader->metrics = style_metrics;
330
333 else
334 style_metrics->
scaler = scaler;
335
337 {
339 style_metrics );
342 }
343
344
345
346
347
348
349
350
354 load_flags &= ~FT_LOAD_RENDER;
355
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
386 ( !
face->internal->no_stem_darkening ||
387 (
face->internal->no_stem_darkening < 0 &&
388 !
module->no_stem_darkening ) ) )
390
392 if ( loader->transformed )
393 {
395
396
399
400 inverse = loader->trans_matrix;
403 }
404
405 switch (
slot->format )
406 {
408
409 if ( loader->transformed )
411 loader->trans_delta.x,
412 loader->trans_delta.y );
413
414
415
416 loader->pp1.x =
hints->x_delta;
417 loader->pp1.y =
hints->y_delta;
420 loader->pp2.y =
hints->y_delta;
421
422
423 if (
slot->outline.n_points == 0 )
424 goto Hint_Metrics;
425
426
427
432 style_metrics );
433
434
435
437 {
438 FT_Pos old_rsb, old_lsb, new_lsb;
440
445
446
448 {
449 old_rsb = loader->pp2.x - edge2->
opos;
450
451 old_lsb = edge1->
opos ;
452 new_lsb = edge1->
pos;
453
454
455
456 pp1x_uh = new_lsb - old_lsb;
457 pp2x_uh = edge2->
pos + old_rsb;
458
459
460
461
462 if ( old_lsb < 24 )
463 pp1x_uh -= 8;
464
465 if ( old_rsb < 24 )
466 pp2x_uh += 8;
467
470
471 if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
472 loader->pp1.x -= 64;
473
474 if ( loader->pp2.x <= edge2->
pos && old_rsb > 0 )
475 loader->pp2.x += 64;
476
477 slot->lsb_delta = loader->pp1.x - pp1x_uh;
478 slot->rsb_delta = loader->pp2.x - pp2x_uh;
479 }
480 else
481 {
482 FT_Pos pp1x = loader->pp1.x;
483 FT_Pos pp2x = loader->pp2.x;
484
485
488
489 slot->lsb_delta = loader->pp1.x - pp1x;
490 slot->rsb_delta = loader->pp2.x - pp2x;
491 }
492 }
493
494
495 else
496 {
497 FT_Pos pp1x = loader->pp1.x;
498 FT_Pos pp2x = loader->pp2.x;
499
500
503
504 slot->lsb_delta = loader->pp1.x - pp1x;
505 slot->rsb_delta = loader->pp2.x - pp2x;
506 }
507
508 break;
509
510 default:
511
513 }
514
515 Hint_Metrics:
516 {
519
520
521 vvector.
x =
slot->metrics.vertBearingX -
slot->metrics.horiBearingX;
522 vvector.
y =
slot->metrics.vertBearingY -
slot->metrics.horiBearingY;
525
526
527 if ( loader->transformed )
528 {
531 }
532
533
534
535 if ( loader->pp1.x )
537
539
544
549
552
553
554
555
560 {
561 slot->metrics.horiAdvance =
564
565
566
569 }
570 else
571 {
572
573 if (
slot->metrics.horiAdvance )
574 slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
575 }
576
579
582
584 }
585
588 }
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)
#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)
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
#define FT_LOAD_IGNORE_TRANSFORM
#define FT_IS_FIXED_WIDTH(face)
#define FT_LOAD_LINEAR_DESIGN
FT_Matrix_Invert(FT_Matrix *matrix)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
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
FT_Bool digits_have_same_width
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