... |
... |
@@ -443,7 +443,7 @@ |
443
|
443
|
int start_x = 18 * 8;
|
444
|
444
|
int start_y = size->metrics.y_ppem * 4 / 5 + HEADER_HEIGHT * 3;
|
445
|
445
|
int step_y = size->metrics.y_ppem + 10;
|
446
|
|
- int x, y, i;
|
|
446
|
+ int x, y, w, i;
|
447
|
447
|
|
448
|
448
|
const unsigned char* p;
|
449
|
449
|
|
... |
... |
@@ -478,11 +478,8 @@ |
478
|
478
|
}
|
479
|
479
|
#endif
|
480
|
480
|
|
481
|
|
- Render_Glyph( x, y );
|
482
|
|
-
|
483
|
|
- x += ( ( glyph->metrics.horiAdvance + 32 ) >> 6 ) + 1;
|
484
|
|
-
|
485
|
|
- if ( x + size->metrics.x_ppem > bit->width )
|
|
481
|
+ w = ( ( glyph->metrics.horiAdvance + 32 ) >> 6 ) + 1;
|
|
482
|
+ if ( x + w > bit->width - 4 )
|
486
|
483
|
{
|
487
|
484
|
x = start_x;
|
488
|
485
|
y += step_y;
|
... |
... |
@@ -490,6 +487,9 @@ |
490
|
487
|
if ( y >= bit->rows - size->metrics.y_ppem / 5 )
|
491
|
488
|
return FT_Err_Ok;
|
492
|
489
|
}
|
|
490
|
+
|
|
491
|
+ Render_Glyph( x, y );
|
|
492
|
+ x += w;
|
493
|
493
|
}
|
494
|
494
|
else
|
495
|
495
|
Fail++;
|
... |
... |
@@ -734,53 +734,53 @@ |
734
|
734
|
/* scaling related keys */
|
735
|
735
|
|
736
|
736
|
case grKeyPageUp:
|
737
|
|
- i = 10;
|
|
737
|
+ ptsize += 10;
|
738
|
738
|
goto Do_Scale;
|
739
|
739
|
|
740
|
740
|
case grKeyPageDown:
|
741
|
|
- i = -10;
|
|
741
|
+ ptsize -= 10;
|
742
|
742
|
goto Do_Scale;
|
743
|
743
|
|
744
|
744
|
case grKeyUp:
|
745
|
|
- i = 1;
|
|
745
|
+ ptsize++;
|
746
|
746
|
goto Do_Scale;
|
747
|
747
|
|
748
|
748
|
case grKeyDown:
|
749
|
|
- i = -1;
|
|
749
|
+ ptsize--;
|
750
|
750
|
goto Do_Scale;
|
751
|
751
|
|
752
|
752
|
/* glyph index related keys */
|
753
|
753
|
|
754
|
754
|
case grKeyLeft:
|
755
|
|
- i = -1;
|
|
755
|
+ Num--;
|
756
|
756
|
goto Do_Glyph;
|
757
|
757
|
|
758
|
758
|
case grKeyRight:
|
759
|
|
- i = 1;
|
|
759
|
+ Num++;
|
760
|
760
|
goto Do_Glyph;
|
761
|
761
|
|
762
|
762
|
case grKeyF7:
|
763
|
|
- i = -16;
|
|
763
|
+ Num -= 16;
|
764
|
764
|
goto Do_Glyph;
|
765
|
765
|
|
766
|
766
|
case grKeyF8:
|
767
|
|
- i = 16;
|
|
767
|
+ Num += 16;
|
768
|
768
|
goto Do_Glyph;
|
769
|
769
|
|
770
|
770
|
case grKeyF9:
|
771
|
|
- i = -256;
|
|
771
|
+ Num -= 256;
|
772
|
772
|
goto Do_Glyph;
|
773
|
773
|
|
774
|
774
|
case grKeyF10:
|
775
|
|
- i = 256;
|
|
775
|
+ Num += 256;
|
776
|
776
|
goto Do_Glyph;
|
777
|
777
|
|
778
|
778
|
case grKeyF11:
|
779
|
|
- i = -4096;
|
|
779
|
+ Num -= 4096;
|
780
|
780
|
goto Do_Glyph;
|
781
|
781
|
|
782
|
782
|
case grKeyF12:
|
783
|
|
- i = 4096;
|
|
783
|
+ Num += 4096;
|
784
|
784
|
goto Do_Glyph;
|
785
|
785
|
|
786
|
786
|
default:
|
... |
... |
@@ -798,17 +798,11 @@ |
798
|
798
|
|
799
|
799
|
/* convert to real axis index */
|
800
|
800
|
axis = (unsigned int)shown_axes[axis];
|
|
801
|
+ a = multimaster->axis + axis;
|
801
|
802
|
|
802
|
|
- a = multimaster->axis + axis;
|
803
|
803
|
rng = a->maximum - a->minimum;
|
804
|
804
|
pos = design_pos[axis];
|
805
|
805
|
|
806
|
|
- /*
|
807
|
|
- * Normalize i. Changing by 20 is all very well for PostScript fonts,
|
808
|
|
- * which tend to have a range of ~1000 per axis, but it's not useful
|
809
|
|
- * for mac fonts, which have a range of ~3. And it's rather extreme
|
810
|
|
- * for optical size even in PS.
|
811
|
|
- */
|
812
|
806
|
pos += (FT_Fixed)( i * rng );
|
813
|
807
|
if ( pos < a->minimum )
|
814
|
808
|
pos = a->maximum;
|
... |
... |
@@ -850,7 +844,6 @@ |
850
|
844
|
return 1;
|
851
|
845
|
|
852
|
846
|
Do_Scale:
|
853
|
|
- ptsize += i;
|
854
|
847
|
if ( ptsize < 1 )
|
855
|
848
|
ptsize = 1;
|
856
|
849
|
if ( ptsize > MAXPTSIZE )
|
... |
... |
@@ -858,7 +851,6 @@ |
858
|
851
|
return 1;
|
859
|
852
|
|
860
|
853
|
Do_Glyph:
|
861
|
|
- Num += i;
|
862
|
854
|
if ( Num < 0 )
|
863
|
855
|
Num = 0;
|
864
|
856
|
if ( Num >= num_glyphs )
|
... |
... |
@@ -1087,12 +1079,15 @@ |
1087
|
1079
|
|
1088
|
1080
|
for ( n = 0; n < used_num_axis; n++ )
|
1089
|
1081
|
{
|
|
1082
|
+ FT_Var_Axis* a = multimaster->axis + n;
|
|
1083
|
+
|
|
1084
|
+
|
1090
|
1085
|
design_pos[n] = n < requested_cnt ? requested_pos[n]
|
1091
|
|
- : multimaster->axis[n].def;
|
1092
|
|
- if ( design_pos[n] < multimaster->axis[n].minimum )
|
1093
|
|
- design_pos[n] = multimaster->axis[n].minimum;
|
1094
|
|
- else if ( design_pos[n] > multimaster->axis[n].maximum )
|
1095
|
|
- design_pos[n] = multimaster->axis[n].maximum;
|
|
1086
|
+ : a->def;
|
|
1087
|
+ if ( design_pos[n] < a->minimum )
|
|
1088
|
+ design_pos[n] = a->minimum;
|
|
1089
|
+ else if ( design_pos[n] > a->maximum )
|
|
1090
|
+ design_pos[n] = a->maximum;
|
1096
|
1091
|
|
1097
|
1092
|
/* for MM fonts, round the design coordinates to integers */
|
1098
|
1093
|
if ( !FT_IS_SFNT( face ) )
|