cairo 1.15.13-x86-mingw32 → 1.15.14-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +24 -0
  3. data/README.rdoc +11 -40
  4. data/Rakefile +4 -2
  5. data/ext/cairo/rb_cairo.h +1 -1
  6. data/ext/cairo/rb_cairo_context.c +35 -3
  7. data/ext/cairo/rb_cairo_font_options.c +5 -6
  8. data/ext/cairo/rb_cairo_private.h +2 -2
  9. data/ext/cairo/rb_cairo_scaled_font.c +11 -2
  10. data/ext/cairo/rb_cairo_surface.c +89 -48
  11. data/lib/2.2/cairo.so +0 -0
  12. data/lib/2.3/cairo.so +0 -0
  13. data/lib/2.4/cairo.so +0 -0
  14. data/lib/2.5/cairo.so +0 -0
  15. data/test/{cairo-test-utils.rb → helper.rb} +4 -5
  16. data/test/run-test.rb +3 -10
  17. data/test/test_context.rb +6 -6
  18. data/test/test_font_extents.rb +1 -1
  19. data/test/test_font_face.rb +1 -1
  20. data/test/test_font_options.rb +1 -1
  21. data/test/test_image_surface.rb +2 -2
  22. data/test/test_pdf_surface.rb +1 -1
  23. data/test/test_quartz_image_surface.rb +1 -1
  24. data/test/test_raster_source_pattern.rb +13 -13
  25. data/test/test_recording_surface.rb +2 -2
  26. data/test/test_region.rb +1 -1
  27. data/test/test_scaled_font.rb +1 -1
  28. data/test/test_script_device.rb +1 -1
  29. data/test/test_script_surface.rb +1 -1
  30. data/test/test_surface.rb +5 -5
  31. data/test/test_svg_surface.rb +1 -1
  32. data/test/test_tee_surface.rb +2 -2
  33. data/test/test_text_cluster.rb +1 -1
  34. data/test/test_text_extents.rb +1 -1
  35. data/test/test_text_to_glyphs_data.rb +1 -1
  36. data/test/test_xml_device.rb +1 -1
  37. data/test/test_xml_surface.rb +2 -2
  38. data/vendor/local/bin/fc-cache.exe +0 -0
  39. data/vendor/local/bin/fc-cat.exe +0 -0
  40. data/vendor/local/bin/fc-conflist.exe +0 -0
  41. data/vendor/local/bin/fc-list.exe +0 -0
  42. data/vendor/local/bin/fc-match.exe +0 -0
  43. data/vendor/local/bin/fc-pattern.exe +0 -0
  44. data/vendor/local/bin/fc-query.exe +0 -0
  45. data/vendor/local/bin/fc-scan.exe +0 -0
  46. data/vendor/local/bin/fc-validate.exe +0 -0
  47. data/vendor/local/bin/libcairo-2.dll +0 -0
  48. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  49. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  50. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  51. data/vendor/local/bin/libfreetype-6.dll +0 -0
  52. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  53. data/vendor/local/bin/libpng-config +1 -1
  54. data/vendor/local/bin/libpng16-16.dll +0 -0
  55. data/vendor/local/bin/libpng16-config +1 -1
  56. data/vendor/local/bin/libxml2-2.dll +0 -0
  57. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  58. data/vendor/local/bin/pngfix.exe +0 -0
  59. data/vendor/local/bin/xmlcatalog.exe +0 -0
  60. data/vendor/local/bin/xmllint.exe +0 -0
  61. data/vendor/local/bin/zlib1211.dll +0 -0
  62. data/vendor/local/include/freetype2/freetype/config/ftconfig.h +82 -3
  63. data/vendor/local/include/freetype2/freetype/config/ftheader.h +43 -85
  64. data/vendor/local/include/freetype2/freetype/config/ftoption.h +43 -56
  65. data/vendor/local/include/freetype2/freetype/config/ftstdlib.h +1 -1
  66. data/vendor/local/include/freetype2/freetype/freetype.h +185 -85
  67. data/vendor/local/include/freetype2/freetype/ftadvanc.h +1 -1
  68. data/vendor/local/include/freetype2/freetype/ftbbox.h +2 -2
  69. data/vendor/local/include/freetype2/freetype/ftbdf.h +1 -1
  70. data/vendor/local/include/freetype2/freetype/ftbitmap.h +2 -2
  71. data/vendor/local/include/freetype2/freetype/ftbzip2.h +1 -1
  72. data/vendor/local/include/freetype2/freetype/ftcache.h +1 -16
  73. data/vendor/local/include/freetype2/freetype/ftchapters.h +3 -0
  74. data/vendor/local/include/freetype2/freetype/ftcid.h +2 -2
  75. data/vendor/local/include/freetype2/freetype/ftdriver.h +1225 -0
  76. data/vendor/local/include/freetype2/freetype/fterrdef.h +1 -1
  77. data/vendor/local/include/freetype2/freetype/fterrors.h +1 -1
  78. data/vendor/local/include/freetype2/freetype/ftfntfmt.h +1 -1
  79. data/vendor/local/include/freetype2/freetype/ftgasp.h +6 -1
  80. data/vendor/local/include/freetype2/freetype/ftglyph.h +3 -3
  81. data/vendor/local/include/freetype2/freetype/ftgxval.h +5 -5
  82. data/vendor/local/include/freetype2/freetype/ftgzip.h +4 -1
  83. data/vendor/local/include/freetype2/freetype/ftimage.h +18 -18
  84. data/vendor/local/include/freetype2/freetype/ftincrem.h +2 -13
  85. data/vendor/local/include/freetype2/freetype/ftlcdfil.h +5 -18
  86. data/vendor/local/include/freetype2/freetype/ftlist.h +1 -1
  87. data/vendor/local/include/freetype2/freetype/ftlzw.h +1 -1
  88. data/vendor/local/include/freetype2/freetype/ftmac.h +1 -1
  89. data/vendor/local/include/freetype2/freetype/ftmm.h +99 -11
  90. data/vendor/local/include/freetype2/freetype/ftmodapi.h +12 -11
  91. data/vendor/local/include/freetype2/freetype/ftmoderr.h +1 -1
  92. data/vendor/local/include/freetype2/freetype/ftotval.h +1 -1
  93. data/vendor/local/include/freetype2/freetype/ftoutln.h +4 -7
  94. data/vendor/local/include/freetype2/freetype/ftparams.h +205 -0
  95. data/vendor/local/include/freetype2/freetype/ftpfr.h +4 -4
  96. data/vendor/local/include/freetype2/freetype/ftrender.h +2 -2
  97. data/vendor/local/include/freetype2/freetype/ftsizes.h +1 -1
  98. data/vendor/local/include/freetype2/freetype/ftsnames.h +8 -42
  99. data/vendor/local/include/freetype2/freetype/ftstroke.h +6 -6
  100. data/vendor/local/include/freetype2/freetype/ftsynth.h +1 -1
  101. data/vendor/local/include/freetype2/freetype/ftsystem.h +1 -1
  102. data/vendor/local/include/freetype2/freetype/fttrigon.h +1 -1
  103. data/vendor/local/include/freetype2/freetype/fttypes.h +2 -2
  104. data/vendor/local/include/freetype2/freetype/ftwinfnt.h +2 -2
  105. data/vendor/local/include/freetype2/freetype/t1tables.h +10 -1
  106. data/vendor/local/include/freetype2/freetype/ttnameid.h +2 -2
  107. data/vendor/local/include/freetype2/freetype/tttables.h +1 -1
  108. data/vendor/local/include/freetype2/freetype/tttags.h +1 -1
  109. data/vendor/local/include/freetype2/ft2build.h +1 -1
  110. data/vendor/local/include/libpng16/png.h +40 -40
  111. data/vendor/local/include/libpng16/pngconf.h +15 -14
  112. data/vendor/local/include/libpng16/pnglibconf.h +1 -1
  113. data/vendor/local/include/png.h +40 -40
  114. data/vendor/local/include/pngconf.h +15 -14
  115. data/vendor/local/include/pnglibconf.h +1 -1
  116. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  117. data/vendor/local/lib/libcairo-gobject.la +1 -1
  118. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  119. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  120. data/vendor/local/lib/libcairo.a +0 -0
  121. data/vendor/local/lib/libcairo.dll.a +0 -0
  122. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  123. data/vendor/local/lib/libfreetype.a +0 -0
  124. data/vendor/local/lib/libfreetype.dll.a +0 -0
  125. data/vendor/local/lib/libfreetype.la +3 -3
  126. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  127. data/vendor/local/lib/libpng.a +0 -0
  128. data/vendor/local/lib/libpng.dll.a +0 -0
  129. data/vendor/local/lib/libpng.la +2 -2
  130. data/vendor/local/lib/libpng16.a +0 -0
  131. data/vendor/local/lib/libpng16.dll.a +0 -0
  132. data/vendor/local/lib/libpng16.la +2 -2
  133. data/vendor/local/lib/libxml2.dll.a +0 -0
  134. data/vendor/local/lib/libz.dll.a +0 -0
  135. data/vendor/local/lib/pkgconfig/freetype2.pc +2 -2
  136. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  137. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  138. data/vendor/local/share/aclocal/freetype2.m4 +1 -1
  139. data/vendor/local/share/license/freetype/README +9 -9
  140. data/vendor/local/share/license/freetype/README.git +1 -1
  141. data/vendor/local/share/license/libpng/README +2 -2
  142. data/vendor/local/share/man/man3/libpng.3 +50 -54
  143. data/vendor/local/share/man/man3/libpngpf.3 +8 -4
  144. metadata +9 -14
  145. data/vendor/local/bin/freetype-config +0 -211
  146. data/vendor/local/include/freetype2/freetype/ftautoh.h +0 -533
  147. data/vendor/local/include/freetype2/freetype/ftcffdrv.h +0 -321
  148. data/vendor/local/include/freetype2/freetype/ftpcfdrv.h +0 -105
  149. data/vendor/local/include/freetype2/freetype/ftttdrv.h +0 -328
  150. data/vendor/local/include/freetype2/freetype/ttunpat.h +0 -63
  151. data/vendor/local/share/man/man1/freetype-config.1 +0 -146
@@ -5,7 +5,7 @@
5
5
  /* ANSI-specific library and header configuration file (specification */
6
6
  /* only). */
7
7
  /* */
8
- /* Copyright 2002-2017 by */
8
+ /* Copyright 2002-2018 by */
9
9
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
10
  /* */
11
11
  /* This file is part of the FreeType project, and may only be used, */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType high-level API and common types (specification only). */
6
6
  /* */
7
- /* Copyright 1996-2017 by */
7
+ /* Copyright 1996-2018 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -138,6 +138,7 @@ FT_BEGIN_HEADER
138
138
  /* FT_FACE_FLAG_TRICKY */
139
139
  /* FT_FACE_FLAG_KERNING */
140
140
  /* FT_FACE_FLAG_MULTIPLE_MASTERS */
141
+ /* FT_FACE_FLAG_VARIATION */
141
142
  /* FT_FACE_FLAG_GLYPH_NAMES */
142
143
  /* FT_FACE_FLAG_EXTERNAL_STREAM */
143
144
  /* FT_FACE_FLAG_HINTER */
@@ -147,14 +148,16 @@ FT_BEGIN_HEADER
147
148
  /* FT_HAS_KERNING */
148
149
  /* FT_HAS_FIXED_SIZES */
149
150
  /* FT_HAS_GLYPH_NAMES */
150
- /* FT_HAS_MULTIPLE_MASTERS */
151
151
  /* FT_HAS_COLOR */
152
+ /* FT_HAS_MULTIPLE_MASTERS */
152
153
  /* */
153
154
  /* FT_IS_SFNT */
154
155
  /* FT_IS_SCALABLE */
155
156
  /* FT_IS_FIXED_WIDTH */
156
157
  /* FT_IS_CID_KEYED */
157
158
  /* FT_IS_TRICKY */
159
+ /* FT_IS_NAMED_INSTANCE */
160
+ /* FT_IS_VARIATION */
158
161
  /* */
159
162
  /* FT_STYLE_FLAG_BOLD */
160
163
  /* FT_STYLE_FLAG_ITALIC */
@@ -648,7 +651,7 @@ FT_BEGIN_HEADER
648
651
  /* FT_ENCODING_MS_SYMBOL :: */
649
652
  /* Microsoft Symbol encoding, used to encode mathematical symbols */
650
653
  /* and wingdings. For more information, see */
651
- /* `http://www.microsoft.com/typography/otspec/recom.htm', */
654
+ /* `https://www.microsoft.com/typography/otspec/recom.htm', */
652
655
  /* `http://www.kostis.net/charsets/symbol.htm', and */
653
656
  /* `http://www.kostis.net/charsets/wingding.htm'. */
654
657
  /* */
@@ -657,7 +660,7 @@ FT_BEGIN_HEADER
657
660
  /* */
658
661
  /* FT_ENCODING_SJIS :: */
659
662
  /* Shift JIS encoding for Japanese. More info at */
660
- /* `http://en.wikipedia.org/wiki/Shift_JIS'. See note on */
663
+ /* `https://en.wikipedia.org/wiki/Shift_JIS'. See note on */
661
664
  /* multi-byte encodings below. */
662
665
  /* */
663
666
  /* FT_ENCODING_PRC :: */
@@ -673,7 +676,7 @@ FT_BEGIN_HEADER
673
676
  /* Corresponds to the Korean encoding system known as Extended */
674
677
  /* Wansung (MS Windows code page 949). */
675
678
  /* For more information see */
676
- /* `http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
679
+ /* `https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
677
680
  /* */
678
681
  /* FT_ENCODING_JOHAB :: */
679
682
  /* The Korean standard character set (KS~C 5601-1992), which */
@@ -721,11 +724,12 @@ FT_BEGIN_HEADER
721
724
  /* Same as FT_ENCODING_JOHAB. Deprecated. */
722
725
  /* */
723
726
  /* <Note> */
