ChangeLog 93 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149
  1. 2019-07-04 Werner Lemberg <wl@gnu.org>
  2. [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580).
  3. The same as previous commit but for the old engine.
  4. * src/psaux/t1decode.c (t1operator_seac): Implement it.
  5. 2019-07-04 Chris Liddell <chris.liddell@artifex.com>
  6. [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).
  7. As originally intended, a Type 1 SEAC charstring would be used for
  8. an accented glyph (like `acaron' or `uumlaut'), where the advance
  9. width of the SEAC glyph is the same as that of the `base' glyph
  10. (like `a' or `u'). In this case it is not uncommon for the SEAC
  11. glyph to not use an (H)SBW opcode of its own but to rely on the
  12. value from the base glyph.
  13. However, out-of-spec fonts also use SEAC glyphs for ligatures (like
  14. `oe' or `fi'), and in those cases the overall advance width is
  15. greater than that of the `base' glyph. For this reason we have to
  16. allow that the SEAC glyph can have an (H)SBW value of its own, and
  17. if it has, retain this value, rather than the one from the base
  18. glyph.
  19. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSEAC>:
  20. Implement it.
  21. 2019-07-01 Werner Lemberg <wl@gnu.org>
  22. * Version 2.10.1 released.
  23. ==========================
  24. Tag sources with `VER-2-10-1'.
  25. * docs/VERSION.TXT: Add entry for version 2.10.1.
  26. * README, Jamfile (RefDoc), src/base/ftver.rc,
  27. builds/windows/vc2010/freetype.vcxproj,
  28. builds/windows/vc2010/index.html,
  29. builds/windows/visualc/freetype.dsp,
  30. builds/windows/visualc/freetype.vcproj,
  31. builds/windows/visualc/index.html,
  32. builds/windows/visualce/freetype.dsp,
  33. builds/windows/visualce/freetype.vcproj,
  34. builds/windows/visualce/index.html,
  35. builds/wince/vc2005-ce/freetype.vcproj,
  36. builds/wince/vc2005-ce/index.html,
  37. builds/wince/vc2008-ce/freetype.vcproj,
  38. builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
  39. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  40. * builds/unix/configure.raw (version_info): Set to 23:1:17.
  41. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  42. * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
  43. 2019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  44. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.
  45. Reported by Armin Hasitzka.
  46. 2019-06-16 Werner Lemberg <wl@gnu.org>
  47. * src/tools/apinames.c: Formatting, minor edits.
  48. 2019-06-16 Werner Lemberg <wl@gnu.org>
  49. [autofit] Disable hinting if no blue zones are available (#56450).
  50. * src/autofit/afglobal.c (af_face_global_get_metrics): Start again
  51. (with dummy hinter module) if no blue zones are present.
  52. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change
  53. signature to return error code.
  54. If no blue zones are found, update `glyph_styles' array to hold
  55. AF_STYLE_NONE_DFLT instead of the current style.
  56. (af_latin_metrics_init): Return internal error code if no blue zones
  57. are found.
  58. 2019-06-16 Werner Lemberg <wl@gnu.org>
  59. Towards better VMS support.
  60. More to come.
  61. * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64,
  62. builds/vms/vmslib.dat: New files provided by Jouk Jansen
  63. <joukj@hrem.nano.tudelft.nl>.
  64. * builds/vms/ftconfig.h: Update, also from Jouk.
  65. 2019-06-13 Werner Lemberg <wl@gnu.org>
  66. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.
  67. 2019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com>
  68. [smooth] Restore the span buffering for direct mode only.
  69. The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be
  70. enough to cover the entire scanline for simple glyphs in most cases:
  71. each slightly slanted edge needs up to two spans, plus a filling span
  72. in-between. This is not new, we used to do it before cb4388783cecc.
  73. * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'.
  74. (gray_hline, gray_sweep): Implement the span buffering.
  75. (gray_raster_render): Use negative `num_spans' to avoid the direct
  76. mode.
  77. 2019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  78. * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.
  79. Fix a warning by adding a return value as in `TT_RunIns',
  80. which should not be a compatibility issue.
  81. 2019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  82. * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.
  83. 2019-06-11 Moazin Khatti <moazinkhatri@gmail.com>
  84. [gzip] Add support for `gzip' encoded header.
  85. * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to
  86. `inflateInit2' to enable support for `gzip' encoded headers.
  87. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  88. [type1,type42] Use `const' for string literals.
  89. * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated.
  90. * include/freetype/internal/t1types.h (T1_EncodingRec): Updated.
  91. * src/psaux/psobjs.[ch] (ps_table_add): Updated.
  92. * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated.
  93. * src/type42/t42objs.c (T42_Open_Face): Updated.
  94. * src/type42/t42parse.c (t42_parse_encoding): Updated.
  95. * src/cff/cffobjs.c (cff_face_init): Minor.
  96. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  97. [bdf,pcf] Use `const' for string literals.
  98. * src/bdf/bdf.h (bdf_property_t): Updated `name'.
  99. * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property,
  100. _bdf_add_property,_bdf_ato*): Updated.
  101. * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated.
  102. * src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
  103. 2019-06-07 Philip Race <philip.race@oracle.com>
  104. * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.
  105. Terminate loop at end of environment.
  106. 2019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  107. Solidify VC2005 builds.
  108. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
  109. declare `_BitScanReverse' intrinsic.
  110. * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
  111. 2019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  112. [sfnt] Separate WOFF sources and headers.
  113. Move WOFF sources and headers to separate files.
  114. * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
  115. src/sfnt/sfwoff.h: New files.
  116. * include/freetype/internal/fttrace.h: Register `sfwoff.c'.
  117. * include/freetype/internal/internal.h: Define
  118. FT_INTERNAL_WOFF_TYPES_H.
  119. * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.
  120. * include/freetype/internal/tttypes.h: Move out WOFF structures.
  121. * src/sfnt/rules.mk: Add `sfwoff.c'.
  122. * src/sfnt/sfnt.c: Include `sfwoff.c'.
  123. * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
  124. 2019-05-30 Werner Lemberg <wl@gnu.org>
  125. [base] Fix `make multi'.
  126. Reported by Nikhil.
  127. * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
  128. 2019-05-29 Ben Wagner <bungeman@google.com>
  129. [truetype] Fix copy-and-paste error (#56409).
  130. * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
  131. into `unrounded' array for phantom points.
  132. 2019-05-29 Werner Lemberg <wl@gnu.org>
  133. [truetype] Fix 32bit builds (#56404).
  134. Patch suggested by Ben Wagner <bungeman@google.com>.
  135. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
  136. harmful cast to unsigned type.
  137. 2019-05-26 Ben Wagner <bungeman@google.com>
  138. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
  139. 2019-05-23 Werner Lemberg <wl@gnu.org>
  140. [truetype] Draw glyphs without deltas in variation font (#56374).
  141. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
  142. `unrounded' array.
  143. 2019-05-21 Werner Lemberg <wl@gnu.org>
  144. * src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
  145. 2019-05-16 Werner Lemberg <wl@gnu.org>
  146. [truetype] Actually scale varied CVT values.
  147. Up to now, only the unscaled CVT values were varied; in other words,
  148. the `CVAR' data was never used for bytecode hinting.
  149. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
  150. function.
  151. (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
  152. 2019-05-16 Werner Lemberg <wl@gnu.org>
  153. [truetype] Use 26.6 format for storing unscaled CVT values.
  154. If `CVAR' data is applied to variation fonts, fractional values are
  155. possible.
  156. * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
  157. `cvt' from `FT_Short' to `FT_Int32'.
  158. * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
  159. (tt_face_vary_cvt): Use it to update code to 26.6 format.
  160. * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
  161. format.
  162. * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
  163. format.
  164. 2019-05-16 Werner Lemberg <wl@gnu.org>
  165. * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.
  166. This fixes linear advance width values for spacing glyphs. Bug
  167. introduced 2019-05-09.
  168. 2019-05-16 Werner Lemberg <wl@gnu.org>
  169. [truetype] Avoid code duplication.
  170. * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this
  171. function.
  172. (tt_size_ready_bytecode): Updated.
  173. * src/truetype/ttgload.c (tt_loader_init): Updated.
  174. 2019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl>
  175. * vms_make.com: Updated. Handle `bzip2' directory, too.
  176. 2019-05-13 Werner Lemberg <wl@gnu.org>
  177. * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.
  178. 2019-05-12 Werner Lemberg <wl@gnu.org>
  179. [truetype] Doh. Fix last commit to make it work.
  180. Very embarassing :-)
  181. Reported as
  182. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
  183. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
  184. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
  185. * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
  186. argument; update all callers.
  187. (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active
  188. for variation fonts only, thus also enclose related code with
  189. `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where
  190. necessary.
  191. Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
  192. but allocate a temporary array.
  193. Speed up the scaling of the `unrounded' array.
  194. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
  195. conversions and rounding. The unsigned type must have more or equal
  196. bits to the signed type.
  197. 2019-05-09 Werner Lemberg <wl@gnu.org>
  198. [truetype] Increase precision of font variation (#54371).
  199. This patch makes FreeType use font units in 26.6 format internally
  200. instead of integers.
  201. * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
  202. (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
  203. coordinates.
  204. * src/truetype/ttgxvar.h: Updated.
  205. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
  206. `extra_points2' array to temporarily hold unrounded point
  207. coordinates; use them to compute scaled coordinates and linear
  208. advance width and height.
  209. (load_truetype_code): Adjust similarly.
  210. 2019-05-09 Werner Lemberg <wl@gnu.org>
  211. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.
  212. 2019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  213. [smooth] Faster fractions.
  214. * src/smooth/ftgrays.c (SUBPIXELS): Replace with...
  215. (FRACT): A fractional coordinate macro to use in...
  216. (gray_render_line, gray_render_scanline): ... here.
  217. 2019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  218. * src/raster/ftraster.c (Draw_Sweep): Unbreak.
  219. 2019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  220. * src/raster/ftraster.c: Clean-ups.
  221. 2019-05-05 Werner Lemberg <wl@gnu.org>
  222. * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
  223. 2019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  224. * src/smooth/ftgrays.c (gray_render_line): Small shortcut.
  225. 2019-05-04 Werner Lemberg <wl@gnu.org>
  226. Various clang 8.0 static analyzer fixes.
  227. Reported by Sender Ghost <lightside@gmx.com>.
  228. * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
  229. case where `edge->first' could be NULL.
  230. * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
  231. `size'.
  232. * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
  233. `draw_right' might be NULL.
  234. * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
  235. `aadvance'.
  236. Ensure `abearing' always hold a meaningful result.
  237. * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
  238. not NULL before accessing it.
  239. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
  240. test of `namedstyle'.
  241. * src/type42/t42parse.c (t42_parser_done): Ensure
  242. `parser->root.funcs.done' is not NULL before accessing it.
  243. 2019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  244. Miscellaneous macro updates.
  245. * src/base/ftoutln.c (SCALED): Updated.
  246. * src/smooth/ftgrays.c (SCALED): Ditto.
  247. (FLOOR, ROUND, CEILING): Removed.
  248. * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
  249. 2019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  250. Tweak LCD filtering.
  251. * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
  252. Choose direction from bitmap's pixel_mode.
  253. * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc):
  254. Updated.
  255. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
  256. 2019-05-02 Werner Lemberg <wl@gnu.org>
  257. * vms_make.com: Updated (#56253).
  258. Remove no longer existing directories (`autohint', `otlayout').
  259. Update used base extensions.
  260. Activate `autofit' module.
  261. Add `gxvalid' module.
  262. Update copyright notices.
  263. 2019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
  264. [smooth] Simplify cubic Bézier flattening.
  265. The previous implementation is correct but it is too complex.
  266. The revised algorithm is based on the fact that each split moves
  267. the control points closer to the trisection points on the chord.
  268. The corresponding distances are good surrogates for the curve
  269. deviation from the straight line.
  270. This cubic flattening algorithm is somewhat similar to the conic
  271. algorithm based the distance from the control point to the middle of
  272. the chord. The cubic distances, however, decrease less predictably
  273. but are easy enough to calculate on each step.
  274. The new algorithm produces slightly larger number of splits, which is
  275. compensated by its simplicity. The overall rendering performance is
  276. improved by 1-2%. The larger number of splits does not necessarily
  277. result in higher quality, which stays comparable.
  278. * src/smooth/ftgrays.c (gray_render_cubic): Replace the split
  279. condition.
  280. 2019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  281. [smooth] Bithacks and cosmetics.
  282. * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline,
  283. gray_render_conic, gray_convert_glyph_inner): Updated.
  284. 2019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  285. Optimize Bézier bisections.
  286. This change makes bisections faster by 20-30%. When inlined into
  287. `gray_render_cubic', this makes the function faster by 10% and is
  288. noticeable in the overall rendering performance.
  289. * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and
  290. refactor.
  291. * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto.
  292. * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto.
  293. * src/base/ftbbox.c (cubic_peak): Use shifts.
  294. 2019-04-23 Werner Lemberg <wl@gnu.org>
  295. * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.
  296. Found by clang 8.0's static analyzer and reported by Sender Ghost
  297. <lightside@gmx.com>.
  298. 2019-04-23 Werner Lemberg <wl@gnu.org>
  299. [base] Fix thinko in previous commit.
  300. * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not
  301. target pitch.
  302. Problem reported by Sender Ghost <lightside@gmx.com>.
  303. 2019-04-22 Werner Lemberg <wl@gnu.org>
  304. * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
  305. Problem reported by Sender Ghost <lightside@gmx.com>.
  306. 2019-04-22 Werner Lemberg <wl@gnu.org>
  307. Fix return value of `FT_Set_Named_Instance' (#56186).
  308. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
  309. internal return value -1 of `TT_Set_Var_Design'.
  310. 2019-04-18 Werner Lemberg <wl@gnu.org>
  311. [pcf] Fix handling of undefined glyph (#56067).
  312. This commit fixes the changes from 2018-07-21, which broke charmap
  313. iteration. We now add the default character as a new glyph with
  314. index 0, thus increasing the number of glyphs by one (as before).
  315. * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial
  316. glyph with index 0.
  317. Limit number of elements to 65534.
  318. (pcf_get_bitmaps): Ditto.
  319. Unify two loops into one; this avoids allocation of an intermediate
  320. array.
  321. (pcf_get_encodings): Don't flip indices but copy glyph metrics of
  322. default character to index 0.
  323. Also handle invalid default character.
  324. * docs/CHANGES: Updated.
  325. 2019-04-15 Minmin Gong <gongminmin@msn.com>
  326. * CMakeLists.txt: Avoid rewriting of unchanged configuration files.
  327. Reported as
  328. https://savannah.nongnu.org/patch/index.php?9755
  329. 2019-04-15 JDG <JonathanG@iQmetrix.com>
  330. * src/tools/apinames.c (main): Fix error message.
  331. Reported as
  332. https://savannah.nongnu.org/patch/?9796
  333. 2019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  334. [smooth] Fix segfault in direct mode (#56092).
  335. * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for
  336. direct mode.
  337. * src/smooth/ftgrays.c (gray_raster_render): Use it.
  338. 2019-04-06 Werner Lemberg <wl@gnu.org>
  339. * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
  340. This is for Visual Studio 2019 on ARM.
  341. 2019-04-06 Werner Lemberg <wl@gnu.org>
  342. For distribution, replace `.tar.bz2' with `.tar.xz' bundles.
  343. * builds/toplevel.mk (build): Do it.
  344. * README, docs/CHANGES, docs/release: Updated.
  345. 2019-04-06 Antony Lee <anntzer.lee@gmail.com>
  346. Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.
  347. * include/freetype/freetype.h (FT_Get_Name_Index),
  348. include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc),
  349. include/freetype/internal/services/svgldict.h
  350. (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index),
  351. src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c
  352. (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index),
  353. src/type42/t42drivr.c (t42_get_name_index): Add `const' to second
  354. argument.
  355. 2019-03-31 Armin Hasitzka <prince.cherusker@gmail.com>
  356. [cff] Fix boundary checks.
  357. 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically
  358. allocated memory when parsing CFF files with the "old" engine. Bounds
  359. checks have never been updated, however, leading to pointless
  360. comparisons of pointers in some cases. This commit presents a
  361. solution for bounds checks in the CFF module with an extended logic
  362. for the "old" engine while staying as concise as possible for the
  363. "new" one.
  364. * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and
  365. the additional field `t2_strings' within `CFF_ParserRec'.
  366. * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary
  367. checks into this new function and update the rest of `cffparse.c' to
  368. use it.
  369. Reported as
  370. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
  371. 2019-03-20 Werner Lemberg <wl@gnu.org>
  372. [autofit] Fix Mongolian blue zone characters.
  373. * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters
  374. to get medial forms for some Mongolian characters.
  375. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  376. 2019-03-19 Werner Lemberg <wl@gnu.org>
  377. [autofit] Add support for Mongolian script.
  378. As a de-facto standard, layouts using this script are constructed
  379. horizontally line by line, then the lines are rotated clockwise for
  380. vertical display.
  381. * src/autofit/afblue.dat: Add blue zone data for Mongolian.
  382. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  383. * src/autofit/afscript.h: Add Mongolian standard characters.
  384. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian
  385. data.
  386. 2019-03-15 Werner Lemberg <wl@gnu.org>
  387. * Version 2.10.0 released.
  388. ==========================
  389. Tag sources with `VER-2-10-0'.
  390. * docs/VERSION.TXT: Add entry for version 2.10.0.
  391. * docs/CHANGES: Updated.
  392. * README, Jamfile (RefDoc), src/base/ftver.rc,
  393. builds/windows/vc2010/freetype.vcxproj,
  394. builds/windows/vc2010/index.html,
  395. builds/windows/visualc/freetype.dsp,
  396. builds/windows/visualc/freetype.vcproj,
  397. builds/windows/visualc/index.html,
  398. builds/windows/visualce/freetype.dsp,
  399. builds/windows/visualce/freetype.vcproj,
  400. builds/windows/visualce/index.html,
  401. builds/wince/vc2005-ce/freetype.vcproj,
  402. builds/wince/vc2005-ce/index.html,
  403. builds/wince/vc2008-ce/freetype.vcproj,
  404. builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
  405. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
  406. (FREETYPE_PATCH): Set to 0.
  407. * builds/unix/configure.raw (version_info): Set to 23:0:17.
  408. * CMakeLists.txt (VERSION_MINOR): Set to 10.
  409. (VERSION_PATCH): Set to 0.
  410. * builds/toplevel.mk (version, winversion): Since the minor version
  411. number has two digits now, never omit the patch number. We would
  412. get ambiguous zip file names otherwise.
  413. (dist): Remove remnants of `docmaker' tool.
  414. (do-dist): Remove unused intermediate files.
  415. * src/cff/cffparse.c (destrict_c2s_item): Guard function with
  416. CFF_CONFIG_OPTION_OLD_ENGINE macro.
  417. 2019-03-07 Andrei Alexeyev <0x416b617269@gmail.com>
  418. Werner Lemberg <wl@gnu.org>
  419. Fix invalid function pointer casts.
  420. This change should allow Freetype to work on WASM/Emscripten without
  421. needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
  422. * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
  423. * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
  424. parse_expansion_factor, parse_font_name): Return `void', not
  425. `FT_Error'.
  426. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
  427. Fix signature.
  428. 2019-03-05 Werner Lemberg <wl@gnu.org>
  429. [base] Handle numeric overflow (#55827).
  430. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
  431. 2019-03-05 Sebastian Rasmussen <sebras@gmail.com>
  432. [psaux] Fix use of uninitialized memory (#55832).
  433. * src/psaux/psintrp.c (cf2_interpT2CharString): The call to
  434. `cf2_arrstack_setCount' may fail because the allocator ran out of
  435. memory. When this happens the stack is still written to before the
  436. error condition is checked. This means that FreeType writes outside
  437. of allocated memory. This commit moves the error check prior to the
  438. stack assignment, hence the function now properly returns with an
  439. error condition.
  440. 2019-02-23 Werner Lemberg <wl@gnu.org>
  441. * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets.
  442. The function only provided a framework without an actual
  443. implementation, which this commit removes.
  444. 2019-02-23 Werner Lemberg <wl@gnu.org>
  445. * src/tools/update-copyright-year: Insert `(C)'.
  446. 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
  447. [truetype] Mask numeric overflows.
  448. * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP):
  449. Mask numeric overflows.
  450. Reported as
  451. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681
  452. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734
  453. 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
  454. [psaux] Mask numeric overflow.
  455. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
  456. overflow.
  457. Reported as
  458. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
  459. 2019-02-16 Wink Saville <wink@saville.com>
  460. * src/autofit/afwarp.h (af_warper_compute): Fix declaration.
  461. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
  462. [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
  463. Instead of setting typo or win metrics as the new `FT_Face' metrics
  464. indiscriminately, apply only typo deltas to the currently active
  465. `FT_Face' metrics. This prevents line height differences when the
  466. default outlines were used as the regular face and instances for
  467. everything else, for example.
  468. * src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
  469. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
  470. [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set.
  471. If the `OS/2' table exists and `fsSelection' bit 7
  472. (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute
  473. the `FT_Face's ascender, descender, and height. Otherwise, fall
  474. back to old behavior.
  475. * src/sfnt/sfobjs.c (sfnt_load_face): Implement.
  476. 2019-01-18 John Tytgat <John.Tytgat@esko.com>
  477. [sfnt] Handle TT fonts having two PostScript font names (#55471).
  478. * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
  479. other language found for PostScript font names.
  480. 2019-01-08 Chris Liddell <chris.liddell@artifex.com>
  481. [psaux] Fix closepath (#55414).
  482. All of the Type 1 path building is done with code common to the
  483. revised CFF engine, with the exception of closepath, which was still
  484. calling ps_builder_close_contour(), thus previously cached segments
  485. were not always written to the path, and glyph corruption, or even
  486. invalid outlines were possible.
  487. * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
  488. Switch to calling `cf2_glyphpath_closeOpenPath'.
  489. 2018-12-29 Werner Lemberg <wl@gnu.org>
  490. * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310).
  491. 2018-12-25 Werner Lemberg <wl@gnu.org>
  492. * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
  493. Reported as
  494. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
  495. 2018-12-12 Werner Lemberg <wl@gnu.org>
  496. [gxvalid] Fix compiler warnings.
  497. * src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
  498. src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
  499. 2018-12-11 Werner Lemberg <wl@gnu.org>
  500. * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
  501. `control_len' only gets its value from `n_ins' (and vice versa),
  502. which is always read as `unsigned short' and thus can't be larger
  503. than 0xFFFF.
  504. 2018-12-04 Werner Lemberg <wl@gnu.org>
  505. [bdf] Ignore data after `ENDFONT'.
  506. Reported as
  507. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
  508. * src/bdf/bdflib.c (_bdf_parse_end): New function.
  509. (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
  510. been encountered.
  511. 2018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  512. * builds/windows/visualc/freetype.dsp: Dust off.
  513. 2018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  514. * builds/windows/vc2010/freetype.vcxproj: Simplify.
  515. 2018-11-27 Chris Liddell <chris.liddell@artifex.com>
  516. [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
  517. For multiple master fonts, common usage (in Postscript) is to modify
  518. the WeightVector of an existing font instance, this addition
  519. supports that use.
  520. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
  521. FT_Get_MM_WeightVector): New API functions.
  522. * include/freetype/internalservices/svmm.h
  523. (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
  524. function types.
  525. (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
  526. members.
  527. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  528. * src/cffcffdrivr.c (cff_set_mm_weightvector,
  529. cff_get_mm_weightvector): New functions.
  530. (cff_service_multi_masters): Register them.
  531. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  532. This driver doesn't use the new interface.
  533. * src/type1/t1load.c (T1_Set_MM_WeightVector,
  534. T1_Get_MM_WeightVector): New functions.
  535. * src/type1/t1driver.c (t1_service_multi_masters): Register them.
  536. * src/type1/t1load.h: Updated.
  537. 2018-11-27 Ben Wagner <bungeman@google.com>
  538. [cff] Fix compiler warning (#55105).
  539. * src/cff/cffparse.c (cff_parser_run): Guard label only used if
  540. CFF_CONFIG_OPTION_OLD_ENGINE is active.
  541. 2018-11-27 Ben Wagner <bungeman@google.com>
  542. [truetype] Fix numeric overflow (#55103).
  543. * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
  544. 2018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  545. [builds] Belated DLL support with vc2002-vc2008.
  546. The solution and project files should be automatically upgraded for
  547. the approriate Visual C++ version.
  548. * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
  549. * builds/windows/visualc/index.html: Document the change.
  550. * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
  551. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
  552. * src/cff/cffparse.c: Please the compiler.
  553. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
  554. [cff] Fix memory overflow.
  555. Reported as
  556. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
  557. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
  558. * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
  559. evaluated T2 charstrings in separately allocated memory.
  560. 2018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  561. * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
  562. 2018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  563. [smooth] Placeholder only for library-enabled LCD filtering.
  564. * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
  565. `FT_Library_SetLcdFilter' call.
  566. 2018-11-09 Young Xiao <yangx92@hotmail.com>
  567. [psaux] Add safety guard (#54985).
  568. * src/psaux/psobjs.c (cff_builder_close_contour): Do it.
  569. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  570. * builds/unix/configure.raw: Require `windows.h' for windres.
  571. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  572. [ftstroke] Fix unpredictable failures (#54986).
  573. * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
  574. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  575. [ftstroke] Fix unpredictable failures (#54976).
  576. * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
  577. 2018-11-07 Ben Wagner <bungeman@google.com>
  578. [truetype] Fix VF check from 2018-09-12 (#54973).
  579. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
  580. offsets for estimates.
  581. 2018-11-06 Werner Lemberg <wl@gnu.org>
  582. [pshinter] Fix numeric overflow.
  583. Reported as
  584. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
  585. * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
  586. 2018-11-06 Werner Lemberg <wl@gnu.org>
  587. [psaux] Fix timeout in old CFF engine.
  588. Reported as
  589. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
  590. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  591. <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
  592. loop.
  593. 2018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  594. * src/truetype/ttgxvar.c: Use enum definitions.
  595. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  596. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
  597. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  598. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
  599. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  600. Revert due to specs: [truetype] Speed up variation IUP.
  601. 2018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  602. * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
  603. Reported and tested by Behdad.
  604. 2018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
  605. [autofit] Prevent SEGV.
  606. See
  607. https://bugs.ghostscript.com/show_bug.cgi?id=697545
  608. for more details on how the bug was found.
  609. * src/autofit/afloader.c (af_loader_load_glyph): Propagate error
  610. code.
  611. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  612. [truetype] Speed up variation IUP.
  613. * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
  614. snapping to the same position from true interpolation.
  615. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  616. * src/type1/t1load.c (t1_set_mm_blend): Optimized.
  617. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  618. * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
  619. 2018-10-29 Werner Lemberg <wl@gnu.org>
  620. [base] Fix numeric overflow.
  621. Reported as
  622. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
  623. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
  624. 2018-10-29 Werner Lemberg <wl@gnu.org>
  625. [cff] Fix numeric overflow.
  626. Reported as
  627. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
  628. * src/cff/cffparse.c (cff_parser_run)
  629. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
  630. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  631. [sfnt] Make `head' timestamps unsigned.
  632. It's been more than 2^31 seconds since 1904.
  633. * include/freetype/tttables.h (TT_Header): Change field types.
  634. * src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
  635. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  636. Revert: Align FreeType with standard C memory management.
  637. 2018-10-27 Werner Lemberg <wl@gnu.org>
  638. [psaux] Fix numeric overflow.
  639. Triggered by
  640. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
  641. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
  642. [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
  643. 2018-10-20 Werner Lemberg <wl@gnu.org>
  644. Avoid endless loop while tracing (#54858).
  645. * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
  646. FT_DEBUG_LEVEL_TRACE.
  647. 2018-10-17 David Demelier <markand@malikania.fr>
  648. * CMakeLists.txt: Specify `RUNTIME DESTINATION'.
  649. This is needed for DLL builds.
  650. 2018-10-07 Werner Lemberg <wl@gnu.org>
  651. A missing Unicode cmap is not a fatal error.
  652. This is a follow-up to the previous commit.
  653. * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
  654. (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
  655. src/type42/t42objs.c (T42_Face_Init): Implement it.
  656. 2018-10-07 Werner Lemberg <wl@gnu.org>
  657. Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
  658. * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
  659. (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
  660. Check `unicodes_init' field.
  661. 2018-10-03 Werner Lemberg <wl@gnu.org>
  662. [ftgrays] Fix typo in stand-alone mode (#54771).
  663. * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
  664. FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
  665. 2018-10-02 Werner Lemberg <wl@gnu.org>
  666. [psaux] Fix segfault.
  667. Reported as
  668. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
  669. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  670. <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
  671. argument.
  672. 2018-10-02 Werner Lemberg <wl@gnu.org>
  673. [psaux] Fix numeric overflow.
  674. Reported as
  675. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740
  676. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
  677. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
  678. 2018-10-02 Werner Lemberg <wl@gnu.org>
  679. [pshinter] Handle numeric overflow.
  680. Reported as
  681. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
  682. * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
  683. overflow.
  684. 2018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  685. Align FreeType with standard C memory management.
  686. * include/freetype/ftsystem.h: Include FT_TYPES_H.
  687. (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
  688. * src/raster/ftmisc.h: Ditto.
  689. * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
  690. * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
  691. Use size_t for the size arguments.
  692. * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
  693. FT_Offset, aka size_t, for the size arguments.
  694. 2018-09-25 Werner Lemberg <wl@gnu.org>
  695. Fix handling of `FT_Bool'.
  696. Before this commit we had code like
  697. (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
  698. Since `FT_Bool' is defined to be an `unsigned char', the code
  699. evaluated to something like
  700. (unsigned char)( 0x8532 & 0x8000)
  701. which in turn expanded to
  702. (unsigned char)( 0x8000)
  703. and finally yielded 0x00 – i.e., false – not as expected.
  704. Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
  705. * include/freetype/fttypes.h (FT_BOOL): Add a comparison against
  706. zero so that we always have a Boolean expression.
  707. */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
  708. possible.
  709. 2018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  710. [bdf] Speed up charmap access.
  711. This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster.
  712. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search
  713. with continuous prediction.
  714. 2018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  715. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak.
  716. This one should be clearer. When the rounded monochrome bbox collapses
  717. we add a pixel that covers most if not all original cbox.
  718. 2018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
  719. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak.
  720. 2018-09-21 Ben Wagner <bungeman@google.com>
  721. Improve auto-hinter handling of bitmap fonts (#54681).
  722. For bitmap fonts, `FT_Load_Glyph' should either return an error or
  723. not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this
  724. case `FT_Load_Glyph' calls into the auto-hinter which calls back
  725. into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which
  726. marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path
  727. (even though it doesn't have any path). It appears that the
  728. auto-hinter should not be called when the face doesn't have
  729. outlines. The current test for using the auto-hinter in
  730. `FT_Load_Glyph' checks whether the driver supports scalable
  731. outlines, but not if the face supports scalable outlines.
  732. * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have
  733. scalable outlines.
  734. 2018-09-21 Werner Lemberg <wl@gnu.org>
  735. [raster] Fix disappearing vertical lines (#54589).
  736. * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
  737. where both left and right outline exactly pass pixel centers.
  738. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  739. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak.
  740. This adds pixels in case a contour goes through the center
  741. and they need to be turned on in the b/w rasterizer.
  742. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  743. [pcf] Replace charmap implementation.
  744. PCF comes with charmap lookup table, aka PCF encodings. Using it
  745. directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times
  746. faster than the original BDF-like binary searches.
  747. * src/pcf/pcf.h (PCF_EncodingRec): Removed.
  748. (PCF_FaceRec): Remove `nencodings' and `encodings'.
  749. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced.
  750. * src/pcf/pcfread.c (pcf_get_encodings): Store data differently.
  751. 2018-09-20 Werner Lemberg <wl@gnu.org>
  752. [base] Remove unused function `FT_GlyphLoader_CopyPoints'.
  753. * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c
  754. (FT_GlyphLoader_CopyPoints): Do it.
  755. 2018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
  756. [pcf] Prepare to replace charmap implementation.
  757. * src/pcf/pcf.h (PCF_FaceRec): Updated to include...
  758. (PCF_EncRec): ... this new structure to store charmap geometry.
  759. * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry.
  760. 2018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  761. Remove unused fields.
  762. * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'.
  763. * src/bdfdrvr.h (BDF_FaceRec): Ditto.
  764. * src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
  765. 2018-09-17 Werner Lemberg <wl@gnu.org>
  766. [pshinter] Handle numeric overflow.
  767. Reported as
  768. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396
  769. * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H.
  770. (psh_blues_snap_stem): Mask numeric overflow.
  771. 2018-09-13 Werner Lemberg <wl@gnu.org>
  772. [truetype] Some fixes for VF checks.
  773. Reported as
  774. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
  775. * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
  776. frame if we have invalid glyph variation data offsets.
  777. (tt_face_vary_cvt): Protect against missing `tuplecoords' array.
  778. Fix typo.
  779. 2018-09-13 Werner Lemberg <wl@gnu.org>
  780. * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit.
  781. 2018-09-13 Werner Lemberg <wl@gnu.org>
  782. * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'.
  783. Reported as
  784. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316
  785. 2018-09-12 John Tytgat <John.Tytgat@esko.com>
  786. [sfnt] Better PS name handling (#54629).
  787. * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks.
  788. (get_win_string, get_apple_string): Return NULL when the PostScript
  789. font name characters is not according to specification.
  790. (get_win_string): Make trace output work if the high byte if
  791. non-zero.
  792. (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred
  793. Win PS name (when there is also an Apple PS name); change this into
  794. a fallback to Apple PS name in case the Win PS name is invalid.
  795. 2018-09-12 Werner Lemberg <wl@gnu.org>
  796. [truetype] Improve VF check.
  797. Triggered by
  798. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
  799. * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
  800. for `tupleCount'.
  801. 2018-09-12 Werner Lemberg <wl@gnu.org>
  802. * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
  803. 2018-09-10 Armin Hasitzka <prince.cherusker@gmail.com>
  804. * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow.
  805. Reported as
  806. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215
  807. 2018-09-09 Ben Wagner <bungeman@google.com>
  808. * builds/freetype.mk (refdoc-venv): Ensure python version (#54631).
  809. 2018-09-07 Werner Lemberg <wl@gnu.org>
  810. [truetype] Fix assertion failure.
  811. Triggered by
  812. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212
  813. * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce
  814. `opened_frame' (removed in a change from 2018-08-26) to handle
  815. deallocation of the second frame.
  816. 2018-09-05 Werner Lemberg <wl@gnu.org>
  817. Synchronize `ftdebug.c' files.
  818. * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c,
  819. builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'.
  820. 2018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  821. Add documentation guidelines file.
  822. * docs/DOCGUIDE: New file.
  823. 2018-09-04 Werner Lemberg <wl@gnu.org>
  824. * devel/ftoption.h: Synchronize with master `ftoption.h'.
  825. 2018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  826. [docwriter] Don't break code snippets accross lines.
  827. Reported as
  828. https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html
  829. * docs/reference/markdown/stylesheets/extra.css (.md-typeset code):
  830. Add rule `white-space'.
  831. 2018-09-03 Werner Lemberg <wl@gnu.org>
  832. */*: s/PSNames/psnames/.
  833. Only tracing messages are affected.
  834. 2018-09-03 Werner Lemberg <wl@gnu.org>
  835. [sfnt] Fix heap buffer overflow in CPAL handling.
  836. * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test.
  837. (tt_face_load_cpal): Updated.
  838. 2018-09-01 Werner Lemberg <wl@gnu.org>
  839. Remove `FT_Outline_{New,Done}_Internal'.
  840. These public API functions(!) were always undocumented and have
  841. escaped all clean-up efforts until now.
  842. * include/freetype/ftoutln.h (FT_Outline_New_Internal,
  843. FT_Outline_Done_Internal): Removed.
  844. * src/base/ftoutln.h (FT_Outline_New_Internal,
  845. FT_Outline_Done_Internal): Merge into...
  846. (FT_Outline_New, FT_Outline_Done): ... these functions.
  847. * docs/README: Updated.
  848. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  849. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
  850. 2018-08-31 Armin Hasitzka <prince.cherusker@gmail.com>
  851. [errors] Refine the macro logic surrounding `FT_Error_String'.
  852. * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS,
  853. FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after
  854. checking it and introduce a new macro that takes proper care of
  855. multiple-inclusion protection.
  856. 2018-08-31 Werner Lemberg <wl@gnu.org>
  857. * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls.
  858. 2018-08-31 Werner Lemberg <wl@gnu.org>
  859. * src/base/ftdebug.c (FT_Throw): Reduce chattiness.
  860. 2018-08-31 Werner Lemberg <wl@gnu.org>
  861. * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization.
  862. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  863. Consolidate bitmap presetting and size assessment.
  864. * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
  865. Change return type.
  866. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap
  867. size assessment.
  868. * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the
  869. rendering of enourmous or far-fetched outlines.
  870. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
  871. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  872. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono.
  873. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
  874. [errors] Introduce a macro to control `FT_Error_String'.
  875. * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS),
  876. include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS):
  877. New macro.
  878. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
  879. [errors] Introduce `FT_Error_String'.
  880. * include/freetype/fterrors.h (FT_Error_String),
  881. src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.
  882. * src/base/ftbase.c, src/base/Jamfile (_source),
  883. src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.
  884. * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
  885. 2018-08-30 Werner Lemberg <wl@gnu.org>
  886. [autofit] Trace `before' and `after' edges of strong points.
  887. * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays
  888. `before' and `after'.
  889. * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary
  890. function.
  891. (af_glyph_hints_dump_points): Trace `before' and `after' edges.
  892. (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set
  893. `before' and `after' information.
  894. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  895. [base] Overflow-resistant bitmap presetting.
  896. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
  897. 2018-08-29 Armin Hasitzka <prince.cherusker@gmail.com>
  898. Fix numeric overflows.
  899. * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
  900. psh_hint_table_find_strong_points): Fix numeric overflows.
  901. Reported as
  902. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
  903. 2018-08-29 Werner Lemberg <wl@gnu.org>
  904. [cff] Fix handling of `roll' op in old engine.
  905. Reported as
  906. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
  907. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
  908. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
  909. documented in the specification.
  910. 2018-08-26 Werner Lemberg <wl@gnu.org>
  911. * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
  912. 2018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  913. * configure: Copy assets required by docwriter.
  914. Copy directory `docs/reference/markdown' when FreeType is compiled in a
  915. different directory.
  916. Fixes `make refdoc' if builddir != srcdir.
  917. Reported as
  918. https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
  919. 2018-08-26 Werner Lemberg <wl@gnu.org>
  920. * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
  921. Reported as
  922. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
  923. 2018-08-26 Werner Lemberg <wl@gnu.org>
  924. Minor tracing adjustments.
  925. * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
  926. Trace.
  927. * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
  928. 2018-08-26 Werner Lemberg <wl@gnu.org>
  929. [truetype] Avoid nested frames.
  930. Triggered by
  931. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
  932. * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
  933. `opened_frame' to trace whether a frame must be closed at the end of
  934. function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
  935. gets called for space glyphs) uses a frame by itself. Instead,
  936. close the frame after loading the header, then use another frame for
  937. the remaining part of the glyph later on.
  938. Also avoid calling `tt_get_metrics' twice under some circumstances.
  939. 2018-08-26 Werner Lemberg <wl@gnu.org>
  940. Various minor clean-ups.
  941. * src/base/ftapi.c: Remove. Unused.
  942. * src/base/Jamfile (_sources): Updated.
  943. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
  944. code.
  945. 2018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  946. Convert documentation markup to Markdown.
  947. It is the result of a GSoC 2018 project; this separate ChangeLog
  948. commit covers the last four commits
  949. ae5d1a4cec37557f31aec270332cfe886a62f9a0
  950. 53c69ce04faed3dcc68ca0f54cb8d703d8babf69
  951. 195728d5ba38f34fb2c2c20807c01656f2f59b66
  952. c962db28ea59225f0105c03d907d4a9b71765687
  953. * docs/reference/markdown/images/favico.ico,
  954. docs/reference/markdown/javascripts/extra.js,
  955. docs/reference/markdown/stylesheets/extra.css: New files.
  956. * docs/reference/.gitignore, docs/reference/README: Updated.
  957. * src/tools/docmaker/*: Removed. It has been replaced with
  958. `docwriter', a python package available at
  959. https://pypi.org/project/docwriter/
  960. * Jamfile: Updated.
  961. * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk,
  962. builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN),
  963. builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable.
  964. * builds/unix/configure.raw: Check for `python' and `pip'.
  965. If not present, warn that `make refdoc' will fail.
  966. * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables.
  967. * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON,
  968. ENV_PIP): New variables.
  969. (refdoc): Updated.
  970. (refdoc-venv): New target.
  971. (.PHONY): Updated.
  972. 2018-08-23 Werner Lemberg <wl@gnu.org>
  973. Add macros for handling over-/underflowing `FT_Int64' values.
  974. * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
  975. MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
  976. * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
  977. `SUB_INT64' and `MUL_INT64'.
  978. Reported as
  979. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
  980. 2018-08-22 Werner Lemberg <wl@gnu.org>
  981. [truetype] Improve legibility of `glyf' parsing.
  982. * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
  983. Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
  984. OVERLAP_SIMPLE): New macros.
  985. (TT_Load_Simple_Glyph): Use new macros to make code more readable.
  986. Remove useless adjustment of `outline->tags' elements.
  987. 2018-08-21 Werner Lemberg <wl@gnu.org>
  988. * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
  989. Reported as
  990. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
  991. 2018-08-18 Werner Lemberg <wl@gnu.org>
  992. [psaux] Avoid slow PS font parsing in case of error.
  993. Reported as
  994. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
  995. * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
  996. in case of error to avoid potential re-scanning.
  997. 2018-08-18 Werner Lemberg <wl@gnu.org>
  998. [cff] Fix heap buffer overflow in old engine.
  999. Reported as
  1000. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
  1001. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  1002. <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
  1003. non-zero.
  1004. 2018-08-16 Young Xiao <yangx92@hotmail.com>
  1005. * builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
  1006. Reported as bug #54515, duplicate of #43540.
  1007. 2018-08-16 Werner Lemberg <wl@gnu.org>
  1008. * builds/*/ftsystem.c (FT_COMPONENT): Updated also.
  1009. 2018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
  1010. [bdf] Don't track duplicate encodings.
  1011. There is no harm except some umbiguity in broken fonts with duplicate
  1012. encodings.
  1013. * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
  1014. (_bdf_parse_t): Remove large `have' bitfield.
  1015. 2018-08-15 Werner Lemberg <wl@gnu.org>
  1016. Don't use `trace_' prefix for FT_COMPONENT arguments.
  1017. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
  1018. FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
  1019. (FT_TRACE): Use `FT_TRACE_COMP'.
  1020. */* (FT_COMPONENT): Updated.
  1021. 2018-08-14 Werner Lemberg <wl@gnu.org>
  1022. Use formatting string in FT_TRACEX calls for non-simple arguments.
  1023. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  1024. <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
  1025. Do it.
  1026. * src/psaux/pshints.c (cf2_hintmap_build): Ditto.
  1027. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
  1028. cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
  1029. cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
  1030. * src/truetype/ttinterp.c (TT_RunIns): Ditto.
  1031. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
  1032. [bdf] Remove unused fields.
  1033. * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
  1034. which were set but never used.
  1035. * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
  1036. Updated accordingly.
  1037. 2018-08-14 Werner Lemberg <wl@gnu.org>
  1038. [cff] Fix another segv in old engine.
  1039. Reported as
  1040. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
  1041. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  1042. [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
  1043. dictionaries.
  1044. 2018-08-14 Werner Lemberg <wl@gnu.org>
  1045. [cff] Fix missing error handling.
  1046. Reported as
  1047. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
  1048. * src/psaux/cffparse.c (cff_parser_run)
  1049. [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
  1050. `parse_charstrings_old'.
  1051. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
  1052. [bdf] Remove unused overflow storage.
  1053. * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
  1054. (bdf_font_t): Remove `overflow' field.
  1055. * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
  1056. 2018-08-14 Werner Lemberg <wl@gnu.org>
  1057. [cff] Fix segv in old engine.
  1058. Reported as
  1059. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
  1060. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  1061. <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
  1062. `random' field directly if parsing dictionaries.
  1063. 2018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
  1064. [bdf] Use unsigned types.
  1065. * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
  1066. (bdf_font_t): Unsign `default_char'.
  1067. * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
  1068. * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
  1069. _bdf_parse_start): Updated accordingly.
  1070. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
  1071. 2018-08-13 Werner Lemberg <wl@gnu.org>
  1072. * src/type42/t42parse.c (t42_parse_sfnts): One more format check.
  1073. Reported as
  1074. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
  1075. 2018-08-11 Werner Lemberg <wl@gnu.org>
  1076. * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
  1077. Reported as
  1078. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
  1079. 2018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  1080. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
  1081. 2018-08-10 Ben Wagner <bungeman@google.com>
  1082. * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
  1083. 2018-08-10 Werner Lemberg <wl@gnu.org>
  1084. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
  1085. 2018-08-10 Werner Lemberg <wl@gnu.org>
  1086. Fix clang warnings.
  1087. * src/base/ftdebug.c (ft_trace_level_enabled,
  1088. ft_trace_level_disabled): Add `static' keyword.
  1089. 2018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  1090. [raster, smooth] Reinstate bitmap size limits.
  1091. This again moves outline and bitmap size checks one level up.
  1092. * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
  1093. outlines.
  1094. * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
  1095. and, therefore, outlines that require them.
  1096. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
  1097. * src/raster/ftraster.c (ft_black_render): Remove outline size checks.
  1098. * src/smooth/ftgrays.c (gray_raster_render): Ditto.
  1099. [STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
  1100. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1101. [pcf] Revert massive unsigning.
  1102. 2018-08-08 Werner Lemberg <wl@gnu.org>
  1103. [smooth] Improve tracing.
  1104. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
  1105. if called the first time.
  1106. (gray_convert_glyph): Updated.
  1107. 2018-08-08 Werner Lemberg <wl@gnu.org>
  1108. Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
  1109. It sometimes makes sense to suppress tracing informations, for
  1110. example, if it outputs identical messages again and again.
  1111. * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
  1112. pointer.
  1113. (FT_Trace_Disable, FT_Trace_Enable): New declarations.
  1114. * src/base/ftdebug.c (ft_trace_levels): Rename to...
  1115. (ft_trace_levels_enabled): ... this.
  1116. (ft_trace_levels_disabled): New array.
  1117. (ft_trace_levels): New pointer.
  1118. (FT_Trace_Disable, FT_Trace_Enable): Implement.
  1119. (ft_debug_init): Updated.
  1120. 2018-08-08 Werner Lemberg <wl@gnu.org>
  1121. Debugging improvements.
  1122. * src/base/ftobjs.c (pixel_modes): Move this array to top level
  1123. from ...
  1124. (FT_Load_Glyph): ... here.
  1125. (FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
  1126. Use `pixel_modes'.
  1127. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1128. [pcf] Massive unsigning (part 2).
  1129. Treat all size related properties as unsigned values.
  1130. * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
  1131. `value'.
  1132. * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated
  1133. parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
  1134. RESOLUTION_X and RESOLUTION_Y.
  1135. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1136. [pcf] Massive unsigning (part 1).
  1137. Unofficial specifications hesitate to use unsigned 32-bit integers.
  1138. Negative values caused a lot of trouble in the past and it is safer
  1139. and easier to treat some properties as unsigned.
  1140. * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
  1141. `fontDescent', and `maxOverlap'.
  1142. * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
  1143. * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
  1144. PCF_Size_Request): Updated.
  1145. 2018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  1146. * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
  1147. `bitmapSizes'.
  1148. 2018-08-06 Werner Lemberg <wl@gnu.org>
  1149. * devel/ftoption.h: Synchronize with main `ftoption.h'.
  1150. 2018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  1151. [pcf] Use unsigned types.
  1152. * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
  1153. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
  1154. * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
  1155. 2018-08-05 Werner Lemberg <wl@gnu.org>
  1156. * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
  1157. Reported as
  1158. https://bugs.chromium.org/p/chromium/issues/detail?id=777151
  1159. 2018-08-04 Werner Lemberg <wl@gnu.org>
  1160. * src/truetype/ttinterp.c (opcode_name): Fix typos.
  1161. 2018-08-04 Werner Lemberg <wl@gnu.org>
  1162. Fix clang warnings.
  1163. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
  1164. `orientation'.
  1165. * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
  1166. * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
  1167. Add cast.
  1168. * src/type1/t1load.c (parse_weight_vector): Fix cast.
  1169. 2018-07-31 Werner Lemberg <wl@gnu.org>
  1170. * src/cid/cidtoken.h: Handle `XUID' keyword.
  1171. 2018-07-31 Werner Lemberg <wl@gnu.org>
  1172. [cid] Trace PostScript dictionaries.
  1173. * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
  1174. (cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
  1175. parse_expansion_factor, cid_parse_dict): Add tracing calls.
  1176. (parse_font_name): New function to trace `/FontName' keywords in
  1177. /FDArray dict.
  1178. (cid_field_records): Register `parse_font_name'.
  1179. 2018-07-30 Werner Lemberg <wl@gnu.org>
  1180. [cff] Fix typo.
  1181. Reported as
  1182. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
  1183. * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
  1184. check.
  1185. 2018-07-29 Werner Lemberg <wl@gnu.org>
  1186. * src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
  1187. Reported as
  1188. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
  1189. 2018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  1190. [smooth] Fix Harmony memory management.
  1191. Reported as
  1192. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
  1193. * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
  1194. after each rendering in case of failure.
  1195. 2018-07-28 Werner Lemberg <wl@gnu.org>
  1196. [type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
  1197. Reported as
  1198. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
  1199. * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
  1200. 2018-07-27 Werner Lemberg <wl@gnu.org>
  1201. [truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
  1202. * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
  1203. `face->doblend' if the current call to the function yields the same
  1204. blend coordinates as the previous call.
  1205. 2018-07-27 Werner Lemberg <wl@gnu.org>
  1206. [psaux, type1]: More tracing improvements.
  1207. * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
  1208. outline commands.
  1209. * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
  1210. missing case.
  1211. (t1_decoder_parse_metrics): Make tracing output more compact.
  1212. * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
  1213. (T1_Get_Advances): Add tracing.
  1214. 2018-07-25 Werner Lemberg <wl@gnu.org>
  1215. [psaux, type1] Trace PostScript dictionaries and other things.
  1216. The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
  1217. right now.
  1218. * src/psaux/psobjs.c (ps_parser_load_field,
  1219. ps_parser_load_field_table): Add tracing calls.
  1220. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
  1221. output more compact.
  1222. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
  1223. tracing messages.
  1224. * src/type1/t1load.c (parse_blend_axis_types,
  1225. parse_blend_design_positions, parse_blend_design_map,
  1226. parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
  1227. parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
  1228. tracing calls.
  1229. * src/type1/t1objs.c (T1_Face_Init): Add tracing call.
  1230. * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
  1231. verbose.
  1232. 2018-07-25 Werner Lemberg <wl@gnu.org>
  1233. Fix minor ASAN run-time warnings.
  1234. * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
  1235. `FT_MEM_ZERO' if we actually have a buffer.
  1236. (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
  1237. 2018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  1238. [build] Fortify dllexport/dllimport attributes (#53969,#54330).
  1239. We no longer use predefined _DLL, which can be defined for static
  1240. builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
  1241. following libtool convention.
  1242. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
  1243. Define DLL_EXPORT manually.
  1244. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
  1245. builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
  1246. src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
  1247. 2018-07-24 Werner Lemberg <wl@gnu.org>
  1248. [type1] Check relationship between number of axes and designs.
  1249. For Multiple Masters fonts we don't support intermediate designs;
  1250. this implies that
  1251. number_of_designs == 2 ^^ number_of_axes
  1252. Reported as
  1253. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
  1254. * src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
  1255. (T1_Get_MM_Var): Remove now redundant test.
  1256. 2018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net>
  1257. [truetype] Match ttdebug's naming of instruction mnemonics.
  1258. * src/truetype/ttinterp.c: The form used in ttdebug,
  1259. "MDRP[G,B,W,?]", etc., is slightly more readable than
  1260. "MDRP[00,01,02,03]".
  1261. 2018-07-24 Werner Lemberg <wl@gnu.org>
  1262. * src/pcf/pcfread.c (pcf_get_encodings): Thinko.
  1263. Reported as
  1264. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
  1265. 2018-07-22 Werner Lemberg <wl@gnu.org>
  1266. * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
  1267. Reported as
  1268. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
  1269. 2018-07-22 Werner Lemberg <wl@gnu.org>
  1270. * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
  1271. This is an oversight of the module change 2018-07-21.
  1272. Reported as
  1273. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
  1274. 2018-07-22 Werner Lemberg <wl@gnu.org>
  1275. [cid] Sanitize `BlueShift' and `BlueFuzz'.
  1276. This code is taken from the type1 module.
  1277. Reported as
  1278. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
  1279. * src/cid/cidload.c (parse_fd_array): Set some private dict default
  1280. values.
  1281. (cid_face_open): Do the sanitizing.
  1282. Fix some tracing messages.
  1283. 2018-07-21 Werner Lemberg <wl@gnu.org>
  1284. [pcf] Fix handling of the undefined glyph.
  1285. This change makes the driver use the `defaultChar' property of PCF
  1286. files.
  1287. * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
  1288. unsigned.
  1289. * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
  1290. unsigned.
  1291. Validate `defaultChar'.
  1292. If `defaultChar' doesn't point to glyph index zero, swap glyphs with
  1293. index zero and index `defaultChar' and adjust the encodings
  1294. accordingly.
  1295. * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
  1296. PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
  1297. the first character in the font to be the default character.
  1298. 2018-07-20 Armin Hasitzka <prince.cherusker@gmail.com>
  1299. Move the legacy fuzz target to the `freetype-testing' repository.
  1300. It can now be found at
  1301. https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
  1302. * src/tools/ftfuzzer: Remove this folder and its contents from the
  1303. repository.
  1304. 2018-07-20 Werner Lemberg <wl@gnu.org>
  1305. [cff] Avoid left-shift of negative numbers (#54322).
  1306. * src/cff/cffgload.c (cff_slot_load): Use multiplication.
  1307. 2018-07-17 Werner Lemberg <wl@gnu.org>
  1308. Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
  1309. This is a valid encoding tag for BDF, PCF, and Windows FNT, and
  1310. there is no reason to disallow it for these formats.
  1311. * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
  1312. 2018-07-17 Werner Lemberg <wl@gnu.org>
  1313. * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
  1314. 2018-07-16 Armin Hasitzka <prince.cherusker@gmail.com>
  1315. * include/freetype/internal/ftcalc.h: Add macros for handling
  1316. harmless over-/underflowing `FT_Int' values.
  1317. * src/sfnt/sfdriver.c (fixed2float): Fix negation of
  1318. `(int)(-2147483648)'.
  1319. Reported as
  1320. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
  1321. 2018-07-16 Werner Lemberg <wl@gnu.org>
  1322. * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
  1323. Reported as
  1324. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
  1325. 2018-07-12 Werner Lemberg <wl@gnu.org>
  1326. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
  1327. Taken from patch #9667, written by Steve Langasek
  1328. <vorlon@debian.org>.
  1329. This fixes a build failure (most probably a bug in gcc) on ppc64el
  1330. when building with -O3.
  1331. 2018-07-05 Werner Lemberg <wl@gnu.org>
  1332. Fix typo (#54238).
  1333. * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
  1334. [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
  1335. 2018-07-05 Werner Lemberg <wl@gnu.org>
  1336. Adjust table size comparisons (#54242).
  1337. * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
  1338. 2018-07-05 Werner Lemberg <wl@gnu.org>
  1339. Fix more 32bit issues (#54208).
  1340. * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
  1341. run-time error.
  1342. * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
  1343. numeric overflow.
  1344. 2018-07-04 Werner Lemberg <wl@gnu.org>
  1345. Fix 32bit build warnings (#54239).
  1346. * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
  1347. vs. unsigned comparisons.
  1348. * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
  1349. 2018-07-02 Jeff Carey <Jeff.Carey@monotype.com>
  1350. * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
  1351. 2018-07-02 Werner Lemberg <wl@gnu.org>
  1352. s/palette_types/palette_flags/.
  1353. Suggested by Behdad.
  1354. 2018-07-02 Werner Lemberg <wl@gnu.org>
  1355. Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
  1356. * include/freetype/freetype.h, src/base/ftobjs.c
  1357. (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
  1358. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
  1359. src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
  1360. Updated.
  1361. 2018-07-01 Werner Lemberg <wl@gnu.org>
  1362. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
  1363. Reported by Behdad.
  1364. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  1365. * src/base/fttrigon.c (FT_Tan): Improve accuracy.
  1366. (FT_Vector_Rotate): Simplify.
  1367. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  1368. * src/base/ftobjs.c (FT_Set_Charmap): Robustify.
  1369. 2018-06-25 Werner Lemberg <wl@gnu.org>
  1370. [truetype] Fix memory leak.
  1371. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
  1372. Fix typo in `goto' destination.
  1373. Reported as
  1374. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
  1375. 2018-06-25 Werner Lemberg <wl@gnu.org>
  1376. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
  1377. Reported as
  1378. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
  1379. 2018-06-24 Werner Lemberg <wl@gnu.org>
  1380. [truetype] Increase precision while applying VF deltas.
  1381. It turned out that we incorrectly round CVT and glyph point deltas
  1382. before accumulation, leading to severe positioning errors if there
  1383. are many delta values to sum up.
  1384. Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
  1385. by Behdad.
  1386. * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
  1387. 16.16 format.
  1388. (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
  1389. format array, and add the accumulated values to the CVT at the end
  1390. of the function.
  1391. (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
  1392. `points_out' in 16.16 format.
  1393. Collect deltas in `point_deltas_x' and `point_deltas_y', which are
  1394. 16.16 format arrays, and add the accumulated values to the glyph
  1395. coordinates at the end of the function.
  1396. 2018-06-24 Werner Lemberg <wl@gnu.org>
  1397. New base function `FT_Matrix_Check' (#54019).
  1398. * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
  1399. reject degenerate font matrices.
  1400. * include/freetype/internal/ftcalc.h: Updated.
  1401. * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
  1402. (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
  1403. src/type42/t42parse.c (t42_parse_font_matrix): Use
  1404. `FT_Matrix_Check'.
  1405. 2018-06-23 Werner Lemberg <wl@gnu.org>
  1406. Fix typo.
  1407. Reported by Behdad.
  1408. * src/base/ftcolor.c (FT_Palette_Data_Get)
  1409. [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
  1410. 2018-06-21 Werner Lemberg <wl@gnu.org>
  1411. s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
  1412. * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
  1413. src/sfnt/ttcolr.c: Do it.
  1414. 2018-06-19 Werner Lemberg <wl@gnu.org>
  1415. [sfnt] Fix CPAL heap buffer overflow.
  1416. Reported as
  1417. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
  1418. * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
  1419. offsets.
  1420. 2018-06-19 Werner Lemberg <wl@gnu.org>
  1421. Doh. Don't use CPAL or COLR data if tables are missing.
  1422. Reported by Alexei.
  1423. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
  1424. `colr' is NULL.
  1425. * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
  1426. `cpal' is NULL.
  1427. 2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
  1428. [base] Introduce `FT_New_Glyph'.
  1429. This function facilitates access to full capabilities of FreeType
  1430. rendering engine for custom glyphs. This can be quite useful for
  1431. consistent rendering of mathematical and chemical formulas, e.g.
  1432. https://bugs.chromium.org/p/chromium/issues/detail?id=757078
  1433. * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
  1434. function.
  1435. 2018-06-17 Armin Hasitzka <prince.cherusker@gmail.com>
  1436. [bdf] Fix underflow of an unsigned value.
  1437. bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That
  1438. caused an underflow of the unsigned value which results in undefined
  1439. behaviour.
  1440. * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
  1441. if the `ENCODING' keyword cannot be found.
  1442. 2018-06-17 Werner Lemberg <wl@gnu.org>
  1443. [base] Add tracing for `FT_Bitmap_Blend'.
  1444. * include/freetype/internal/fttrace.h (trace_bitmap): New
  1445. enumeration.
  1446. * src/base/ftbitmap.c (FT_COMPONENT): Define.
  1447. (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
  1448. 2018-06-17 Werner Lemberg <wl@gnu.org>
  1449. s/trace_bitmap/trace_checksum/.
  1450. * include/freetype/internal/fttrace.h: s/bitmap/checksum/.
  1451. * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
  1452. Adjust code.
  1453. 2018-06-16 Werner Lemberg <wl@gnu.org>
  1454. [sfnt] Fix color glyph layer loading.
  1455. * src/sfnt/ttcolr.c (Colr): Add `table_size' field.
  1456. (tt_face_load_colr): Set it.
  1457. (tt_face_get_colr_layer): Check pointer limit for layer entries.
  1458. 2018-06-16 Werner Lemberg <wl@gnu.org>
  1459. [sfnt] Fix color palette loading.
  1460. Reported as
  1461. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
  1462. * src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
  1463. (tt_face_load_cpal): Set it.
  1464. (tt_face_palette_set): Check pointer limit for color entries.
  1465. 2018-06-16 Werner Lemberg <wl@gnu.org>
  1466. * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
  1467. 2018-06-16 Werner Lemberg <wl@gnu.org>
  1468. Add `FT_Bitmap_Blend' API.
  1469. Still missing: Support for negative bitmap pitch and subpixel offset
  1470. of source bitmap.
  1471. * include/freetype/ftbitmap.h, src/base/ftbitmap.c
  1472. (FT_Bitmap_Blend): New function.
  1473. 2018-06-14 Werner Lemberg <wl@gnu.org>
  1474. Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
  1475. This avoids any additional allocation of COLR related structures in
  1476. a glyph slot.
  1477. * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
  1478. FT_Get_GlyphLayers): Removed.
  1479. * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
  1480. (FT_Slot_InternalRec): Remove `color_layers'.
  1481. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
  1482. Removed.
  1483. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
  1484. `load_colr_layer'.
  1485. * src/base/ftobjs.c (ft_glyph_slot_done): Updated.
  1486. (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
  1487. (FT_Get_GlyphLayers): Removed.
  1488. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  1489. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
  1490. * src/sfnt/ttcolr.h: Updated.
  1491. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
  1492. 2018-06-14 Werner Lemberg <wl@gnu.org>
  1493. Provide iterative API to access `COLR' data.
  1494. This solution doesn't store any data in an `FT_GlyphSlot' object.
  1495. * include/freetype/freetype.h (FT_LayerIterator): New structure.
  1496. (FT_Get_Color_Glyph_Layer): New function.
  1497. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
  1498. function type.
  1499. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
  1500. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
  1501. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
  1502. * src/sfnt/ttcolr.h: Updated.
  1503. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  1504. 2018-06-14 Werner Lemberg <wl@gnu.org>
  1505. Add glyph index and glyph load flags to glyph slot.
  1506. * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
  1507. `reserved' field to `glyph_index'.
  1508. * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
  1509. `load_flags' field.
  1510. * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
  1511. 2018-06-14 Werner Lemberg <wl@gnu.org>
  1512. [sfnt] Move `CPAL' stuff into separate files.
  1513. * src/sfnt/sfdriver.c: Include `ttcpal.h'.
  1514. * src/sfnt/sfnt.c: Include `ttcpal.c'.
  1515. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
  1516. * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
  1517. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
  1518. Updated.
  1519. * include/freetype/internal/fttrace.h: Add support for `colr' and
  1520. `cpal'.
  1521. Sort entries.
  1522. 2018-06-13 Werner Lemberg <wl@gnu.org>
  1523. [sfnt] Separate `CPAL' and `COLR' table handling.
  1524. Later on we want to support the `SVG' table also, which needs `CPAL'
  1525. (but not `COLR').
  1526. * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
  1527. and `free_cpal' fields.
  1528. (FT_DEFINE_SFNT_INTERFACE): Updated.
  1529. * include/freetype/internal/tttypes.h (TT_FaceRec): Replace
  1530. `colr_and_cpal' fields with `cpal' and `colr'.
  1531. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  1532. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
  1533. * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
  1534. (ColrCpal): Removed.
  1535. (tt_face_load_colr): Split off CPAL handling into...
  1536. (tt_face_load_cpal): ... this new function.
  1537. (tt_face_free_colr): Split off CPAL handling into...
  1538. (tt_face_free_cpal): ... this new function.
  1539. (tt_face_load_colr_layers, tt_face_palette_set): Updated.
  1540. * src/sfnt/ttcolr.h: Updated.
  1541. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
  1542. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1543. [sfnt] Fix `sizeof' thinko.
  1544. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
  1545. use `sizeof' for computing array limit.
  1546. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1547. Finish CPAL/COLR support (4/4).
  1548. * src/sfnt/ttcolr.c (tt_face_find_color): Removed.
  1549. (tt_face_colr_blend_layer): Use `face->palette' instead of calling
  1550. `tt_face_find_color'.
  1551. Use and set text foreground color.
  1552. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1553. Finish CPAL/COLR support (3/4).
  1554. * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
  1555. (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
  1556. functions.
  1557. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1558. Finish CPAL/COLR support (2/4).
  1559. * src/sfnt/ttcolr.c (tt_face_palette_set): New function.
  1560. (tt_face_load_colr): Allocate `face->palette' and call
  1561. `tt_face_palette_set'.
  1562. Adjust return error code in case of error.
  1563. * src/sfnt/ttcolr.h: Updated.
  1564. * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
  1565. function type.
  1566. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
  1567. * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
  1568. (sfnt_done_face): Updated.
  1569. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1570. Finish CPAL/COLR support (1/4).
  1571. * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
  1572. `palette_index', `palette', `have_foreground_color' and
  1573. `foreground_color'.
  1574. 2018-06-12 Werner Lemberg <wl@gnu.org>
  1575. [sfnt] Minor.
  1576. * src/sfnt/ttcolr.c (tt_face_load_colr_layers):
  1577. s/palette_index/palette_entry_index/ for consistency.
  1578. Adjust return error code in case of error.
  1579. 2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  1580. [raster] Clean up.
  1581. * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
  1582. Clean up after 5-level gray removal (8dc8635874).
  1583. (Vertical_Sweep_Span): Be brief.
  1584. 2018-06-10 Werner Lemberg <wl@gnu.org>
  1585. [sfnt] Fix compiler warnings.
  1586. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
  1587. tt_face_colr_blend_layer): Add `NULL' initializers.
  1588. 2018-06-10 Werner Lemberg <wl@gnu.org>
  1589. s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
  1590. * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
  1591. src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
  1592. 2018-06-10 Nikolaus Waxweiler <madigens@gmail.com>
  1593. CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
  1594. This might be needed to build FreeType for the iOS simulator. See
  1595. https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
  1596. by Steve Robinson.
  1597. * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
  1598. 2018-06-10 Werner Lemberg <wl@gnu.org>
  1599. Implement `FT_Palette_Get'.
  1600. * src/base/ftcolor.c: New file.
  1601. * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
  1602. src/base/ftbase.c: Add `ftcolor.c'.
  1603. 2018-06-10 Werner Lemberg <wl@gnu.org>
  1604. * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
  1605. 2018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  1606. [raster] Deal with pitch sign earlier.
  1607. * src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
  1608. s/bTarget/bOrigin/.
  1609. (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
  1610. (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
  1611. Updated accordingly.
  1612. 2018-06-09 Werner Lemberg <wl@gnu.org>
  1613. [sfnt] Read `CPAL' version 1 tables.
  1614. * include/freetype/internal.tttypes.h: Include FT_COLOR_H.
  1615. (TT_FaceRec): Add `palette' field.
  1616. * src/sfnt/ttcolr.c: Include FT_COLOR_H.
  1617. (Cpal): Remove all data covered by the new `palette' field in
  1618. `TT_FaceRec'.
  1619. (tt_face_load_colr): Updated.
  1620. Read `CPAL' version 1 data.
  1621. (tt_face_load_colr_layers, tt_face_find_color): Updated.
  1622. * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
  1623. 2018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  1624. [base] API for Harmony LCD rendering.
  1625. This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
  1626. LCD subpixel geometry including non-striped patterns.
  1627. * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
  1628. * include/freetype/ftlcdfil.h: Document it.
  1629. * include/freetype/freetype.h: Minor.
  1630. * include/freetype/ftchapters.h: Minor.
  1631. 2018-06-06 Werner Lemberg <wl@gnu.org>
  1632. ftcolor.h: Redesign API.
  1633. While going to implement it I noticed that I need access to most of
  1634. the `CPAL' elements; I thus plan to add a `cpal' field to
  1635. `TT_FaceRec', which makes most of the previously suggested API
  1636. functions obsolete because the fields will be directly accessible.
  1637. 2018-06-06 Parth Wazurkar <parthwazurkar@gmail.com>
  1638. [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
  1639. * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
  1640. FT_FACE_FLAG_FAST_GLYPHS flag.
  1641. * src/pcf/pcfread.c (pcf_load_font): Remove deprecated
  1642. FT_FACE_FLAG_FAST_GLYPHS flag.
  1643. 2018-06-06 Werner Lemberg <wl@gnu.org>
  1644. [smooth, raster] Limit bitmap size (#54019).
  1645. * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
  1646. function.
  1647. [!STANDALONE]: Include FT_OUTLINE_H.
  1648. (ft_black_render): Compute CBox and reject glyphs larger than
  1649. 0xFFFF x 0xFFFF.
  1650. * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
  1651. than 0xFFFF x 0xFFFF.
  1652. 2018-06-03 Armin Hasitzka <prince.cherusker@gmail.com>
  1653. * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
  1654. 2018-06-03 Werner Lemberg <wl@gnu.org>
  1655. * src/tools/glnames.py (main): Emit header in `light' comment style.
  1656. 2018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  1657. [smooth] Attempt to mitigate bug #54019.
  1658. The robust rendering of estra large glyphs came with unbearable cost.
  1659. The old way of bisecting should fail but fail faster.
  1660. * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
  1661. in y-direction.
  1662. 2018-06-02 Werner Lemberg <wl@gnu.org>
  1663. * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
  1664. Reported as
  1665. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
  1666. 2018-06-02 Werner Lemberg <wl@gnu.org>
  1667. * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
  1668. 2018-05-31 Werner Lemberg <wl@gnu.org>
  1669. * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
  1670. This is no longer used.
  1671. 2018-05-31 Werner Lemberg <wl@gnu.org>
  1672. [sfnt] Get colors from `CPAL' table in right order (#54015).
  1673. * src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
  1674. 2018-05-30 Werner Lemberg <wl@gnu.org>
  1675. ftcolor.h: Improve API design, fix typos (#54011, #54014).
  1676. * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
  1677. (FT_Palette_Get_Name_IDs): ... this function.
  1678. (FT_Palette_Get_Entry_Names): Replace with...
  1679. (FT_Palette_Get_Entry_Name_IDs): ... this function
  1680. s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
  1681. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
  1682. Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
  1683. * src/autofit/afloader.c (af_loader_load_glyph): Move the
  1684. initialisationand declaration of variables into the if-block.
  1685. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
  1686. Fix pointer underflow.
  1687. The declaration of `edge2' can be reached with `edge1 == NULL' and
  1688. `axis->edges == 0' which results in undefined behaviour.
  1689. * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
  1690. after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed.
  1691. 2018-05-30 Werner Lemberg <wl@gnu.org>
  1692. Various minor color fixes.
  1693. * include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
  1694. * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
  1695. type of `load_flags' to `FT_Int32'.
  1696. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
  1697. type of `idx' to `FT_UInt'.
  1698. (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
  1699. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
  1700. `load_flags' to `FT_Int32'.
  1701. * src/sfnt/ttcolr.c (find_base_glyph_record,
  1702. tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
  1703. (tt_face_find_color, tt_face_colr_blend_layer): Change type of
  1704. `color_index' to `FT_UInt'.
  1705. Fix signedness and type issues.
  1706. * src/sfnt/ttcolr.h: Updated.
  1707. 2018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  1708. [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
  1709. This platform uses backslashes for paths, which docmaker didn't
  1710. understand correctly.
  1711. * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
  1712. `os.path.normpath' to normalize the path for the platform being
  1713. used.
  1714. 2018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  1715. [smooth] Formalize Harmony LCD rendering.
  1716. This generalizes magic outline shifts that make Harmony LCD
  1717. rendering work in terms of precise two-dimensional RGB subpixel
  1718. positions. These coordinates are now set in time of the `smooth'
  1719. module initialization and later used to shift a glyph outline for
  1720. rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
  1721. coordinates. The letter, however, rotates them before using.
  1722. The LCD bitmap padding is also calculated using these coordinates.
  1723. * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
  1724. `lcd_geometry'.
  1725. * src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
  1726. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
  1727. * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
  1728. (ft_smooth_init): Initialize `lcd_geometry'.
  1729. (ft_smooth_render_generic): Formalize outline shifts.
  1730. 2018-05-22 Werner Lemberg <wl@gnu.org>
  1731. [truetype] Reject elements of composites with invalid glyph indices.
  1732. Reported as
  1733. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
  1734. * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
  1735. 2018-05-22 Werner Lemberg <wl@gnu.org>
  1736. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
  1737. 2018-05-20 Werner Lemberg <wl@gnu.org>
  1738. * include/freetype/ftcolor.h: New file.
  1739. This is an interface to the `CPAL' OpenType table. No
  1740. implementation yet.
  1741. 2018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  1742. * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
  1743. Actually `_BitScanReverse' is available since VS2005.
  1744. 2018-05-18 Werner Lemberg <wl@gnu.org>
  1745. * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
  1746. Older VC versions don't provide `_BitScanReverse'. We test for VC
  1747. 2013.
  1748. Reported by John Emmas <john@creativepost.co.uk>.
  1749. 2018-05-17 Werner Lemberg <wl@gnu.org>
  1750. s/inline/__inline/ for MSVC.
  1751. Reported by John Emmas <john@creativepost.co.uk>.
  1752. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
  1753. 2018-05-16 Werner Lemberg <wl@gnu.org>
  1754. Add function `FT_Get_GlyphLayers' to access `COLR' table data.
  1755. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
  1756. structure to...
  1757. * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
  1758. header file.
  1759. (FT_Glyph_Layer): New typedef.
  1760. Update code to use it where appropriate.
  1761. * src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
  1762. 2018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
  1763. [base] Fix mono bitmap presetting (#53896).
  1764. It is rather fundamental to set monochrome bitmap based on rounded
  1765. CBox because the b/w rasterizer turns on pixels when their centers are
  1766. inside the glyph outline. The dropout control is unpredictable and can
  1767. distort narrow glyphs if the bitmap is too wide.
  1768. Reported by Chris Liddell.
  1769. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
  1770. are too close, adjust them before rounding.
  1771. 2018-05-15 Werner Lemberg <wl@gnu.org>
  1772. [psaux] Fix compiler warning (#53915).
  1773. * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
  1774. 2018-05-15 Werner Lemberg <wl@gnu.org>
  1775. [sfnt] Fix memory leak in handling `COLR' data.
  1776. * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
  1777. before reassigning allocated memory.
  1778. Only allocate `color_layers' if we don't have one already.
  1779. 2018-05-15 Werner Lemberg <wl@gnu.org>
  1780. [sfnt] If `COLR' is present, don't assume that all glyphs use it.
  1781. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
  1782. current glyph is not a `COLR' base glyph.
  1783. * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
  1784. `color_layers' if there are no color layers.
  1785. 2018-05-14 Werner Lemberg <wl@gnu.org>
  1786. * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
  1787. 2018-05-14 Werner Lemberg <wl@gnu.org>
  1788. Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
  1789. * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
  1790. 2018-05-13 Werner Lemberg <wl@gnu.org>
  1791. * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
  1792. 2018-05-13 Shao Yu Zhang <shaozhang@fb.com>
  1793. Werner Lemberg <wl@gnu.org>
  1794. [sfnt] Preliminary support of coloured layer outlines (#44689).
  1795. This commit enables OpenType's COLR/CPAL table handling; a typical
  1796. application are color emojis that can be scaled to any size.
  1797. If the color palette does not exist or is invalid, the rendering
  1798. step rasterizes the outline instead. The current implementation
  1799. assumes that the foreground is black.
  1800. Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
  1801. There are still some issues with metrics; additionally, an API to
  1802. fetch color layers is missing.
  1803. * devel/ftoption.h, include/freetype/config/ftoption.h
  1804. (TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
  1805. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
  1806. FT_Colr_InternalRec): New structures.
  1807. (FT_Slot_InternalRec): Add `color_layers' field.
  1808. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
  1809. TT_Blend_Colr_Func): New function types.
  1810. (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
  1811. and `colr_blend' fields.
  1812. * include/freetype/internal/tttypes.h (TT_FaceRec): Add
  1813. `colr_and_cpal' field.
  1814. * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
  1815. macros.
  1816. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
  1817. * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
  1818. Handle glyph color layers.
  1819. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
  1820. `ttcolr.c'.
  1821. * src/sfnt/sfdriver.c: Include `ttcolr.h'.
  1822. (PUT_COLOR_LAYERS): New macro.
  1823. Update call to `FT_DEFINE_SFNT_INTERFACE'.
  1824. * src/sfnt/sfnt.c: Include `ttcolr.c'.
  1825. * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
  1826. (sfnt_done_face): Updated.
  1827. * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
  1828. 2018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com>
  1829. Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
  1830. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
  1831. it.
  1832. 2018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com>
  1833. Fix DLL compilation on Solaris.
  1834. AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The
  1835. Solaris Studio 12.1 through 12.5 compilers see the
  1836. `-fvisibility=hidden' flag, but ignore it with a warning of:
  1837. cc: Warning: Option -fvisibility=hidden passed to ld,
  1838. if ld is invoked, ignored otherwise
  1839. AC_LINK_IFELSE does the compile and then tries to link the result,
  1840. at which point the Solaris linker will issue an error:
  1841. ld: fatal: option '-fvisibility=hidden' is incompatible with
  1842. building a dynamic executable
  1843. If we don't use AC_LINK_IFELSE to catch the error, then configure
  1844. will fail further tests which attempt to link, such as those testing
  1845. dependencies like `libbz2'.
  1846. Also, don't try adding `-fvisibility' if we have already added
  1847. `-xldscope', just use one of them, since Sun Studio 12 and earlier
  1848. compilers only issue a warning, and don't try passing through to the
  1849. linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
  1850. Tested on Solaris 11.4 beta with compiler versions:
  1851. Sun Studio 8 (Sun C 5.5)
  1852. Sun Studio 10 (Sun C 5.7)
  1853. Sun Studio 11 (Sun C 5.8)
  1854. Sun Studio 12 (Sun C 5.9)
  1855. Sun Studio 12.1 (Sun C 5.10)
  1856. Oracle Solaris Studio 12.2 (Sun C 5.11)
  1857. Oracle Solaris Studio 12.3 (Sun C 5.12)
  1858. Oracle Solaris Studio 12.4 (Sun C 5.13)
  1859. Oracle Developer Studio 12.5 (Sun C 5.14)
  1860. Oracle Developer Studio 12.6 (Sun C 5.15)
  1861. gcc 5.5.0
  1862. gcc 7.3.0
  1863. and verified the libfreetype.so.6 generated by each of those
  1864. compilers exported the same set of symbols.
  1865. * builds/unix/configure.raw: Implement it.
  1866. 2018-05-08 Werner Lemberg <wl@gnu.org>
  1867. [autofit] Avoid potential SEGV if running out of memory.
  1868. Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
  1869. * src/autofit/afshaper.c (af_shaper_buf_create,
  1870. af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
  1871. allocate and free a four-byte buffer. Instead, make those functions
  1872. no-ops; the calling functions will provide a pointer to a buffer
  1873. instead.
  1874. * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
  1875. af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
  1876. src/autofit/aflatin.c (af_latin_metrics_init_widths,
  1877. af_latin_metrics_init_blues, af_latin_metrics_check_digits)
  1878. [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
  1879. `shaper_buf'.
  1880. 2018-05-07 Nikolaus Waxweiler <madigens@gmail.com>
  1881. [cmake] Allow using project as subfolder in other project.
  1882. * CMakeLists.txt: Test for CMake build directory being different
  1883. from source directory. Provide other parts of the build system
  1884. access the full include directory.
  1885. 2018-05-07 Werner Lemberg <wl@gnu.org>
  1886. [build] Suppress configure's `nothing to be done' message.
  1887. This is due to calling the configure script via `make' (within the
  1888. top-level `configure' wrapper script). The same can happen for all
  1889. other secondary make targets that are used to only modify the
  1890. primary one, e.g., `make setup devel'.
  1891. * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
  1892. builds/os2/detect (visualage, watcom, borlandc, devel),
  1893. builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
  1894. (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
  1895. devel-gcc): Use no-op recipe.
  1896. 2018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
  1897. Support symbol visibility features of Sun / Oracle C compilers.
  1898. Reported by Kiyoshi Kanazawa:
  1899. https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
  1900. Thanks to the suggestions by Alexei and Alan Coopersmith.
  1901. * builds/unix/configure.raw: Check if "-xldscope=hidden" is
  1902. accepted, and if so, it is added to CFLAGS. This is the option
  1903. making Sun / Oracle C compilers hide the symbols from global
  1904. scope.
  1905. * include/freetype/config/ftconfig.h: Use "__global" prefix
  1906. for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
  1907. Studio 8 (2003).
  1908. * builds/unix/ftconfig.in: Ditto.
  1909. * builds/vms/ftconfig.h: Ditto.
  1910. 2018-05-02 Nikolaus Waxweiler <madigens@gmail.com>
  1911. Unbreak CMake Windows installation
  1912. * CMakeLists.txt: Generate ftconfig.h on non-UNIX.
  1913. 2018-05-02 Werner Lemberg <wl@gnu.org>
  1914. Remove FT_CONFIG_OPTION_PIC and related code.
  1915. */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
  1916. preprocessor symbol.
  1917. */*: Replace `XXX_GET' macros (which could be either a function in
  1918. PIC mode or an array in non-PIC mode) with `xxx' arrays.
  1919. * include/freetype/internal/ftpic.h, src/autofit/afpic.c,
  1920. src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
  1921. src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
  1922. src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
  1923. src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
  1924. src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
  1925. src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
  1926. Removed.
  1927. ----------------------------------------------------------------------------
  1928. Copyright (C) 2018-2019 by
  1929. David Turner, Robert Wilhelm, and Werner Lemberg.
  1930. This file is part of the FreeType project, and may only be used, modified,
  1931. and distributed under the terms of the FreeType project license,
  1932. LICENSE.TXT. By continuing to use, modify, or distribute this file you
  1933. indicate that you have read the license and understand and accept it
  1934. fully.
  1935. Local Variables:
  1936. version-control: never
  1937. coding: utf-8
  1938. End: