ChangeLog.27 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106
  1. 2016-12-30 Werner Lemberg <wl@gnu.org>
  2. * Version 2.7.1 released.
  3. =========================
  4. Tag sources with `VER-2-7-1'.
  5. * docs/VERSION.TXT: Add entry for version 2.7.1.
  6. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
  7. builds/windows/vc2005/index.html,
  8. builds/windows/vc2008/freetype.vcproj,
  9. builds/windows/vc2008/index.html,
  10. builds/windows/vc2010/freetype.vcxproj,
  11. builds/windows/vc2010/index.html,
  12. builds/windows/visualc/freetype.dsp,
  13. builds/windows/visualc/freetype.vcproj,
  14. builds/windows/visualc/index.html,
  15. builds/windows/visualce/freetype.dsp,
  16. builds/windows/visualce/freetype.vcproj,
  17. builds/windows/visualce/index.html,
  18. builds/wince/vc2005-ce/freetype.vcproj,
  19. builds/wince/vc2005-ce/index.html,
  20. builds/wince/vc2008-ce/freetype.vcproj,
  21. builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
  22. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  23. * builds/unix/configure.raw (version_info): Set to 19:0:13.
  24. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  25. 2016-12-30 Werner Lemberg <wl@gnu.org>
  26. [ftfuzzer] Replace `rand' with an xorshift algorithm.
  27. * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
  28. (Random): Implement and use a 32bit `xorshift' algorithm.
  29. 2016-12-30 Werner Lemberg <wl@gnu.org>
  30. [ftfuzzer] Restrict number of tested bitmap strikes.
  31. Malformed fonts often have large values for the number of bitmap
  32. strikes, and FreeType doesn't check the validity of all bitmap
  33. strikes in advance.
  34. Reported as
  35. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
  36. * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
  37. (Random): Small class to provide n randomly selected numbers
  38. (without repetition) out of the value set [1,N].
  39. (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
  40. strikes.
  41. 2016-12-29 Werner Lemberg <wl@gnu.org>
  42. [truetype] Variation font API stability issues.
  43. Make some functions work before a call to `TT_Set_MM_Blend'.
  44. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
  45. we don't blend.
  46. (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
  47. don't blend.
  48. 2016-12-29 Werner Lemberg <wl@gnu.org>
  49. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
  50. Reported as
  51. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
  52. 2016-12-29 Werner Lemberg <wl@gnu.org>
  53. [truetype] Tracing fixes.
  54. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
  55. information.
  56. (TT_Set_Var_Design): Fix typo.
  57. (TT_Get_Var_Design): Fix typos.
  58. 2016-12-29 Werner Lemberg <wl@gnu.org>
  59. */*: Use `0.5f' for tracing 16.16 numbers.
  60. 2016-12-29 Werner Lemberg <wl@gnu.org>
  61. [pcf] Protect against gzip bombs.
  62. Fix suggested by Kostya; reported as
  63. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
  64. * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
  65. 1024.
  66. 2016-12-28 Werner Lemberg <wl@gnu.org>
  67. [psnames] Only declare, not define, data in `pstables.h' (#49949).
  68. Pdfium includes `pstables.h' a second time; moving the definition
  69. from `pstables.h' to `psmodule.c' saves more than 60kByte data
  70. segment space for this case.
  71. * src/tools/glnames.py (StringTable::dump,
  72. StringTable::dump_sublist, dump_encoding, dump_array): Emit
  73. additional code to only define tables if `DEFINE_PS_TABLES' is set.
  74. * src/psnames/pstables.h: Regenerated.
  75. * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
  76. 2016-12-28 Werner Lemberg <wl@gnu.org>
  77. [cff] Catch `blend' op in non-variant fonts.
  78. Reported as
  79. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
  80. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
  81. allow `blend' op for non-variant fonts.
  82. 2016-12-28 Werner Lemberg <wl@gnu.org>
  83. [cff] Better check of number of blends.
  84. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
  85. src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
  86. stack size.
  87. 2016-12-27 Werner Lemberg <wl@gnu.org>
  88. Documentation updates.
  89. * docs/CHANGES: Add missing information.
  90. * docs/formats.txt: Rewritten and updated.
  91. 2016-12-27 Werner Lemberg <wl@gnu.org>
  92. [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
  93. * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
  94. (TT_Set_Var_Design): Fix tracing.
  95. * src/type1/t1load.c (T1_Get_Var_Design): Implement.
  96. 2016-12-24 Werner Lemberg <wl@gnu.org>
  97. * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
  98. Problem reported by 張俊芝 <418092625@qq.com>.
  99. 2016-12-24 Werner Lemberg <wl@gnu.org>
  100. * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
  101. Some fonts seem to have the `version' field in the wrong byte order.
  102. Problem reported by 張俊芝 <418092625@qq.com>.
  103. 2016-12-24 Werner Lemberg <wl@gnu.org>
  104. * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
  105. This trivial fix allows us to accept more fonts.
  106. Problem reported by 張俊芝 <418092625@qq.com>.
  107. 2016-12-24 Werner Lemberg <wl@gnu.org>
  108. * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
  109. 2016-12-22 Werner Lemberg <wl@gnu.org>
  110. * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
  111. 2016-12-22 Werner Lemberg <wl@gnu.org>
  112. Ensure used preprocessor symbols are defined (#49790).
  113. * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
  114. include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
  115. and `__SUNPRO_C' correctly.
  116. 2016-12-22 Werner Lemberg <wl@gnu.org>
  117. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
  118. Reported as
  119. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
  120. 2016-12-22 Werner Lemberg <wl@gnu.org>
  121. [cff] Protect against invalid `vsindex' and `blend' values.
  122. Reported as
  123. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
  124. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
  125. cf2_cmdBLEND>: Implement it.
  126. 2016-12-22 Werner Lemberg <wl@gnu.org>
  127. [ftfuzzer] Always use Adobe CFF engine.
  128. * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
  129. it.
  130. 2016-12-21 Werner Lemberg <wl@gnu.org>
  131. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
  132. I should really stop coding late in the evening...
  133. Thanks again to Ben for checking.
  134. 2016-12-21 Werner Lemberg <wl@gnu.org>
  135. [autofit] Support variation fonts.
  136. (This ChangeLog entry was added later on.)
  137. * src/autofit/afglobal.c (af_face_globals_free): Remove useless
  138. code.
  139. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
  140. * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
  141. FT_Set_Var_Blend_Coordinates): Finalize
  142. auto-hinter data to enforce recomputation. Note that this is a
  143. brute-force method which should be improved.
  144. 2016-12-21 Werner Lemberg <wl@gnu.org>
  145. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
  146. Don't apply deltas twice for non-phantom points.
  147. Spotted by Ben Wagner.
  148. 2016-12-21 Werner Lemberg <wl@gnu.org>
  149. [cff, truetype] Another try for #49829.
  150. * src/cff/cffdrivr.c: Don't include
  151. `FT_SERVICE_METRICS_VARIATIONS_H'.
  152. (cff_get_advances): Use `ttface->variation_support'.
  153. * src/truetype/ttdriver.c (tt_get_advances): Use
  154. `ttface->variation_support'.
  155. * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
  156. load_truetype_glyph): Use `ttface->variation_support'.
  157. 2016-12-21 Werner Lemberg <wl@gnu.org>
  158. [truetype, sfnt] Introduce font variation flags to `TT_Face'.
  159. * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
  160. New macros describing available functionality of various OpenType
  161. tables related to font variation.
  162. (TT_Face): New fields `variation_support' and `mvar_support',
  163. replacing and extending `use_fvar'.
  164. * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
  165. `variation_support'.
  166. * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
  167. field.
  168. (TT_Vary_Apply_Glyph_Deltas): Updated.
  169. 2016-12-21 Werner Lemberg <wl@gnu.org>
  170. [base] Improve sanity check for Mac resources (#49888).
  171. * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
  172. positive.
  173. 2016-12-20 Werner Lemberg <wl@gnu.org>
  174. [base] More sanity checks for Mac resources.
  175. We use
  176. https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
  177. and
  178. https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
  179. as references.
  180. * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
  181. for `res_id'.
  182. * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
  183. and use it to improve sanity checks.
  184. Follow the specification more closely;in particular, all data types
  185. are signed, not unsigned.
  186. (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
  187. in particular, all data types are signed, not unsigned.
  188. Add some sanity checks.
  189. 2016-12-20 Werner Lemberg <wl@gnu.org>
  190. [truetype] Improve logic for getting fast advance widths.
  191. * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
  192. (tt_get_advances): Use `is_default_instance' for test; this gets
  193. recomputed after changing blend coordinates.
  194. 2016-12-20 Ben Wagner <bungeman@google.com>
  195. Werner Lemberg <wl@gnu.org>
  196. [truetype] Fix linear metrics of GX variation fonts (#49829).
  197. When asking for an unhinted non-default variations,
  198. `linearVertAdvance' is currently the value from the `hmtx' table
  199. instead of the actual value after applying the variation. `HVAR'
  200. support fixes this, but fonts will exist without that table and will
  201. need sane fallback.
  202. Problem also reported as
  203. https://bugs.chromium.org/p/skia/issues/detail?id=5917
  204. * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
  205. load_truetype_glyph): Implement linear advance adjustments if `HVAR'
  206. or `VVAR' tables are missing.
  207. 2016-12-20 Werner Lemberg <wl@gnu.org>
  208. [cff, truetype] Fast advance width retrieval for fonts with HVAR.
  209. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  210. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
  211. * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
  212. (cff_get_advances): Test for HVAR and VVAR.
  213. * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
  214. 2016-12-18 Werner Lemberg <wl@gnu.org>
  215. [base] Fix invalid mac font recursion.
  216. Reported as
  217. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
  218. * src/base/ftobjs.c (FT_Open_Face): Code moved to...
  219. (ft_open_face_internal): ... this function.
  220. Add a parameter to control whether we try special Mac font handling
  221. in case of failure.
  222. (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
  223. open_face_from_buffer): Use `ft_open_face_internal'.
  224. 2016-12-18 Werner Lemberg <wl@gnu.org>
  225. * src/cff/cffobjs.c (cff_face_init): Make named instances work.
  226. 2016-12-18 Werner Lemberg <wl@gnu.org>
  227. [truetype, cff] Extend `get_var_blend' function of MM service.
  228. In particular, we need access to named instance data.
  229. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
  230. Add argument for `FT_MM_Var'.
  231. * src/cff/cffload.c (cff_get_var_blend): Updated.
  232. * src/cff/cffload.h: Updated.
  233. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
  234. * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
  235. Accept value `NULL' for arguments.
  236. * src/truetype/ttgxvar.h: Updated.
  237. 2016-12-18 Werner Lemberg <wl@gnu.org>
  238. [sfnt] Handle `fvar' with zero axes as a non-MM font.
  239. This is better behaviour than exiting with an error.
  240. * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
  241. field.
  242. * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
  243. updating the validation code.
  244. Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
  245. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
  246. code.
  247. 2016-12-18 Werner Lemberg <wl@gnu.org>
  248. Minor GX code shuffling.
  249. * include/freetype/internal/tttypes.h (TT_Face): Move
  250. `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
  251. block.
  252. * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
  253. * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
  254. (TT_Load_Glyph): Use it.
  255. 2016-12-18 Werner Lemberg <wl@gnu.org>
  256. [cff] Better handling of non-CFF font formats.
  257. * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
  258. signature, so return `FT_Err_Unknown_File_Format' more often.
  259. 2016-12-17 Werner Lemberg <wl@gnu.org>
  260. * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
  261. 2016-12-17 Werner Lemberg <wl@gnu.org>
  262. * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
  263. 2016-12-17 Werner Lemberg <wl@gnu.org>
  264. [sfnt, truetype] Various sanitizing fixes.
  265. * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
  266. zero, set `num_instances' to zero.
  267. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
  268. zero axes as invalid.
  269. * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
  270. `loca', `cvt', `fpgm', and `prep' table.
  271. 2016-12-17 Werner Lemberg <wl@gnu.org>
  272. Improve tracing of `FT_Open_Face'.
  273. * src/base/ftobjs.c (FT_Open_Face): Return info on number of
  274. available faces and numbered instances, or the indices of the
  275. requested face and numbered instance.
  276. * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
  277. 2016-12-17 Werner Lemberg <wl@gnu.org>
  278. * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
  279. Reported as
  280. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
  281. 2016-12-16 Werner Lemberg <wl@gnu.org>
  282. [truetype] Fix `cvar' sanity test.
  283. Reported by Dave Arnold.
  284. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
  285. 2016-12-16 Werner Lemberg <wl@gnu.org>
  286. [cff, truetype] Remove compiler warnings; fix `make multi'.
  287. * src/cff/cf2font.h: Include `cffload.h'.
  288. * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
  289. FT_SERVICE_MULTIPLE_MASTERS_H.
  290. (cff_vstore_load): Eliminate `vsSize'.
  291. (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
  292. * src/cff/cffload.h: Include `cffobjs.h'.
  293. Provide declaration for `cff_load_private_dict'.
  294. * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
  295. `minorVersion' and `map_offset'.
  296. 2016-12-16 Werner Lemberg <wl@gnu.org>
  297. [cff] Fix heap buffer overflow (#49858).
  298. * src/cff/cffparse.c (cff_parser_run): Add one more stack size
  299. check.
  300. 2016-12-15 Werner Lemberg <wl@gnu.org>
  301. Fix clang warnings.
  302. * src/cff/cffload.c (cff_blend_doBlend): Add cast.
  303. (cff_subfont_load): Set `error' correctly.
  304. * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
  305. 2016-12-15 Dave Arnold <darnold@adobe.com>
  306. Werner Lemberg <wl@gnu.org>
  307. [cff] Implement CFF2 support (2/2).
  308. The font variation code. All parts dependent on the GX code in the
  309. `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  310. In other words, you can still compile the `cff' module without
  311. defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
  312. support without font variation).
  313. * src/cff/cf2font.c (cf2_font_setup): Add support for font
  314. variation.
  315. * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
  316. * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
  317. (cf2_getVStore, cf2_getNormalizedVector): New functions.
  318. * src/cff/cf2ft.h: Updated.
  319. * src/cff/cf2intrp.c: Include `cffload.h'.
  320. (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
  321. (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
  322. (cf2_doBlend): New function.
  323. (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
  324. * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
  325. (cff_vstore_done, cff_vstore_load): New functions.
  326. (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
  327. cff_blend_check_vector): New functions.
  328. (cff_load_private_dict): Add arguments for blend vector.
  329. Handle blend data.
  330. (cff_subfont_load, cff_subfont_done): Updated.
  331. (cff_font_load): Handle CFF2 variation store data.
  332. (cff_font_done): Updated.
  333. * src/cff/cffload.h: Include `cffparse.h'.
  334. Updated.
  335. * src/cff/cffobjs.c (cff_face_done): Updated.
  336. * src/cff/cffparse.c: Include `cffload.h'.
  337. (cff_parse_num): Handle internal value 255.
  338. (cff_parse_vsindex, cff_parse_blend): New functions.
  339. (CFF_FIELD_BLEND): New macro.
  340. (cff_parser_run): Updated.
  341. * src/cff/cffparse.h (cff_kind_blend): New enum value.
  342. * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
  343. dictionary values.
  344. * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
  345. CFF_VStore, CFF_Blend): New structures.
  346. (CFF_FontRecDict): Add `vstore_offset' field.
  347. (CFF_Private): Add `vsindex' field.
  348. (CFF_SubFont): Add fields for blend data.
  349. (CFF_Font): Add `vstore' field.
  350. * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
  351. since glyph variation data is directly embedded.
  352. (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
  353. 2016-12-15 Dave Arnold <darnold@adobe.com>
  354. Werner Lemberg <wl@gnu.org>
  355. [cff] Implement CFF2 support (1/2).
  356. This commit does not contain the blend code for font variation
  357. support, which follows in another commit.
  358. You should ignore whitespace while inspecting this commit.
  359. * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
  360. member.
  361. * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
  362. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
  363. flag.
  364. (cf2_getMaxstack): New function.
  365. * src/cff/cf2ft.h: Updated.
  366. * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
  367. (cf2_interpT2CharString): Handle CFF2 differences.
  368. Add tracing message for errors.
  369. * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
  370. Update for CFF2.
  371. * src/cff/cffload.c (FT_FIXED_ONE): New macro.
  372. (cff_index_init, cff_index_load_offsets, cff_index_access_element,
  373. cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
  374. cff_subfont_load, cff_font_load): Handle CFF2.
  375. * src/cff/cffload.h: Updated.
  376. * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
  377. * src/cff/cffparse.c (cff_parse_maxstack): New function.
  378. (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
  379. * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
  380. macros.
  381. (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
  382. macros.
  383. * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
  384. stuff).
  385. * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
  386. (CFF_FontRecDict): Add `maxstack' field.
  387. (CFF_Private): Add `subfont' field.
  388. (CFF_Font): Add `top_dict_length' and `cff2' fields.
  389. * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
  390. 2016-12-15 Werner Lemberg <wl@gnu.org>
  391. Dave Arnold <darnold@adobe.com>
  392. [truetype] Provide HVAR advance width variation as a service.
  393. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  394. * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
  395. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
  396. double adjustment of advance width.
  397. * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
  398. (tt_face_get_metrics): Apply metrics variations.
  399. 2016-12-15 Dave Arnold <darnold@adobe.com>
  400. Werner Lemberg <wl@gnu.org>
  401. [truetype] Provide function to apply `HVAR' advance width variation.
  402. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  403. * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
  404. * src/truetype/ttgxvar.h: Updated.
  405. 2016-12-15 Dave Arnold <darnold@adobe.com>
  406. Werner Lemberg <wl@gnu.org>
  407. [truetype] Add `HVAR' table parsing.
  408. Note that this is not complete yet; it only handles advance width
  409. variation.
  410. Activation of the code follows in another commit.
  411. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  412. * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
  413. * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
  414. GX_HVStore, GX_WidthMap): New auxiliary structures for...
  415. (GX_HVarTable): ... HVAR main structure.
  416. (GX_BlendRec): Add data for HVAR loading.
  417. * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
  418. FT_intToFixed, FT_fixedToInt): New macros.
  419. (ft_var_load_hvar): New function.
  420. (TT_Get_MM_Var): Updated.
  421. (tt_done_blend): Deallocate HVAR data.
  422. 2016-12-15 Dave Arnold <darnold@adobe.com>
  423. [cff] Extend number parsing.
  424. The forthcoming CFF2 support needs a dynamic parsing limit.
  425. * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
  426. cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
  427. parser.
  428. (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
  429. cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
  430. * src/cff/cffparse.h (cff_parse_num): Export locally.
  431. 2016-12-15 Dave Arnold <darnold@adobe.com>
  432. [cff] Implement dynamic stack size for Adobe engine.
  433. This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
  434. the forthcoming CFF2 support.
  435. * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
  436. (cf2_stack_free): Deallocate stack.
  437. (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
  438. cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
  439. cf2_stack_clear): Updated.
  440. (cf2_stack_setReal, cf2_stack_pop): New functions.
  441. * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
  442. Update function declarations.
  443. * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
  444. * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
  445. size; return error code.
  446. (cff_parser_done): New function.
  447. (cff_parser_run): Updated.
  448. * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
  449. `stack' a pointer.
  450. Update function declarations.
  451. * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
  452. Updated.
  453. 2016-12-15 Dave Arnold <darnold@adobe.com>
  454. Werner Lemberg <wl@gnu.org>
  455. [cff] Code shuffling.
  456. * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
  457. fields.
  458. * src/cff/cffload.c (cff_subfont_load): Change last argument to
  459. `CFF_Font'
  460. Split off parsing of private dictionary into...
  461. (cff_load_private_dict): ...this new function.
  462. (cff_font_load): Updated.
  463. 2016-12-14 Werner Lemberg <wl@gnu.org>
  464. [sfnt, truetype] Add framework for Metrics Variations service.
  465. No effect yet; service functions will be implemented later on.
  466. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  467. * include/freetype/internal/services/svmetric.h: New file.
  468. * include/freetype/internal/ftserv.h
  469. (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
  470. * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
  471. * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
  472. (sfnt_init_face): Initialize `face->var'.
  473. * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
  474. (tt_service_metrics_variations): New service.
  475. (tt_services): Updated.
  476. * src/truetype/ttpic.h: Updated.
  477. 2016-12-14 Werner Lemberg <wl@gnu.org>
  478. [cff] Add Multiple Masters service.
  479. The code simply uses the MM functions from the `truetype' module.
  480. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
  481. * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
  482. * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
  483. (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
  484. cff_set_var_design, cff_get_var_design): New functions.
  485. (cff_service_multi_masters): New service.
  486. (cff_services): Updated.
  487. * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
  488. functions.
  489. * src/cff/cffload.h: Updated.
  490. * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
  491. * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
  492. (sfnt_init_face): Initialize `face->mm'.
  493. 2016-12-14 Werner Lemberg <wl@gnu.org>
  494. Extend functionality of `ft_module_get_service'.
  495. It can now differentiate between local and global searches.
  496. * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
  497. (FT_Get_TrueType_Engine_Type): Updated.
  498. * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
  499. * include/freetype/internal/ftobjs.h: Updated.
  500. * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
  501. Updated.
  502. 2016-12-14 Werner Lemberg <wl@gnu.org>
  503. * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
  504. 2016-12-14 Dave Arnold <darnold@adobe.com>
  505. Werner Lemberg <wl@gnu.org>
  506. [sfnt, cff] Minor preparations.
  507. * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
  508. TTAG_VVAR): New SFNT table tags.
  509. * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
  510. 2016-12-10 Werner Lemberg <wl@gnu.org>
  511. [truetype, type1] Add `get_var_blend' to MM service.
  512. For internal use; we want to share code between the forthcoming CFF2
  513. support and TrueType.
  514. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
  515. New typedef.
  516. (MultiMasters): Add `get_var_blend'.
  517. (FT_Service_MultiMasters): Updated.
  518. * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
  519. * src/truetype/ttgxvar.h: Updated.
  520. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  521. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  522. 2016-12-10 Werner Lemberg <wl@gnu.org>
  523. [truetype, type1] Add `done_blend' to MM service.
  524. For internal use; we want to share code between the forthcoming CFF2
  525. support and TrueType.
  526. * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
  527. New typedef.
  528. (MultiMasters): Add `done_blend'.
  529. (FT_Service_MultiMasters): Updated.
  530. * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
  531. * src/truetype/ttgxvar.h: Updated.
  532. * src/truetype/ttobjs.c (TT_Face_Done): Updated.
  533. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  534. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  535. 2016-12-09 Werner Lemberg <wl@gnu.org>
  536. [sfnt] Revert change from 2016-12-08.
  537. I missed the functionality of `ft_module_get_service', which makes
  538. the change unnecessary.
  539. 2016-12-08 Werner Lemberg <wl@gnu.org>
  540. Add framework to support services with 8 functions.
  541. We will need this for CFF variation font support.
  542. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
  543. New macro.
  544. 2016-12-08 Werner Lemberg <wl@gnu.org>
  545. [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
  546. CFF2 fonts will need access to those two functions.
  547. * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
  548. (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
  549. (FT_DEFINE_SFNT_INTERFACE): Updated.
  550. * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
  551. Fix signatures to exactly correspond to the glyph dict service
  552. function typedefs.
  553. (sfnt_interface): Updated.
  554. 2016-12-06 Dave Arnold <darnold@adobe.com>
  555. Add `FT_Get_Var_Design_Coordinates' function.
  556. Note that the low-level functions aren't implemented yet.
  557. * include/freetype/ftmm.h: Declare.
  558. * include/freetype/internal/services/svmm.h
  559. (FT_Get_Var_Design_Func): New typedef.
  560. (MultiMasters): New MM service function `get_var_design'.
  561. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  562. Update all callers.
  563. * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
  564. * src/truetype/ttdriver.c: Updated.
  565. * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
  566. handle `get_var_design' service.
  567. * src/truetype/ttgxvar.h: Updated.
  568. * src/type1/t1driver.c: Updated.
  569. * src/type1/t1load.c (T1_Get_Var_Design): New dump function to
  570. handle `get_var_design' service.
  571. * src/type1/t1load.h: Updated.
  572. 2016-12-06 Werner Lemberg <wl@gnu.org>
  573. * src/type1/t1load.c (parse_subrs): Fix memory leak.
  574. The `subrs' keyword might erroneously occur multiple times.
  575. Reported as
  576. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
  577. 2016-12-01 Werner Lemberg <wl@gnu.org>
  578. [gzip] Improve building with external zlib (#49673).
  579. Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
  580. the following error.
  581. ftgzip.c
  582. zlib-1.2.8\zlib.h(86): error C2061:
  583. syntax error: identifier 'z_const'
  584. zlib-1.2.8\zlib.h(94): error C2054:
  585. expected '(' to follow 'z_const'
  586. zlib-1.2.8\zlib.h(94): error C2085:
  587. 'msg': not in formal parameter list
  588. ...
  589. zlib-1.2.8\zlib.h(877): fatal error C1003:
  590. error count exceeds 100; stopping compilation
  591. The error happens because FreeType keeps an own copy of zlib-1.1.4
  592. under `src/gzip'. When building `src/gzip/ftgzip.c' with
  593. FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
  594. #include <zlib.h>
  595. which correctly finds an external `zlib.h', but `zlib.h' itself has
  596. a line
  597. #include "zconf.h"
  598. which makes Visual Studio 2015 find `src/gzip/zconf.h' while
  599. compiling the files in `src/gzip'.
  600. * src/gzip/zconf.h: Rename to...
  601. * src/gzip/ftzconf.h: ... this.
  602. * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
  603. 2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com>
  604. [autofit] Fix Emscripten crash (patch #9180).
  605. Function calls through pointers must use a matching signature to
  606. work on Emscripten, since such calls are dispatched through lookup
  607. tables grouped by signature.
  608. * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
  609. typedef.
  610. 2016-11-29 Werner Lemberg <wl@gnu.org>
  611. [smooth] Revert previous commit. Already fixed with 6ca54c64.
  612. 2016-11-29 Werner Lemberg <wl@gnu.org>
  613. [smooth] Avoid conditional jump on uninitialized value (#49711).
  614. * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
  615. 2016-11-27 Nikolaus Waxweiler <madigens@gmail.com>
  616. [autofit] Code shuffling.
  617. Also improve some comments and remove unused code.
  618. No functional change.
  619. * src/autofit/afloader.c (af_loader_load_g): Merged with...
  620. (af_loader_load_glyph): ...this function.
  621. Split off emboldening code into...
  622. (af_loader_embolden_glyph_in_slot): ... this function.
  623. 2016-11-17 Werner Lemberg <wl@gnu.org>
  624. Better support of LLP64 systems with gcc (and clang).
  625. * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
  626. * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
  627. suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
  628. 2016-11-10 Werner Lemberg <wl@gnu.org>
  629. Fix `lcd_weights' array size.
  630. * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
  631. Reported by Nikolaus.
  632. 2016-11-06 Werner Lemberg <wl@gnu.org>
  633. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
  634. 2016-11-06 Werner Lemberg <wl@gnu.org>
  635. [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
  636. It's unavoidable to call the PNG engine, but to get the metrics it
  637. is sufficient to read the PNG image's header only.
  638. * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
  639. allocation of the glyph slot.
  640. * src/sfnt/pngshim.h: Updated.
  641. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
  642. tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
  643. 2016-11-06 Werner Lemberg <wl@gnu.org>
  644. [sfnt] Speed up `sbix' lookup.
  645. This also fixes a bug introduced in 2016-10-01 which prevents
  646. display of embedded bitmap fonts that use the `sbix' format.
  647. * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
  648. offset also in `ebdt_size' and `ebdt_start', respectively. This
  649. makes the test for an embedded bitmap data table succeed for this
  650. format.
  651. (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
  652. `ebdt_size' and `ebdt_start'
  653. (tt_face_load_sbix_image): Ditto.
  654. 2016-11-06 Seigo Nonaka <nona@google.com>
  655. Werner Lemberg <wl@gnu.org>
  656. Introduce a way of quickly retrieving (embedded) bitmap metrics.
  657. `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
  658. until the user calls `FT_Render_Glyph'. However, it always
  659. allocates memory for bitmaps and copies or decodes the contents of a
  660. bitmap glyph, which can be quite slow for PNG data.
  661. * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
  662. macro.
  663. * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
  664. FT_LOAD_BITMAP_METRICS_ONLY is used.
  665. * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
  666. tt_sbit_decoder_load_bitmap): Add argument to control allocation of
  667. the glyph slot.
  668. (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
  669. tt_face_load_sbit_image): Updated.
  670. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
  671. `FT_LOAD_BITMAP_METRICS_ONLY' is set.
  672. * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
  673. argument to control allocation of the glyph slot.
  674. * src/pfr/pfrobjs (pfr_slot_load): Updated.
  675. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
  676. * docs/CHANGES: Updated.
  677. 2016-11-06 Werner Lemberg <wl@gnu.org>
  678. Synchronize with gnulib (#49448).
  679. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
  680. builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
  681. current version of `intprops.h'.
  682. Other minor synchronization to reduce code differences between the
  683. three files.
  684. 2016-11-03 Behdad Esfahbod <behdad@behdad.org>
  685. [truetype] Clamp variation requests to valid range.
  686. This is required by OpenType 1.8; it also avoids rounding surprises.
  687. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
  688. outside of the allowed range to always stay within the range instead
  689. of producing an error.
  690. 2016-10-29 Werner Lemberg <wl@gnu.org>
  691. [truetype] Remove clang warnings.
  692. * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
  693. loop counter handling.
  694. * src/truetype/ttinterp.c: Updated.
  695. (Ins_SCANTYPE): Use signed constant.
  696. (TT_RunIns): Ensure `num_twilight_points' is 16bit.
  697. 2016-10-27 Werner Lemberg <wl@gnu.org>
  698. [truetype] Fix commit from 2014-11-24.
  699. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
  700. * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
  701. logic.
  702. 2016-10-26 Werner Lemberg <wl@gnu.org>
  703. Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
  704. * include/freetype/ftmm.h: Declare.
  705. * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
  706. New typedef.
  707. (MultiMasters): New MM service function `get_mm_blend'.
  708. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  709. Update all callers.
  710. * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
  711. FT_Get_Var_Blend_Coordinates): Implement.
  712. * src/truetype/ttdriver.c: Updated.
  713. * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
  714. `get_mm_blend' service.
  715. * src/truetype/ttgxvar.h: Updated.
  716. * src/type1/t1driver.c: Updated.
  717. * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
  718. `get_mm_blend' service.
  719. * src/type1/t1load.h: Updated.
  720. * docs/CHANGES: Document.
  721. 2016-10-26 Werner Lemberg <wl@gnu.org>
  722. * src/type1/t1load.c (parse_subrs): Fix limit check.
  723. Reported as
  724. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
  725. 2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  726. [cff] Correct cmap format reporting (#24819).
  727. * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
  728. charmap instead of guessing its format and language.
  729. 2016-10-22 Werner Lemberg <wl@gnu.org>
  730. [truetype] Fix SCANTYPE instruction (#49394).
  731. * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
  732. 2016-10-22 Werner Lemberg <wl@gnu.org>
  733. [sfnt] Improve handling of invalid post 2.5 tables [#49393].
  734. * src/sfnt/ttpost.c (load_format_25): We need at least a single
  735. table entry.
  736. 2016-10-14 Werner Lemberg <wl@gnu.org>
  737. [truetype] Fix handling of `cvar' table data.
  738. Reported as
  739. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
  740. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
  741. indices.
  742. 2016-10-11 Werner Lemberg <wl@gnu.org>
  743. [psaux] Fix handling of invalid flex subrs.
  744. Problem reported as
  745. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
  746. * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
  747. <op_callothersubr>: Set `flex_state' after error checking.
  748. 2016-10-11 Werner Lemberg <wl@gnu.org>
  749. * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
  750. 2016-10-08 Werner Lemberg <wl@gnu.org>
  751. * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
  752. 2016-10-08 Werner Lemberg <wl@gnu.org>
  753. [cid] Fix parsing of subr offsets.
  754. Bug introduced 2016-05-16.
  755. * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
  756. 2016-10-01 Werner Lemberg <wl@gnu.org>
  757. [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
  758. * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
  759. a bitmap data table.
  760. 2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  761. [smooth] Remove impossibility.
  762. * src/smooth/ftgrays.c (TWorker): Rearrange fields.
  763. (gray_convert_glyph): Remove impossible condition and clean up.
  764. 2016-09-29 Werner Lemberg <wl@gnu.org>
  765. [pcf] Enrich family name with foundry name and glyph width info.
  766. This is a very old patch from openSuSE (from 2006, submitted to
  767. FreeType in 2011) that I forgot to apply.
  768. https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
  769. Prepend the foundry name plus a space to the family name. There are
  770. many fonts just called `Fixed' which look completely different, and
  771. which have nothing to do with each other. When selecting `Fixed' in
  772. KDE or Gnome one gets results that appear rather random, the style
  773. changes often if one changes the size and one cannot select some
  774. fonts at all.
  775. We also check whether we have `wide' characters; all put together,
  776. we get family names like `Sony Fixed' or `Misc Fixed Wide'.
  777. * src/pcf/pcfread.c (pcf_load_font): Implement it.
  778. * docs/CHANGES: Document it.
  779. 2016-09-29 Werner Lemberg <wl@gnu.org>
  780. [ftfuzzer] Speed up.
  781. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
  782. check for embedded bitmaps if we have a non-default instance.
  783. 2016-09-29 Werner Lemberg <wl@gnu.org>
  784. [truetype] Disallow bitmap strikes for non-default instances.
  785. Also speed up access of default instances if GX variations are
  786. active.
  787. * include/freetype/internal/tttypes.h (TT_FaceRec): Add
  788. `is_default_instance' member.
  789. * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
  790. `is_default_instance'.
  791. * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
  792. load_truetype_glyph): Add test for default instance.
  793. (TT_Load_Glyph): Load embedded bitmaps for default instance only.
  794. * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
  795. `is_default_instance'.
  796. 2016-09-29 Werner Lemberg <wl@gnu.org>
  797. [truetype] Clean up `TT_Face' structure.
  798. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
  799. fields `horz_metrics' and `vert_metrics'.
  800. Update documentation.
  801. * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
  802. 2016-09-28 Werner Lemberg <wl@gnu.org>
  803. More FT_ZERO usage.
  804. * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
  805. s/ft_memset/FT_MEM_ZERO/.
  806. * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
  807. s/ft_memset/FT_ARRAY_ZERO/.
  808. * src/raster/ftraster.c (FT_ZERO): Define.
  809. (ft_black_new): Use it.
  810. * src/raster/ftrend1.c (ft_raster1_get_cbox):
  811. s/FT_MEM_ZERO/FT_ZERO/.
  812. * src/smooth/ftgrays.c (FT_ZERO): Define.
  813. (gray_raster_new): Use it.
  814. * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
  815. s/FT_MEM_ZERO/FT_ZERO/.
  816. 2016-09-28 Werner Lemberg <wl@gnu.org>
  817. */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
  818. 2016-09-27 Werner Lemberg <wl@gnu.org>
  819. [truetype] Trace number of executed opcodes.
  820. * src/truetype/ttinterp.c (TT_RunIns): Implement it.
  821. 2016-09-27 Werner Lemberg <wl@gnu.org>
  822. [truetype] Speed up `TT_Load_Glyph'.
  823. This avoids additional calls to `tt_face_lookup_table' for the
  824. `glyf' table, which can be expensive.
  825. * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
  826. `glyf_offset' field to ...
  827. (TT_FaceRec): ... this structure.
  828. * src/truetype/ttgload.c (load_truetype_glyph): Updated.
  829. (tt_loader_init): Move initialization of `glyf_offset' to ...
  830. * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
  831. 2016-09-27 Werner Lemberg <wl@gnu.org>
  832. [truetype] Introduce dynamic limits for some bytecode opcodes.
  833. This speeds up FreeType's handling of malformed fonts.
  834. * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
  835. of twilight points, the total number of negative jumps, and the
  836. total number of loops in LOOPCALL opcodes. The values are based on
  837. the number of points and entries in the CVT table.
  838. (Ins_JMPR): Test negative jump counter.
  839. (Ins_LOOPCALL): Test loopcall counter.
  840. * src/truetype/ttinterp.h (TT_ExecContext): Updated.
  841. * docs/CHANGES: Updated.
  842. 2016-09-25 Werner Lemberg <wl@gnu.org>
  843. [truetype] Sanitize only last entry of `loca' table.
  844. Without this patch, a loca sequence like `0 100000 0 100000 ...',
  845. where value 100000 is larger than the `glyf' table size, makes
  846. FreeType handle the whole `glyf' table as a single glyph again and
  847. again, which is certainly invalid (and can be very slow, too).
  848. * src/truetype/ttpload.c (tt_face_get_location): Implement.
  849. Improve tracing messages.
  850. 2016-09-25 Werner Lemberg <wl@gnu.org>
  851. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
  852. 2016-09-24 Werner Lemberg <wl@gnu.org>
  853. [autofit] Tracing fixes.
  854. * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
  855. functions only if we actually do tracing.
  856. 2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  857. [smooth] Reduce divisions in the line renderer.
  858. We don't need some divisions if a line segments stays within a single
  859. row or a single column of pixels.
  860. * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
  861. conditional.
  862. 2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
  863. * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
  864. 2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
  865. [smooth] Another tiny speed-up.
  866. * src/smooth/ftgrays.c (gray_find_cell): Merge into...
  867. (gray_record_cell): ... this function.
  868. 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  869. * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
  870. 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  871. [smooth] Fix valgrind warning and reoptimize.
  872. The algorithm calls `gray_set_cell' at the start of each new contour
  873. or when the contours cross the cell boundaries. Double-checking for
  874. that is wasteful.
  875. * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
  876. (gray_convert_glyph): Remove initialization introduced by 44b172e88.
  877. 2016-09-10 Werner Lemberg <wl@gnu.org>
  878. [sfnt] Fix previous commit.
  879. Problems reported as
  880. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
  881. We now map the strike index right before accessing the physical
  882. data, not earlier.
  883. * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
  884. after creating the map so that...
  885. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
  886. can be used before and after setting up `sbit_strike_map'.
  887. (tt_face_set_sbit_strike): Revert change.
  888. (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
  889. * src/truetype/ttdriver.c (tt_size_select): Revert change.
  890. 2016-09-09 Werner Lemberg <wl@gnu.org>
  891. [ftfuzzer] Minor improvements.
  892. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
  893. invalid strikes.
  894. Use better values for call to `FT_Set_Char_Size'.
  895. 2016-09-09 Werner Lemberg <wl@gnu.org>
  896. [sfnt] Don't provide (completely) broken strike data.
  897. FreeType tries to sanitize strike header data; we now reject
  898. completely broken ones.
  899. * include/freetype/internal/tttypes.h (TT_FaceRec): New
  900. `sbit_strike_map' array pointer.
  901. * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
  902. width or height would be zero.
  903. Add tracing message in case of error.
  904. * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
  905. only using (more or less) valid strike header data for
  906. FT_Face's `available_sizes' array.
  907. (sfnt_done_face): Updated.
  908. * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
  909. `sbit_strike_map'.
  910. (tt_face_load_strike_metrics): Improve tracing.
  911. * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
  912. 2016-09-08 Werner Lemberg <wl@gnu.org>
  913. * Version 2.7 released.
  914. =======================
  915. Tag sources with `VER-2-7'.
  916. * docs/VERSION.TXT: Add entry for version 2.7.
  917. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
  918. builds/windows/vc2005/index.html,
  919. builds/windows/vc2008/freetype.vcproj,
  920. builds/windows/vc2008/index.html,
  921. builds/windows/vc2010/freetype.vcxproj,
  922. builds/windows/vc2010/index.html,
  923. builds/windows/visualc/freetype.dsp,
  924. builds/windows/visualc/freetype.vcproj,
  925. builds/windows/visualc/index.html,
  926. builds/windows/visualce/freetype.dsp,
  927. builds/windows/visualce/freetype.vcproj,
  928. builds/windows/visualce/index.html,
  929. builds/wince/vc2005-ce/freetype.vcproj,
  930. builds/wince/vc2005-ce/index.html,
  931. builds/wince/vc2008-ce/freetype.vcproj,
  932. builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
  933. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
  934. (FREETYPE_PATCH): Set to 0.
  935. * builds/unix/configure.raw (version_info): Set to 18:6:12.
  936. * CMakeLists.txt (VERSION_MINOR): Set to 7.
  937. (VERSION_PATCH): Set to 0.
  938. * docs/CHANGES: Updated.
  939. 2016-09-08 Werner Lemberg <wl@gnu.org>
  940. * src/truetype/ttinterp.c: Include `ttgxvar.h'.
  941. This fixes the `multi' build.
  942. 2016-09-08 Werner Lemberg <wl@gnu.org>
  943. [autofit] Another improvement to Armenian support.
  944. Suggested by Hrant H Papazian <hpapazian@gmail.com>.
  945. * src/autofit/afscript.h: Use better suited characters to derive
  946. default stem widths.
  947. 2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  948. * src/smooth/ftgrays.c (gray_hline): Micro-optimize.
  949. 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  950. [smooth] Operate in absolute bitmap coordinates.
  951. Simpler bitmap addressing improves performance by 1.5%.
  952. * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
  953. (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
  954. gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
  955. 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  956. [smooth] Improve contour start (take 2).
  957. * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
  958. instead of...
  959. (gray_start_cell): ... this function, which is removed.
  960. (gray_convert_glyph): Make initial y-coordinate invalid.
  961. 2016-09-06 Werner Lemberg <wl@gnu.org>
  962. [type1] MM fonts support exactly zero named instances (#48748).
  963. * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
  964. 2016-09-06 Jonathan Kew <jfkthame@gmail.com>
  965. [cff] Fix uninitialized memory.
  966. Problem reported as
  967. https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
  968. * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage'
  969. array to handle a `get' opcode without a previous `put'.
  970. 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  971. * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
  972. 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  973. [smooth] Improve contour start.
  974. * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
  975. instead of...
  976. (gray_start_cell): ... this function, which is removed.
  977. 2016-09-05 Werner Lemberg <wl@gnu.org>
  978. [cff] Fix memory initialization.
  979. * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
  980. variants of FreeType's memory allocation macros don't do zeroing.
  981. 2016-09-05 Werner Lemberg <wl@gnu.org>
  982. [ftrandom] Minor improvements.
  983. * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
  984. 500.
  985. * src/tools/ftrandom/Makefile (CFLAGS): Split off include
  986. directories to ...
  987. (INCLUDES): ... this new variable.
  988. (LDFLAGS): New variable.
  989. (ftrandom.o, ftrandom): Updated.
  990. 2016-09-05 Werner Lemberg <wl@gnu.org>
  991. [autofit] Improve Armenian support.
  992. Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
  993. * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
  994. selection of characters.
  995. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  996. 2016-09-04 Werner Lemberg <wl@gnu.org>
  997. [ftrandom] Improve Makefile.
  998. It now supports both a normal build (`./configure && make') and a
  999. development build (`make devel').
  1000. * src/tools/ftrandom/Makefile (VPATH): Set it so that
  1001. `libfreetype.a' gets searched in both `objs' (for the development
  1002. build) and `objs/.libs' (for a normal build which uses libtool).
  1003. (LIBS): Add missing libraries.
  1004. (ftrandom.o): New rule.
  1005. (ftrandom): Use automatic variables.
  1006. 2016-09-03 Werner Lemberg <wl@gnu.org>
  1007. [truetype] More fixes for handling of GX deltas.
  1008. Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
  1009. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
  1010. sanity test for glyph variation array header size.
  1011. Always set stream position before reading packed x and y deltas.
  1012. Fix thinko w.r.t. `localpoints' array.
  1013. 2016-09-03 Werner Lemberg <wl@gnu.org>
  1014. [ftrandom] Various fixes.
  1015. * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
  1016. default.
  1017. (error_fraction): Make it of type `double' to work as advertized –
  1018. this was completely broken.
  1019. Update all related code.
  1020. (error_count, fcnt): Make it unsigned to fix compiler warnings.
  1021. Update all related code.
  1022. (fontlist): Change `len' member to `long' to fix compiler warnings.
  1023. (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
  1024. unused variables.
  1025. (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
  1026. (ExecuteTest): Ditto.
  1027. Call `FT_Done_FreeType'.
  1028. (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
  1029. int'.
  1030. (usage): Improve output.
  1031. (main): Fix compiler warnings.
  1032. * src/tools/ftrandom/README: Updated.
  1033. 2016-09-03 Werner Lemberg <wl@gnu.org>
  1034. [base] Avoid negative bitmap strike dimensions (#48985).
  1035. * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
  1036. actually successful. For example, this can fail for value
  1037. -32768 if the type is `signed short'. If there are problems,
  1038. disable the strike.
  1039. 2016-09-03 Werner Lemberg <wl@gnu.org>
  1040. [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
  1041. * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
  1042. 2016-09-02 Werner Lemberg <wl@gnu.org>
  1043. [unix] Enable 64bit support in file system access (#48962).
  1044. * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
  1045. 2016-09-02 Werner Lemberg <wl@gnu.org>
  1046. [sfnt] Avoid left shift of negative value (#48980).
  1047. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
  1048. constant.
  1049. 2016-09-02 Werner Lemberg <wl@gnu.org>
  1050. * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
  1051. 2016-09-02 Werner Lemberg <wl@gnu.org>
  1052. Some preparations for the next release.
  1053. * include/freetype/config/ftoption.h
  1054. (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
  1055. * docs/CHANGES: Updated.
  1056. 2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  1057. [smooth] Simplify span rendering more.
  1058. It turns out that there is significant cost associated with `FT_Span'
  1059. creation and calls to `gray_render_span' because it happens so
  1060. frequently. This removes these steps from our internal use but leaves
  1061. it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
  1062. is about 5%.
  1063. * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
  1064. migrated to...
  1065. (gray_hline): ... here.
  1066. 2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  1067. [smooth] Streamline pixmap drawing a bit more.
  1068. Zero coverage is unlikely (1 out of 256) to warrant checking. This
  1069. gives 0.5% speed improvement in rendering simple glyphs.
  1070. * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
  1071. 2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
  1072. [smooth] Streamline pixmap drawing.
  1073. This gives 2% speed improvement in rendering simple glyphs.
  1074. * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
  1075. pointer to its bottom-left and pitch to be used in...
  1076. (gray_TWorker): ... here.
  1077. (gray_render_span): Move pixmap flow check from here...
  1078. (gray_raster_render): .. to here.
  1079. 2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  1080. [smooth] Reduce stack of band boundaries.
  1081. * src/smooth/ftgrays.c (gray_TBand): Removed.
  1082. (gray_convert_glyph): Updated to stack band boundaries concisely.
  1083. 2016-08-26 Werner Lemberg <wl@gnu.org>
  1084. * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
  1085. 2016-08-26 Werner Lemberg <wl@gnu.org>
  1086. [cid] Fix commit from 2016-05-16.
  1087. * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
  1088. 2016-08-26 Werner Lemberg <wl@gnu.org>
  1089. [sfnt] Cache offset and size to bitmap data table.
  1090. This commit avoids `EBDT' and friends being looked up again and
  1091. again while loading a single embedded bitmap.
  1092. * include/freetype/internal/tttypes.h (TT_FaceRec)
  1093. [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
  1094. `ebdt_size'.
  1095. * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
  1096. (tt_face_load_sbit): ... this function; also store the table size
  1097. and offset.
  1098. 2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  1099. * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
  1100. 2016-08-26 Werner Lemberg <wl@gnu.org>
  1101. [type1] Fix heap buffer overflow.
  1102. Reported as
  1103. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
  1104. * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
  1105. contain glyph names.
  1106. 2016-08-25 Werner Lemberg <wl@gnu.org>
  1107. [sfnt] Fix previous commit (#48901).
  1108. * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
  1109. 2016-08-25 Werner Lemberg <wl@gnu.org>
  1110. [sfnt] Speed up handling of invalid format 4 cmaps.
  1111. * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
  1112. tests for `num_glyph' from `tt_cmap4_char_map_linear'.
  1113. 2016-08-25 Werner Lemberg <wl@gnu.org>
  1114. * include/freetype/internal/ftdriver.h: Remove unused typedefs.
  1115. 2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  1116. [smooth] Simplify span rendering.
  1117. This removes unnecessary complexity of span merging and buffering.
  1118. Instead, the spans are rendered as they come, speeding up the
  1119. rendering by about 5% as a result.
  1120. * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
  1121. (gray_TWorker): Remove span buffer and related fields.
  1122. (gray_sweep, gray_hline): Updated.
  1123. * include/freetype/ftimage.h: Remove documentation note about
  1124. `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
  1125. 2016-08-16 Werner Lemberg <wl@gnu.org>
  1126. [truetype] Fix `MPS' instruction.
  1127. According to Greg Hitchcock, MPS in DWrite really returns the point
  1128. size.
  1129. * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
  1130. * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
  1131. * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
  1132. member.
  1133. * src/truetype/ttinterp.c (TT_Load_Context): Updated.
  1134. (Ins_MPS): Fix instruction.
  1135. 2016-08-16 Werner Lemberg <wl@gnu.org>
  1136. [lzw] Optimize last commit.
  1137. * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
  1138. conditional clause.
  1139. 2016-08-16 Werner Lemberg <wl@gnu.org>
  1140. [lzw] Avoid invalid left shift.
  1141. Reported as
  1142. https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
  1143. * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
  1144. 2016-08-16 Werner Lemberg <wl@gnu.org>
  1145. [lzw] Avoid buffer overrun.
  1146. Reported as
  1147. https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
  1148. * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
  1149. underflow.
  1150. 2016-08-16 Werner Lemberg <wl@gnu.org>
  1151. [truetype] Fix compiler warning.
  1152. * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
  1153. 2016-08-13 Werner Lemberg <wl@gnu.org>
  1154. [winfonts] Avoid zero bitmap width and height.
  1155. Reported as
  1156. https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
  1157. * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
  1158. (FNT_Load_Glyph): Check for zero pitch.
  1159. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  1160. * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
  1161. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  1162. * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
  1163. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  1164. * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
  1165. 2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
  1166. * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
  1167. 2016-08-10 Werner Lemberg <wl@gnu.org>
  1168. [sfnt] Use correct type for `italicAngle' field (#48732).
  1169. * src/sfnt/ttload.c (tt_face_load_post): Fix types.
  1170. 2016-08-06 Jon Spencer <jon@jonspencer.ca>
  1171. [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
  1172. `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
  1173. advance value from the font table and then scales it by the
  1174. `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
  1175. set that value for bitmap fonts and the advance gets scaled to zero.
  1176. Taken from
  1177. https://github.com/behdad/harfbuzz/issues/252
  1178. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
  1179. <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
  1180. 2016-08-06 Behdad Esfahbod <behdad@behdad.org>
  1181. [truetype] Fix GX variation handling of composites.
  1182. * src/truetype/ttgload.c (load_truetype_glyph)
  1183. [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
  1184. 2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  1185. [smooth] Minor refactoring.
  1186. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
  1187. Updated.
  1188. 2016-07-29 Werner Lemberg <wl@gnu.org>
  1189. [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
  1190. Since 2016-05-16 we detect infinite recursion directly.
  1191. * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
  1192. `maxComponentDepth'.
  1193. * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
  1194. `maxComponentDepth' is not valid. Instead, simply adjust its value
  1195. and emit a tracing message.
  1196. 2016-07-26 Werner Lemberg <wl@gnu.org>
  1197. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
  1198. No functional change.
  1199. 2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
  1200. [truetype] Record the end of IDEFs.
  1201. To match the logic in FDEF. The value of the end is only used for
  1202. bound-checking in `Ins_JMPR', so it may not have been obvious that
  1203. it was not recorded. Tested (as part of Font Validator 2.0) all the
  1204. fonts on Fedora and did not see any change.
  1205. * src/truetype/ttinterp.c (Ins_IDEF): Updated.
  1206. 2016-07-19 Werner Lemberg <wl@gnu.org>
  1207. [truetype] Sanitizer fix, second try.
  1208. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
  1209. tests and use only one slot more.
  1210. 2016-07-19 Werner Lemberg <wl@gnu.org>
  1211. [truetype] Sanitizer fix.
  1212. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
  1213. to fix nested loops.
  1214. 2016-07-18 Werner Lemberg <wl@gnu.org>
  1215. [truetype] Make GETDATA work only for GX fonts.
  1216. * src/truetype/ttinterp.c (opcode_name): Updated.
  1217. (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
  1218. (TT_RunIns): Updated.
  1219. 2016-07-17 Werner Lemberg <wl@gnu.org>
  1220. [truetype] Add support for Apple's
  1221. GETDATA[], opcode 0x92
  1222. bytecode instruction. It always returns 17, and we have absolutely
  1223. no idea what it is good for...
  1224. * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
  1225. (Ins_GETDATA): New function.
  1226. (TT_RunIns): Add it.
  1227. 2016-07-16 Werner Lemberg <wl@gnu.org>
  1228. [truetype] Add bytecode support for GX variation fonts.
  1229. This commit implements undocumented (but confirmed) stuff from
  1230. Apple's old bytecode engine.
  1231. GETVARIATION[], opcode 0x91
  1232. This opcode pushes normalized variation coordinates for all axes
  1233. onto the stack (in 2.14 format). Coordinate of first axis gets
  1234. pushed first.
  1235. GETINFO[], selector bit 3
  1236. If GX variation support is enabled, bit 10 of the result is set
  1237. to 1.
  1238. * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
  1239. (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
  1240. (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
  1241. bit 3, checking support for variation glyph hinting.
  1242. (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
  1243. to implement opcode 0x91.
  1244. (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
  1245. 2016-07-16 Werner Lemberg <wl@gnu.org>
  1246. [truetype] Fix GETINFO bytecode instruction.
  1247. * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
  1248. stretching information.
  1249. 2016-07-16 Behdad Esfahbod <behdad@behdad.org>
  1250. [truetype] Make all glyphs in `Zycon' GX font work.
  1251. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
  1252. tests.
  1253. 2016-07-16 Werner Lemberg <wl@gnu.org>
  1254. [truetype] Fix GX delta tracing.
  1255. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
  1256. relative point movements.
  1257. 2016-07-16 Behdad Esfahbod <behdad@behdad.org>
  1258. [truetype] More fixes for GX.
  1259. This finally fixes the rendering of the cyclist and the lizard in
  1260. the `Zycon' font.
  1261. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
  1262. index is always cumulative.
  1263. (tt_handle_deltas): Rename to...
  1264. (tt_interpolate_deltas): ... This.
  1265. Add new parameter for output point array.
  1266. Update caller.
  1267. (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
  1268. the intermediate results of `tt_interpolate_deltas' that are to be
  1269. added to `outline->points'.
  1270. 2016-07-15 Werner Lemberg <wl@gnu.org>
  1271. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
  1272. `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
  1273. Reported by Alexei.
  1274. 2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
  1275. * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
  1276. Problem reported by Hin-Tak Leung.
  1277. 2016-07-15 Werner Lemberg <wl@gnu.org>
  1278. [autofit] Update and improve segment and edge tracing.
  1279. * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
  1280. `delta' also.
  1281. Don't show first point of segment as a replacement for `pos'; this
  1282. is (a) misleading, since the difference to `pos' can be almost
  1283. arbitrarily large in corner cases, and (b) it is better to have all
  1284. segment data in font units instead of a single value given in output
  1285. space coordinates.
  1286. Improve layout.
  1287. (af_glyph_hints_dump_edges): Show px->units and units->px conversion
  1288. values for convenience.
  1289. Improve layout.
  1290. 2016-07-15 Werner Lemberg <wl@gnu.org>
  1291. [autofit] For edges, reject segments wider than 1px (#41334).
  1292. * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
  1293. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
  1294. `delta'.
  1295. (af_latin_hints_compute_edges): Reject segments with a delta larger
  1296. than 0.5px.
  1297. 2016-07-14 Werner Lemberg <wl@gnu.org>
  1298. * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
  1299. 2016-07-14 Werner Lemberg <wl@gnu.org>
  1300. [sfnt] Fix `face_index' value in `FT_Face' for named instances.
  1301. * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits.
  1302. 2016-07-14 Werner Lemberg <wl@gnu.org>
  1303. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
  1304. 2016-07-14 Behdad Esfahbod <behdad@behdad.org>
  1305. [truetype] Fix gxvar delta interpolation.
  1306. The coordinates of the base font should be used for interpolation
  1307. purposes, NOT the current points (i.e., the result of accumulation
  1308. of previous deltas).
  1309. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
  1310. `points_org' before looping over all tuples.
  1311. ----------------------------------------------------------------------------
  1312. Copyright (C) 2016-2019 by
  1313. David Turner, Robert Wilhelm, and Werner Lemberg.
  1314. This file is part of the FreeType project, and may only be used, modified,
  1315. and distributed under the terms of the FreeType project license,
  1316. LICENSE.TXT. By continuing to use, modify, or distribute this file you
  1317. indicate that you have read the license and understand and accept it
  1318. fully.
  1319. Local Variables:
  1320. version-control: never
  1321. coding: utf-8
  1322. End: