View | Details | Raw Unified | Return to bug 157441
Collapse All | Expand All

(-)src/autofit/afcjk.c-dist (+4 lines)
Lines 44-49 af_cjk_hints_init(AF_GlyphHints hints, A Link Here
44
		hints->other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
44
		hints->other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
45
	if (mode == FT_RENDER_MODE_MONO)
45
	if (mode == FT_RENDER_MODE_MONO)
46
		hints->other_flags |= AF_LATIN_HINTS_MONO;
46
		hints->other_flags |= AF_LATIN_HINTS_MONO;
47
48
	/* fixed pitch is preferred for CJK glyphs */
49
	metrics->scaler.is_fixed = 1;
50
47
	return 0;
51
	return 0;
48
}
52
}
49
53
(-)src/autofit/afloader.c-dist (-9 / +2 lines)
Lines 402-420 Link Here
402
402
403
      /* for mono-width fonts (like Andale, Courier, etc.) we need */
403
      /* for mono-width fonts (like Andale, Courier, etc.) we need */
404
      /* to keep the original rounded advance width                */
404
      /* to keep the original rounded advance width                */
405
#if 0
405
      if ( ! metrics->scaler.is_fixed )
406
      if ( !FT_IS_FIXED_WIDTH( slot->face ) )
407
        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
408
      else
409
        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
410
                                               x_scale );
411
#else
412
      if ( !FT_IS_FIXED_WIDTH( slot->face ) )
413
        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
406
        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
414
      else
407
      else
415
        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
408
        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
416
                                               metrics->scaler.x_scale );
409
                                               metrics->scaler.x_scale );
417
#endif
418
410
419
      slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
411
      slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
420
412
Lines 461-466 Link Here
461
453
462
    scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
454
    scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
463
    scaler.flags       = 0;  /* XXX: fix this */
455
    scaler.flags       = 0;  /* XXX: fix this */
456
    scaler.is_fixed = FT_IS_FIXED_WIDTH( face ) != 0;
464
457
465
    error = af_loader_reset( loader, face );
458
    error = af_loader_reset( loader, face );
466
    if ( !error )
459
    if ( !error )
(-)src/autofit/aftypes.h-dist (+1 lines)
Lines 196-201 FT_BEGIN_HEADER Link Here
196
    FT_Pos          y_delta;     /* in 1/64th device pixels                 */
196
    FT_Pos          y_delta;     /* in 1/64th device pixels                 */
197
    FT_Render_Mode  render_mode; /* monochrome, anti-aliased, LCD, etc.     */
197
    FT_Render_Mode  render_mode; /* monochrome, anti-aliased, LCD, etc.     */
198
    FT_UInt32       flags;       /* additional control flags, see above     */
198
    FT_UInt32       flags;       /* additional control flags, see above     */
199
    FT_Bool         is_fixed;    /* is fixed pitch?                         */
199
200
200
  } AF_ScalerRec, *AF_Scaler;
201
  } AF_ScalerRec, *AF_Scaler;
201
202

Return to bug 157441