724
- /* By default, FreeType automatically synthesizes a Unicode charmap */
725
- /* for PostScript fonts, using their glyph name dictionaries. */
726
- /* However, it also reports the encodings defined explicitly in the */
727
- /* font file, for the cases when they are needed, with the Adobe */
728
- /* values as well. */
727
+ /* By default, FreeType enables a Unicode charmap and tags it with */
728
+ /* FT_ENCODING_UNICODE when it is either provided or can be generated */
729
+ /* from PostScript glyph name dictionaries in the font file. */
730
+ /* All other encodings are considered legacy and tagged only if */
731
+ /* explicitly defined in the font file. Otherwise, FT_ENCODING_NONE */
732
+ /* is used. */
729
733
  /* */
730
734
  /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
731
735
  /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
@@ -749,7 +753,7 @@ FT_BEGIN_HEADER
749
753
  /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
750
754
  /* be needed to be able to distinguish Apple encoding variants. See */
751
755
  /* */
752
- /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
756
+ /* https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
753
757
  /* */
754
758
  /* to get an idea how to do that. Basically, if the language ID */
755
759
  /* is~0, don't use it, otherwise subtract 1 from the language ID. */
@@ -888,34 +892,41 @@ FT_BEGIN_HEADER
888
892
  /* are set to~0 if there is only one face in */
889
893
  /* the font file. */
890
894
  /* */
891
- /* Bits 16-30 are relevant to GX and OpenType */
892
- /* variation fonts only, holding the named */
893
- /* instance index for the current face index */
894
- /* (starting with value~1; value~0 indicates */
895
- /* font access without a named instance). For */
896
- /* non-variation fonts, bits 16-30 are */
897
- /* ignored. If we have the third named */
898
- /* instance of face~4, say, `face_index' is */
899
- /* set to 0x00030004. */
895
+ /* [Since 2.6.1] Bits 16-30 are relevant to GX */
896
+ /* and OpenType variation fonts only, holding */
897
+ /* the named instance index for the current */
898
+ /* face index (starting with value~1; value~0 */
899
+ /* indicates font access without a named */
900
+ /* instance). For non-variation fonts, bits */
901
+ /* 16-30 are ignored. If we have the third */
902
+ /* named instance of face~4, say, `face_index' */
903
+ /* is set to 0x00030004. */
900
904
  /* */
901
905
  /* Bit 31 is always zero (this is, */
902
906
  /* `face_index' is always a positive value). */
903
907
  /* */
908
+ /* [Since 2.9] Changing the design coordinates */
909
+ /* with @FT_Set_Var_Design_Coordinates or */
910
+ /* @FT_Set_Var_Blend_Coordinates does not */
911
+ /* influence the named instance index value */
912
+ /* (only @FT_Set_Named_Instance does that). */
913
+ /* */
904
914
  /* face_flags :: A set of bit flags that give important */
905
915
  /* information about the face; see */
906
916
  /* @FT_FACE_FLAG_XXX for the details. */
907
917
  /* */
908
918
  /* style_flags :: The lower 16~bits contain a set of bit */
909
919
  /* flags indicating the style of the face; see */
910
- /* @FT_STYLE_FLAG_XXX for the details. Bits */
911
- /* 16-30 hold the number of named instances */
912
- /* available for the current face if we have a */
913
- /* GX or OpenType variation (sub)font. Bit 31 */
914
- /* is always zero (this is, `style_flags' is */
915
- /* always a positive value). Note that a */
916
- /* variation font has always at least one */
917
- /* named instance, namely the default */
918
- /* instance. */
920
+ /* @FT_STYLE_FLAG_XXX for the details. */
921
+ /* */
922
+ /* [Since 2.6.1] Bits 16-30 hold the number */
923
+ /* of named instances available for the */
924
+ /* current face if we have a GX or OpenType */
925
+ /* variation (sub)font. Bit 31 is always zero */
926
+ /* (this is, `style_flags' is always a */
927
+ /* positive value). Note that a variation */
928
+ /* font has always at least one named */
929
+ /* instance, namely the default instance. */
919
930
  /* */
920
931
  /* num_glyphs :: The number of glyphs in the face. If the */
921
932
  /* face is scalable and has sbits (see */
@@ -1052,6 +1063,9 @@ FT_BEGIN_HEADER
1052
1063
  /* `descender', `height', `underline_position', and */
1053
1064
  /* `underline_thickness'. */
1054
1065
  /* */
1066
+ /* Especially for TrueType fonts see also the documentation for */
1067
+ /* @FT_Size_Metrics. */
1068
+ /* */
1055
1069
  typedef struct FT_FaceRec_
1056
1070
  {
1057
1071
  FT_Long num_faces;
@@ -1162,7 +1176,7 @@ FT_BEGIN_HEADER
1162
1176
  /* interpolating between them. Supported formats are Adobe MM, */
1163
1177
  /* TrueType GX, and OpenType variation fonts. */
1164
1178
  /* */
1165
- /* See the multiple-masters specific API for details. */
1179
+ /* See section @multiple_masters for API details. */
1166
1180
  /* */
1167
1181
  /* FT_FACE_FLAG_GLYPH_NAMES :: */
1168
1182
  /* The face contains glyph names, which can be retrieved using */
@@ -1212,8 +1226,15 @@ FT_BEGIN_HEADER
1212
1226
  /* tricky fonts; they are hard-coded in file `ttobjs.c'. */
1213
1227
  /* */
1214
1228
  /* FT_FACE_FLAG_COLOR :: */
1215
- /* The face has color glyph tables. To access color glyphs use */
1216
- /* @FT_LOAD_COLOR. */
1229
+ /* [Since 2.5.1] The face has color glyph tables. To access color */
1230
+ /* glyphs use @FT_LOAD_COLOR. */
1231
+ /* */
1232
+ /* FT_FACE_FLAG_VARIATION :: */
1233
+ /* [Since 2.9] Set if the current face (or named instance) has been */
1234
+ /* altered with @FT_Set_MM_Design_Coordinates, */
1235
+ /* @FT_Set_Var_Design_Coordinates, or */
1236
+ /* @FT_Set_Var_Blend_Coordinates. This flag is unset by a call to */
1237
+ /* @FT_Set_Named_Instance. */
1217
1238
  /* */
1218
1239
  #define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
1219
1240
  #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
@@ -1230,6 +1251,7 @@ FT_BEGIN_HEADER
1230
1251
  #define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
1231
1252
  #define FT_FACE_FLAG_TRICKY ( 1L << 13 )
1232
1253
  #define FT_FACE_FLAG_COLOR ( 1L << 14 )
1254
+ #define FT_FACE_FLAG_VARIATION ( 1L << 15 )
1233
1255
 
1234
1256
 
1235
1257
  /*************************************************************************
@@ -1391,11 +1413,37 @@ FT_BEGIN_HEADER
1391
1413
  * A macro that returns true whenever a face object is a named instance
1392
1414
  * of a GX or OpenType variation font.
1393
1415
  *
1416
+ * [Since 2.9] Changing the design coordinates with
1417
+ * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
1418
+ * not influence the return value of this macro (only
1419
+ * @FT_Set_Named_Instance does that).
1420
+ *
1421
+ * @since:
1422
+ * 2.7
1423
+ *
1394
1424
  */
1395
1425
  #define FT_IS_NAMED_INSTANCE( face ) \
1396
1426
  ( (face)->face_index & 0x7FFF0000L )
1397
1427
 
1398
1428
 
1429
+ /*************************************************************************
1430
+ *
1431
+ * @macro:
1432
+ * FT_IS_VARIATION( face )
1433
+ *
1434
+ * @description:
1435
+ * A macro that returns true whenever a face object has been altered
1436
+ * by @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
1437
+ * @FT_Set_Var_Blend_Coordinates.
1438
+ *
1439
+ * @since:
1440
+ * 2.9
1441
+ *
1442
+ */
1443
+ #define FT_IS_VARIATION( face ) \
1444
+ ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
1445
+
1446
+
1399
1447
  /*************************************************************************
1400
1448
  *
1401
1449
  * @macro:
@@ -1437,6 +1485,9 @@ FT_BEGIN_HEADER
1437
1485
  * A macro that returns true whenever a face object contains
1438
1486
  * tables for color glyphs.
1439
1487
  *
1488
+ * @since:
1489
+ * 2.5.1
1490
+ *
1440
1491
  */
1441
1492
  #define FT_HAS_COLOR( face ) \
1442
1493
  ( (face)->face_flags & FT_FACE_FLAG_COLOR )
@@ -1534,7 +1585,7 @@ FT_BEGIN_HEADER
1534
1585
  /* to the following. */
1535
1586
  /* */
1536
1587
  /* { */
1537
- /* scaled_ascender = FT_MulFix( face->root.ascender, */
1588
+ /* scaled_ascender = FT_MulFix( face->ascender, */
1538
1589
  /* size_metrics->y_scale ); */
1539
1590
  /* } */
1540
1591
  /* */
@@ -1548,6 +1599,43 @@ FT_BEGIN_HEADER
1548
1599
  /* */
1549
1600
  /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */
1550
1601
  /* */
1602
+ /* */
1603
+ /* *TrueType* *fonts* *with* *native* *bytecode* *hinting* */
1604
+ /* */
1605
+ /* All applications that handle TrueType fonts with native hinting */
1606
+ /* must be aware that TTFs expect different rounding of vertical font */
1607
+ /* dimensions. The application has to cater for this, especially if */
1608
+ /* it wants to rely on a TTF's vertical data (for example, to */
1609
+ /* properly align box characters vertically). */
1610
+ /* */
1611
+ /* Only the application knows _in_ _advance_ that it is going to use */
1612
+ /* native hinting for TTFs! FreeType, on the other hand, selects the */
1613
+ /* hinting mode not at the time of creating an @FT_Size object but */
1614
+ /* much later, namely while calling @FT_Load_Glyph. */
1615
+ /* */
1616
+ /* Here is some pseudo code that illustrates a possible solution. */
1617
+ /* */
1618
+ /* { */
1619
+ /* font_format = FT_Get_Font_Format( face ); */
1620
+ /* */
1621
+ /* if ( !strcmp( font_format, "TrueType" ) && */
1622
+ /* do_native_bytecode_hinting ) */
1623
+ /* { */
1624
+ /* ascender = ROUND( FT_MulFix( face->ascender, */
1625
+ /* size_metrics->y_scale ) ); */
1626
+ /* descender = ROUND( FT_MulFix( face->descender, */
1627
+ /* size_metrics->y_scale ) ); */
1628
+ /* } */
1629
+ /* else */
1630
+ /* { */
1631
+ /* ascender = size_metrics->ascender; */
1632
+ /* descender = size_metrics->descender; */
1633
+ /* } */
1634
+ /* */
1635
+ /* height = size_metrics->height; */
1636
+ /* max_advance = size_metrics->max_advance; */
1637
+ /* } */
1638
+ /* */
1551
1639
  typedef struct FT_Size_Metrics_
1552
1640
  {
1553
1641
  FT_UShort x_ppem; /* horizontal pixels per EM */
@@ -1689,17 +1777,13 @@ FT_BEGIN_HEADER
1689
1777
  /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */
1690
1778
  /* are possible. */
1691
1779
  /* */
1692
- /* bitmap :: This field is used as a bitmap descriptor */
1693
- /* when the slot format is */
1694
- /* @FT_GLYPH_FORMAT_BITMAP. Note that the */
1695
- /* address and content of the bitmap buffer can */
1696
- /* change between calls of @FT_Load_Glyph and a */
1697
- /* few other functions. */
1780
+ /* bitmap :: This field is used as a bitmap descriptor. */
1781
+ /* Note that the address and content of the */
1782
+ /* bitmap buffer can change between calls of */
1783
+ /* @FT_Load_Glyph and a few other functions. */
1698
1784
  /* */
1699
1785
  /* bitmap_left :: The bitmap's left bearing expressed in */
1700
- /* integer pixels. Only valid if the format is */
1701
- /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */
1702
- /* glyph slot contains a bitmap. */
1786
+ /* integer pixels. */
1703
1787
  /* */
1704
1788
  /* bitmap_top :: The bitmap's top bearing expressed in integer */
1705
1789
  /* pixels. This is the distance from the */
@@ -1746,7 +1830,9 @@ FT_BEGIN_HEADER
1746
1830
  /* If @FT_Load_Glyph is called with default flags (see */
1747
1831
  /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
1748
1832
  /* its native format (e.g., an outline glyph for TrueType and Type~1 */
1749
- /* formats). */
1833
+ /* formats). [Since 2.9] The prospective bitmap metrics are */
1834
+ /* calculated according to @FT_LOAD_TARGET_XXX and other flags even */
1835
+ /* for the outline glyph, even if @FT_LOAD_RENDER is not set. */
1750
1836
  /* */
1751
1837
  /* This image can later be converted into a bitmap by calling */
1752
1838
  /* @FT_Render_Glyph. This function searches the current renderer for */
@@ -1895,8 +1981,8 @@ FT_BEGIN_HEADER
1895
1981
  /* */
1896
1982
  /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */
1897
1983
  /* set, this function reads the `FREETYPE_PROPERTIES' environment */
1898
- /* variable to control driver properties. See sections @auto_hinter, */
1899
- /* @cff_driver, @pcf_driver, and @tt_driver for more. */
1984
+ /* variable to control driver properties. See section @properties */
1985
+ /* for more. */
1900
1986
  /* */
1901
1987
  FT_EXPORT( FT_Error )
1902
1988
  FT_Init_FreeType( FT_Library *alibrary );
@@ -1977,8 +2063,8 @@ FT_BEGIN_HEADER
1977
2063
  /* data :: A pointer to the parameter data. */
1978
2064
  /* */
1979
2065
  /* <Note> */
1980
- /* The ID and function of parameters are driver-specific. See the */
1981
- /* various FT_PARAM_TAG_XXX flags for more information. */
2066
+ /* The ID and function of parameters are driver-specific. See */
2067
+ /* section @parameter_tags for more information. */
1982
2068
  /* */
1983
2069
  typedef struct FT_Parameter_
1984
2070
  {
@@ -2155,14 +2241,14 @@ FT_BEGIN_HEADER
2155
2241
  /* with value~0). Set it to~0 if there is only one */
2156
2242
  /* face in the font file. */
2157
2243
  /* */
2158
- /* Bits 16-30 are relevant to GX and OpenType variation */
2159
- /* fonts only, specifying the named instance index for */
2160
- /* the current face index (starting with value~1; */
2161
- /* value~0 makes FreeType ignore named instances). For */
2162
- /* non-variation fonts, bits 16-30 are ignored. */
2163
- /* Assuming that you want to access the third named */
2164
- /* instance in face~4, `face_index' should be set to */
2165
- /* 0x00030004. If you want to access face~4 without */
2244
+ /* [Since 2.6.1] Bits 16-30 are relevant to GX and */
2245
+ /* OpenType variation fonts only, specifying the named */
2246
+ /* instance index for the current face index (starting */
2247
+ /* with value~1; value~0 makes FreeType ignore named */
2248
+ /* instances). For non-variation fonts, bits 16-30 are */
2249
+ /* ignored. Assuming that you want to access the third */
2250
+ /* named instance in face~4, `face_index' should be set */
2251
+ /* to 0x00030004. If you want to access face~4 without */
2166
2252
  /* variation handling, simply set `face_index' to */
2167
2253
  /* value~4. */
2168
2254
  /* */
@@ -2748,6 +2834,10 @@ FT_BEGIN_HEADER
2748
2834
  /* since its glyph indices are not listed in any of the font's */
2749
2835
  /* charmaps. */
2750
2836
  /* */
2837
+ /* If no active cmap is set up (i.e., `face->charmap' is zero), the */
2838
+ /* call to @FT_Get_Char_Index is omitted, and the function behaves */
2839
+ /* identically to @FT_Load_Glyph. */
2840
+ /* */
2751
2841
  FT_EXPORT( FT_Error )
2752
2842
  FT_Load_Char( FT_Face face,
2753
2843
  FT_ULong char_code,
@@ -2869,26 +2959,26 @@ FT_BEGIN_HEADER
2869
2959
  * Disable the auto-hinter. See also the note below.
2870
2960
  *
2871
2961
  * FT_LOAD_COLOR ::
2872
- * Load embedded color bitmap images. The resulting color bitmaps,
2873
- * if available, will have the @FT_PIXEL_MODE_BGRA format. If the
2874
- * flag is not set and color bitmaps are found, they are converted
2875
- * to 256-level gray bitmaps transparently, using the
2962
+ * [Since 2.5] Load embedded color bitmap images. The resulting color
2963
+ * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format.
2964
+ * If the flag is not set and color bitmaps are found, they are
2965
+ * converted to 256-level gray bitmaps transparently, using the
2876
2966
  * @FT_PIXEL_MODE_GRAY format.
2877
2967
  *
2878
2968
  * FT_LOAD_COMPUTE_METRICS ::
2879
- * Compute glyph metrics from the glyph data, without the use of
2880
- * bundled metrics tables (for example, the `hdmx' table in TrueType
2881
- * fonts). This flag is mainly used by font validating or font
2882
- * editing applications, which need to ignore, verify, or edit those
2883
- * tables.
2969
+ * [Since 2.6.1] Compute glyph metrics from the glyph data, without
2970
+ * the use of bundled metrics tables (for example, the `hdmx' table in
2971
+ * TrueType fonts). This flag is mainly used by font validating or
2972
+ * font editing applications, which need to ignore, verify, or edit
2973
+ * those tables.
2884
2974
  *
2885
2975
  * Currently, this flag is only implemented for TrueType fonts.
2886
2976
  *
2887
2977
  * FT_LOAD_BITMAP_METRICS_ONLY ::
2888
- * Request loading of the metrics and bitmap image information of a
2889
- * (possibly embedded) bitmap glyph without allocating or copying
2890
- * the bitmap image data itself. No effect if the target glyph is
2891
- * not a bitmap image.
2978
+ * [Since 2.7.1] Request loading of the metrics and bitmap image
2979
+ * information of a (possibly embedded) bitmap glyph without
2980
+ * allocating or copying the bitmap image data itself. No effect if
2981
+ * the target glyph is not a bitmap image.
2892
2982
  *
2893
2983
  * This flag unsets @FT_LOAD_RENDER.
2894
2984
  *
@@ -2980,7 +3070,7 @@ FT_BEGIN_HEADER
2980
3070
  *
2981
3071
  * Advance widths are rounded to integer values; however, using the
2982
3072
  * `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
2983
- * possible to get fractional advance widths for sub-pixel positioning
3073
+ * possible to get fractional advance widths for subpixel positioning
2984
3074
  * (which is recommended to use).
2985
3075
  *
2986
3076
  * If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
@@ -3119,13 +3209,13 @@ FT_BEGIN_HEADER
3119
3209
  /* opacity). */
3120
3210
  /* */
3121
3211
  /* FT_RENDER_MODE_LCD :: */
3122
- /* This mode corresponds to horizontal RGB and BGR sub-pixel */
3212
+ /* This mode corresponds to horizontal RGB and BGR subpixel */
3123
3213
  /* displays like LCD screens. It produces 8-bit bitmaps that are */
3124
3214
  /* 3~times the width of the original glyph outline in pixels, and */
3125
3215
  /* which use the @FT_PIXEL_MODE_LCD mode. */
3126
3216
  /* */
3127
3217
  /* FT_RENDER_MODE_LCD_V :: */
3128
- /* This mode corresponds to vertical RGB and BGR sub-pixel displays */
3218
+ /* This mode corresponds to vertical RGB and BGR subpixel displays */
3129
3219
  /* (like PDA screens, rotated LCD displays, etc.). It produces */
3130
3220
  /* 8-bit bitmaps that are 3~times the height of the original */
3131
3221
  /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */
@@ -3471,7 +3561,14 @@ FT_BEGIN_HEADER
3471
3561
  /* retrieve it. FreeType follows Adobe TechNote #5902, `Generating */
3472
3562
  /* PostScript Names for Fonts Using OpenType Font Variations'. */
3473
3563
  /* */
3474
- /* http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */
3564
+ /* https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html */
3565
+ /* */
3566
+ /* [Since 2.9] Special PostScript names for named instances are only */
3567
+ /* returned if the named instance is set with @FT_Set_Named_Instance */
3568
+ /* (and the font has corresponding entries in its `fvar' table). If */
3569
+ /* @FT_IS_VARIATION returns true, the algorithmically derived */
3570
+ /* PostScript name is provided, not looking up special entries for */
3571
+ /* named instances. */
3475
3572
  /* */
3476
3573
  FT_EXPORT( const char* )
3477
3574
  FT_Get_Postscript_Name( FT_Face face );
@@ -3702,17 +3799,17 @@ FT_BEGIN_HEADER
3702
3799
  * Note that only a subset of the available properties can be
3703
3800
  * controlled.
3704
3801
  *
3705
- * * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the
3706
- * property `no-stem-darkening' provided by the `autofit' and `cff'
3707
- * modules; see @no-stem-darkening[autofit] and
3708
- * @no-stem-darkening[cff]).
3802
+ * * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the
3803
+ * property `no-stem-darkening' provided by the `autofit', `cff',
3804
+ * `type1', and `t1cid' modules; see @no-stem-darkening).
3709
3805
  *
3710
- * * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding
3806
+ * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
3711
3807
  * to function @FT_Library_SetLcdFilterWeights).
3712
3808
  *
3713
- * * Seed value for the CFF `random' operator
3714
- * (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed'
3715
- * property provided by the `cff' module; see @random-seed).
3809
+ * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
3810
+ * `random' operator, corresponding to the `random-seed' property
3811
+ * provided by the `cff', `type1', and `t1cid' modules; see
3812
+ * @random-seed).
3716
3813
  *
3717
3814
  * Pass NULL as `data' in @FT_Parameter for a given tag to reset the
3718
3815
  * option and use the library or module default again.
@@ -3775,6 +3872,9 @@ FT_BEGIN_HEADER
3775
3872
  * FT_Face_Properties( face, 1, &property );
3776
3873
  * }
3777
3874
  *
3875
+ * @since:
3876
+ * 2.8
3877
+ *
3778
3878
  */
3779
3879
  FT_EXPORT( FT_Error )
3780
3880
  FT_Face_Properties( FT_Face face,
@@ -3899,7 +3999,7 @@ FT_BEGIN_HEADER
3899
3999
  /* and subsetting restrictions associated with a font. */
3900
4000
  /* */
3901
4001
  /* See */
3902
- /* http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
4002
+ /* https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
3903
4003
  /* for more details. */
3904
4004
  /* */
3905
4005
  /* <Values> */
@@ -3999,9 +4099,9 @@ FT_BEGIN_HEADER
3999
4099
  /* Sequences' (IVS), collected in the `Ideographic Variation */
4000
4100
  /* Database' (IVD). */
4001
4101
  /* */
4002
- /* http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
4003
- /* http://unicode.org/reports/tr37/ */
4004
- /* http://unicode.org/ivd/ */
4102
+ /* https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
4103
+ /* https://unicode.org/reports/tr37/ */
4104
+ /* https://unicode.org/ivd/ */
4005
4105
  /* */
4006
4106
  /* To date (January 2017), the character with the most ideographic */
4007
4107
  /* variations is U+9089, having 32 such IVS. */
@@ -4456,7 +4556,7 @@ FT_BEGIN_HEADER
4456
4556
  *
4457
4557
  */
4458
4558
  #define FREETYPE_MAJOR 2
4459
- #define FREETYPE_MINOR 8
4559
+ #define FREETYPE_MINOR 9
4460
4560
  #define FREETYPE_PATCH 1
4461
4561
 
4462
4562