ChangeLog 221 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562
  1. 2023-08-25 Werner Lemberg <[email protected]>
  2. * Version 2.13.2 released.
  3. ==========================
  4. Tag sources with `VER-2-13-2'.
  5. * docs/VERSION.TXT: Add entry for version 2.13.2.
  6. * docs/CHANGES: Updated.
  7. * docs/release, docs/README, builds/macs/README: Updated.
  8. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  9. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  10. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  11. docs/freetype-config.1: s/2.13.1/2.13.2/, s/2131/2132/.
  12. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
  13. * builds/unix/configure.raw (version_info): Set to 26:1:20.
  14. * CMakeLists.txt (VERSION_PATCH): Set to 2.
  15. 2023-08-25 Alexei Podtelezhnikov <[email protected]>
  16. * src/base/ftcalc.c (FT_MulAddFix): Simplify 32-bit rounding.
  17. 2023-08-25 Werner Lemberg <[email protected]>
  18. Fix clang warnings.
  19. * src/cffload.c (cff_blend_doBlend): Fix type of `sum`.
  20. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Fix type of
  21. `word_delta_count`.
  22. 2023-08-24 Werner Lemberg <[email protected]>
  23. * subprojects/*.wrap: Updated.
  24. 2023-08-24 Hugh McMaster <[email protected]>
  25. builds/unix/configure.raw: Use variable to specify minimum Python version.
  26. 2023-08-24 Alexei Podtelezhnikov <[email protected]>
  27. * builds/toplevel.mk: Simplify version extraction.
  28. 2023-08-22 Alexei Podtelezhnikov <[email protected]>
  29. [base] Improve the matrix degeneracy check.
  30. Also fixes #1251.
  31. * src/base/ftcalc.c (FT_Matrix_Check): To avoid overflow, scale by shifting.
  32. * include/freetype/internal/ftcalc.h (FT_Matrix_Check): Update description.
  33. 2023-08-22 Werner Lemberg <[email protected]>
  34. builds/toplevel.mk: Don't use `\#` in functions.
  35. The behaviour changed in GNU make 4.3, where `#` (without the backslash)
  36. would be necessary. Using a variable instead the code works with both older
  37. and newer GNU make versions.
  38. Fixes #1252.
  39. 2023-08-19 Hugh McMaster <[email protected]>
  40. builds/freetype.mk: Invoke `mkdocs` as a Python module
  41. FreeType's `refdoc` target currently allows users to override the
  42. default Python path, which is useful for testing and development.
  43. In contrast, `mkdocs` is invoked via the default Python path.
  44. Invoking `mkdocs` via Python's module syntax allows for greater
  45. flexibility, although there is no change for the default use case.
  46. 2023-08-17 Ben Wagner <[email protected]>
  47. [base] Avoid UB with memcpy
  48. `FT_NEW_ARRAY(p, 0)` sets `p` to `NULL`. `FT_Stream_ReadAt` with a
  49. memory based stream uses `FT_MEM_COPY` which is `memcpy` which specifies
  50. that it is undefined behavior for either the `src` or `dst` to be
  51. `NULL`. Instead of forcing all callers work around calling
  52. `FT_Stream_Read` when `buffer == NULL && count == 0` do the check in
  53. `FT_StreamRead`. This allows any call with `count == 0` to succesfully
  54. read zero bytes without UB.
  55. * src/base/ftstream.c (FT_Stream_ReadAt): skip `FT_MEM_COPY` when
  56. `count == 0`. (FT_Stream_TryRead): ditto
  57. Fixes: #1250
  58. 2023-08-12 Werner Lemberg <[email protected]>
  59. Fix warnings in tracing messages for 32bit compilation.
  60. Since we now require C99, use `%td` for `ptrdiff_t` and `%zu` for `size_t`.
  61. 2023-08-04 Ben Wagner <[email protected]>
  62. Avoid overflow in COLR bounds checks.
  63. The values read into `base_glyphs_offset_v1` and `layer_offset_v1` may
  64. be in the range 0xFFFFFFFD-0xFFFFFFFF. On systems where `unsigned long`
  65. is 32 bits adding 4 to such values will wrap and pass bounds checks but
  66. accessing values at such offsets will be out of bounds.
  67. On the other hand `table_size` has already been tested to be at least
  68. `COLRV1_HEADER_SIZE` (34) so it is safe to subtract 4 from it.
  69. * src/sfnt/ttcolr.c (tt_face_load_colr): subtract 4 from `table_size`
  70. instead of adding 4 to font data offsets in bounds checks
  71. Fixes: https://crbug.com/1469348
  72. 2023-08-02 Alexei Podtelezhnikov <[email protected]>
  73. * src/base/ftobjs.c (open_face_from_buffer): Silence `maybe-uninitialized`.
  74. We never call this function without a `driver_name` (#1245).
  75. 2023-07-29 Alexei Podtelezhnikov <[email protected]>
  76. [truetype] Reduce v40 footprint.
  77. * src/truetype/ttgload.c (TT_HInt_Glyph, tt_loader_set_pp,
  78. tt_loader_init): Refactor code.
  79. 2023-07-27 Alexei Podtelezhnikov <[email protected]>
  80. [truetype] Remove Infinality for good (remaining bits).
  81. * src/truetype/ttobjs.h: Remove remaining fields.
  82. * src/truetype/ttinterp.c: Do not initialize them.
  83. * include/freetype/internal/tttypes.h: Remove descriptions.
  84. 2023-07-27 Alexei Podtelezhnikov <[email protected]>
  85. [truetype] Remove Infinality for good.
  86. Remove everything `#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY`,
  87. which was undefined for a while now.
  88. * include/freetype/internal/tttypes.h: Ditto.
  89. * src/truetype/truetype.c: Ditto.
  90. * src/truetype/ttdriver.c: Ditto.
  91. * src/truetype/ttgload.c: Ditto.
  92. * src/truetype/ttinterp.c: Ditto.
  93. * src/truetype/ttinterp.h: Ditto.
  94. * src/truetype/ttobjs.c: Ditto.
  95. * src/truetype/ttsubpix.[ch]: Remove files.
  96. * src/truetype/rules.mk: Don't mention "ttsubpix.c".
  97. 2023-07-21 Jouk Jansen <[email protected]>
  98. * vms_make.com: Provide separate library compiled with C++.
  99. Some types on OpenVMS x86_64 (for example, `long') have different sizes
  100. depending on whether compiled with either C or C++. In particular,
  101. X-Windows applications crash if linked with the C++ version.
  102. This patch makes `vms_make.com` create a second version of the FreeType
  103. library compiled with C++ if OpenVMS is running on the x86_64 platform.
  104. 2023-07-21 Jouk Jansen <[email protected]>
  105. * vms_make.com: Fix typos.
  106. 2023-07-21 Jouk Jansen <[email protected]>
  107. * src/smooth/ftgrays.c (FT_SSE2): Fix definition for VMS.
  108. 2023-07-19 Jouk Jansen <[email protected]>
  109. vms_make.com: Make use of additional libraries optional.
  110. Check whether `.olb` files are present.
  111. Also check for the HarfBuzz library.
  112. 2023-07-19 Jouk Jansen <[email protected]>
  113. vms_make.com: Add `/warn=noinfo` to `CFLAGS`.
  114. This reduces enormously the informationals while compiling on x86_64 (i.e.,
  115. which `.h` file is inluded form where).
  116. 2023-07-18 Ben Wagner <[email protected]>
  117. [woff2] Clean up on large brotli expansion
  118. * src/sfnt/sfwoff2.c (woff2_open_font): set error and goto cleanup
  119. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60711
  120. 2023-07-16 Werner Lemberg <[email protected]>
  121. [woff2] Avoid allocation bomb.
  122. This is a fix for commit 85167dbd5, reported as
  123. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60615
  124. * src/sfnt/sfwoff2.c (MAX_SFNT_SIZE): New macro.
  125. (woff2_open_font): Use it to limit the maximum size of an uncompressed WOFF2
  126. font.
  127. 2023-07-14 Werner Lemberg <[email protected]>
  128. [cff] Fix compiler warning.
  129. * src/cff/cffparse.c, src/cff/cffparse.h: Make `cff_parse_fixed` a local
  130. function.
  131. 2023-07-14 Ben Wagner <[email protected]>
  132. [woff2] Remove sfnt size guess check
  133. In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value
  134. is now just a hint and a conforming implementation must not reject
  135. otherwise valid data if the `totalSfntSize` turns out not to be exact.
  136. * src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed
  137. woff2 data would fit in the sfnt size guess.
  138. Fixes: #1235
  139. 2023-07-14 Skef Iterum <[email protected]>
  140. [cff] Make blend operator work with floats in private dicts.
  141. The CFF2 blend operator takes N default values and corresponding
  142. sets of deltas and pushes N values specific to a designspace
  143. location. CFF has a floating point numeric type and the FreeType
  144. blending code was not converting those into its internal 16.16
  145. Fixed type format.
  146. Fixes #1243.
  147. * src/cff/cffparse.c (do_fixed): Handle floating point numbers.
  148. Also fix scaling overflow check for integer-to-fixed conversion.
  149. * src/cff/cffload.c (cff_blend_doBlend): Updated.
  150. 2023-07-08 Hin-Tak Leung <[email protected]>
  151. * src/truetype/ttgload.c (TT_Hint_Glyph): More mostly cosmetic update.
  152. This is a follow-up to commit 49c74ac02, which creates a new local variable
  153. "exec = loader->exec", and shortening a lot of "loader->exec". This commit
  154. does two more such changes missed in that first commit.
  155. 2023-07-06 Hugh McMaster <[email protected]>
  156. [gzip] Don't compile internal zlib development files when using system zlib.
  157. `src/gzip/rules.mk` compiles the internal zlib sources even when using the
  158. zlib development files provided by a host system. If the internal zlib
  159. development files are not present, FreeType fails to build from source.
  160. This patch ensures the internal zlib development files are only
  161. prerequisites when not using zlib development files on a host system.
  162. * src/gzip/rules.mk (GZIP_DRV_SRCS): Define conditionally.
  163. 2023-06-24 Werner Lemberg <[email protected]>
  164. * Version 2.13.1 released.
  165. ==========================
  166. Tag sources with `VER-2-13-1'.
  167. * docs/VERSION.TXT: Add entry for version 2.13.1.
  168. * docs/CHANGES: Updated.
  169. * docs/release, docs/README, builds/macs/README: Updated.
  170. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  171. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  172. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  173. docs/freetype-config.1: s/2.13.0/2.13/1/, s/2130/2131/.
  174. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  175. * builds/unix/configure.raw (version_info): Set to 26:0:20.
  176. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  177. * subprojects/libpng.wrap, subprojects/zlib.wrap, subprojects/dlg: Updated.
  178. 2023-06-09 suzuki toshiya <[email protected]>
  179. Comment fixes.
  180. 2023-06-09 Werner Lemberg <[email protected]>
  181. [sdf] Correct handling of empty glyphs.
  182. This is a refinement of commit 7b3ebb9.
  183. * src/sdf/ftsdfrend.c (ft_sdf_render): Goto 'Exit' instead of directly
  184. returning.
  185. (fd_bsdf_render): Ditto, also taking care of setting `FT_GLYPH_OWN_BITMAP`
  186. correctly.
  187. 2023-06-05 Ben Wagner <[email protected]>
  188. Mark FT_Renderer_Class::raster_class as pointer to const
  189. The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`.
  190. The address of the definition is taken and assigned to
  191. `FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`.
  192. Until recently the `const` was cast away and with the removal of the
  193. cast there are now warnings about dropping this `const`. Instead of
  194. adding back the casts, make `FT_Renderer_Class::raster_class` a pointer
  195. to const, as is done with pointers in other interfaces.
  196. * include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class`
  197. as const.
  198. 2023-06-03 Ben Wagner <[email protected]>
  199. Fix some `FT_Fixed` vs. `FT_Long` confusion.
  200. `FT_Fixed` and `FT_Long` are both typedef'ed to be `signed long`. However,
  201. `FT_Fixed` implies that the lower 16 bits are being used to express
  202. fractional values and so these two types should not be confused.
  203. * include/freetype/internal/services/svmm.h (FT_Set_MM_Blend_Func): Use
  204. `FT_Fixed` for `coords`. Users are passing `FT_Fixed` and implementations
  205. are taking `FT_Fixed`.
  206. (FT_Get_MM_Blend_Func): Ditto.
  207. * src/autofit/afcjk.c (af_cjk_metrics_check_digits): Use `FT_Long` for
  208. `advance` and `old_advance`. `advance`'s address is passed as `FT_Long*` to
  209. `af_shaper_get_elem`, which writes the advance in em units (not fixed). The
  210. exact value is not important here as it is only compared to check whether it
  211. has changed.
  212. * src/autofit/aflatin.c (af_latin_metrics_check_digits): Ditto.
  213. 2023-06-03 Ben Wagner <[email protected]>
  214. */*: Remove many function pointer casts.
  215. In C it is undefined behavior to call a function through a function pointer
  216. of a different type. This is now detected by the Control Flow Integrity
  217. Sanitizer. All known issues have already been fixed. Prevent any
  218. accidental re-introduction by removing function pointer casts when defining
  219. services. The services will call the service functions through the function
  220. pointers on the service. As a result the functions must have the same type
  221. so there should be no need to cast. Removing the casts allows compilers to
  222. warn about assignment to an incompatible function pointer type.
  223. 2023-06-03 Werner Lemberg <[email protected]>
  224. Minor formatting.
  225. 2023-05-23 Werner Lemberg <[email protected]>
  226. Replace `sprintf` with `snprintf`.
  227. Fixes #1233.
  228. * include/freetype/config/ftstdlib.h (ft_sprintf): Replace with...
  229. (ft_snprintf): This new macro.
  230. * src/autofit/afhints.c (af_print_idx): Add argument to pass the buffer
  231. size.
  232. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
  233. af_glyph_hints_dump_edges): Updated.
  234. * src/bdf/bdflib.c (BUFSIZE): New macro.
  235. (bdf_parse_properties_, bdf_parse_start_): Use `ft_snprintf`.
  236. * src/tools/ftrandom/ftrandom.c (do_test): Use `snprintf`.
  237. 2023-05-23 Werner Lemberg <[email protected]>
  238. docs/DEBUG: Formatting.
  239. 2023-05-20 suzuki toshiya <[email protected]>
  240. [doc] Type1 GX (sfnt-wrapped Type1) is not supported.
  241. * docs/formats.txt: Clarify the reference of Type1 GX,
  242. and state that this format is not supported. This
  243. is because the content `TYP1' table is not exactly same
  244. with the Type1 font format specification; no eexec
  245. encryption is used. For detail and concrete examples,
  246. see the analysis on:
  247. https://gitlab.freedesktop.org/freetype/freetype/-/issues/1231
  248. 2023-05-19 Craig White <[email protected]>
  249. Add missing end quote of a string in the example code of FT_Trace_Set_Level
  250. 2023-05-19 Seigo Nonaka <[email protected]>
  251. [truetype] Reduce heap allocation of `deltaSet` variation data.
  252. `deltaSet` is an array of packed integers that can be 32 bits, 16 bits, or
  253. 8 bits. Before this change, these values were unpacked to 32-bit integers.
  254. However, this can cause big heap allocations, e.g., around 500 KByte for
  255. 'NotoSansCJK'. To reduce this amount, store the packed integers and unpack
  256. them just before passing to the calculation. At calculation time, due to
  257. the variable length of region indices, temporary heap allocations are
  258. necessary. This heap allocation is not negligible and visible in `ftbench`
  259. results. So, use stack-allocated arrays for short array calculations.
  260. Fixes #1230.
  261. * include/freetype/internal/ftmmtypes.h (GX_ItemVarDataRec): New fields
  262. `wordDeltaCount` and `longWords`.
  263. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Load packed
  264. data.
  265. (tt_var_get_item_delta): Unpack data before applying.
  266. 2023-05-17 Jouk Jansen <[email protected]>
  267. vms_make.com: Create shared executable for x86 version of OpenVMS.
  268. 2023-05-15 Werner Lemberg <[email protected]>
  269. Add new load flag `FT_LOAD_NO_SVG`.
  270. Modern color fonts often contain both an 'SVG' and 'COLR' table. FreeType
  271. always preferred 'SVG' over 'COLR' (this was a design decision), however,
  272. this might not be the right choice for the user. The new flags makes
  273. FreeType ignore the 'SVG' table while loading a glyph.
  274. Fixes #1229.
  275. * include/freetype/freetype.h (FT_LOAD_NO_SVG): New macro.
  276. * src/base/ftobjs.c (FT_Load_Glyph), src/cff/cffgload.c (cff_slot_load),
  277. src/truetype/ttgload.c (TT_Load_Glyph): Use it.
  278. 2023-05-13 Werner Lemberg <[email protected]>
  279. .mailmap: Updated.
  280. 2023-05-13 Alexei Podtelezhnikov <[email protected]>
  281. [cache] Merge functions.
  282. * src/cache/ftccache.c (FTC_Cache_Init): Merge into...
  283. (ftc_cache_done): ... this function, with unnecessary checks removed.
  284. 2023-05-13 Alexei Podtelezhnikov <[email protected]>
  285. [cache] Minor casting and cosmetic updates.
  286. * src/cache/ftcglyph.c (ftc_gcache_{init,done}): Remove casting.
  287. (FTC_GCache_Lookup): Cosmetic variable renaming.
  288. * src/cache/ftcsbits.c (ftc_snode_compare): Formatting.
  289. 2023-05-12 Werner Lemberg <[email protected]>
  290. * include/freetype/ftcache.h: Typo, punctuation.
  291. 2023-05-12 Alexei Podtelezhnikov <[email protected]>
  292. * include/freetype/ftcache.h: Formatted and updated.
  293. 2023-05-12 suzuki toshiya <[email protected]>
  294. * include/freetype/internal/t1types.h: Fix the indentation.
  295. 2023-05-11 Alexei Podtelezhnikov <[email protected]>
  296. [cache] Revise the dynamic hash table accounting.
  297. Instead of counting entries relative to the middle of the hash table,
  298. this switches to the absolute counter with the full index range mask.
  299. As a result, some calculations become a bit simpler. The cache resizing
  300. logic stays largely the same.
  301. * src/cache/ftccache.h (FTC_NODE_TOP_FOR_HASH): Revised with new counter.
  302. * src/cache/ftccache.c (ftc_get_top_node_for_hash): Ditto.
  303. (ftc_cache_resize): Simplify reallocations and stop their zeroing.
  304. (ftc_cache_init): Stop over-allocating but keep zeroing initially.
  305. (FTC_Cache_Clear, FTC_Cache_RemoveFaceID): Updated accordingly.
  306. 2023-05-11 suzuki toshiya <[email protected]>
  307. [t1cid] Set FT_FACE_FLAG_CID_KEYED.
  308. * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED.
  309. * cidriver.c (cid_get_is_cid): Comment about the case that
  310. is_cid cannot guarantee the glyph collection specification.
  311. 2023-05-09 Jouk Jansen <[email protected]>
  312. * src/smooth/ftgrays.c (FT_SSE2): Don't define for VMS.
  313. 2023-05-08 Werner Lemberg <[email protected]>
  314. * src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`.
  315. This was forgotten to change in commit 2b54eba36b (in May 2004).
  316. Reported as
  317. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739
  318. 2023-05-08 Werner Lemberg <[email protected]>
  319. Minor compiler warning fixes.
  320. * src/autofit/afcjk.c (af_cjk_get_standard_widths), src/autofit/aflatin.c
  321. (af_latin_get_standard_widths): Use `FT_CALLBACK_DEF`.
  322. * src/cff/cffparse.c (cff_parser_run): Initialize and fix allocation of `q`.
  323. 2023-05-08 Werner Lemberg <[email protected]>
  324. * src/psaux/t1cmap.c: Signature fixes.
  325. 2023-05-08 Werner Lemberg <[email protected]>
  326. * src/bzip2/ftbzip2.c: Signature fixes.
  327. 2023-05-08 Werner Lemberg <[email protected]>
  328. [cache] Signature fixes.
  329. * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove
  330. redundant function. It is equivalent to `ftc_gnode_compare` and becomes
  331. completely meaningless with fixed signatures.
  332. Update all callers.
  333. * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove
  334. redundant function. It is equivalent to `ftc_snode_compare` and becomes
  335. completely meaningless with fixed signatures.
  336. Update all callers.
  337. 2023-05-07 Werner Lemberg <[email protected]>
  338. [sdf] Signature fixes.
  339. 2023-05-07 Werner Lemberg <[email protected]>
  340. * src/svg/ftsvg.c: Signature fixes.
  341. 2023-05-07 Werner Lemberg <[email protected]>
  342. [raster] Signature fixes.
  343. 2023-05-07 Werner Lemberg <[email protected]>
  344. [smooth] Signature fixes.
  345. 2023-05-07 Werner Lemberg <[email protected]>
  346. [pshinter] Signature fixes.
  347. * src/pshinter/pshrec.c (t1_hints_close, t1_hints_apply): New wrapper
  348. functions.
  349. (t1_hints_funcs_init): Use them.
  350. (t2_hints_close, t2_hints_apply): New wrapper functions.
  351. (t2_hints_funcs_init): Use them.
  352. 2023-05-07 Werner Lemberg <[email protected]>
  353. [autofit] Signature fixes.
  354. 2023-05-07 Werner Lemberg <[email protected]>
  355. * src/sfnt/ttcmap: Signature fixes.
  356. 2023-05-07 Werner Lemberg <[email protected]>
  357. * src/pcf/pcfdrivr.c: Signature fix.
  358. 2023-05-07 Werner Lemberg <[email protected]>
  359. * src/winfonts/winfnt.c: Signature fixes.
  360. 2023-05-07 Werner Lemberg <[email protected]>
  361. * src/type42/t42parse.c: Signature fixes.
  362. 2023-05-07 Werner Lemberg <[email protected]>
  363. [pfr] Signature fixes.
  364. 2023-05-07 Werner Lemberg <[email protected]>
  365. * src/cid/cidload.c: Signature fixes.
  366. 2023-05-07 Werner Lemberg <[email protected]>
  367. * src/cff/cffcmap.c: Signature fixes.
  368. 2023-05-07 Werner Lemberg <[email protected]>
  369. * src/type1/t1load.c: Signature fixes.
  370. 2023-05-07 Werner Lemberg <[email protected]>
  371. [truetype] Signature fixes.
  372. 2023-05-07 Werner Lemberg <[email protected]>
  373. [base] Signature fixes.
  374. 2023-05-07 Werner Lemberg <[email protected]>
  375. * src/type42/t42drivr.c: Clean up interface.
  376. Ensure that all driver functions use the signature of the service or driver.
  377. This avoids pointer mismatches, which are technically undefined behaviour.
  378. Recent compilers are more picky in catching them as part of Control Flow
  379. Integrity tests.
  380. 2023-05-07 Werner Lemberg <[email protected]>
  381. * src/type1/*: Clean up interface.
  382. Ensure that all driver functions use the signature of the service or driver.
  383. This avoids pointer mismatches, which are technically undefined behaviour.
  384. Recent compilers are more picky in catching them as part of Control Flow
  385. Integrity tests.
  386. 2023-05-07 Werner Lemberg <[email protected]>
  387. * src/truetype/*: Clean up interface.
  388. Ensure that all driver functions use the signature of the service or driver.
  389. This avoids pointer mismatches, which are technically undefined behaviour.
  390. Recent compilers are more picky in catching them as part of Control Flow
  391. Integrity tests.
  392. 2023-05-07 Werner Lemberg <[email protected]>
  393. * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface.
  394. Ensure that all driver functions use the signature of the service or driver.
  395. This avoids pointer mismatches, which are technically undefined behaviour.
  396. Recent compilers are more picky in catching them as part of Control Flow
  397. Integrity tests.
  398. * src/sfnt/sfdriver.c (sfnt_load_table): New wrapper function.
  399. (sfnt_service_sfnt_table): Use it.
  400. 2023-05-07 Werner Lemberg <[email protected]>
  401. * src/psnames/psmodule.c: Use `FT_CALLBACK_DEF`.
  402. 2023-05-07 Werner Lemberg <[email protected]>
  403. * src/pfr/pfrdrivr.c: face -> pfrface, pfrface -> face.
  404. 2023-05-07 Werner Lemberg <[email protected]>
  405. * src/pcf/pcfdrivr.c: Clean up interface.
  406. Ensure that all driver functions use the signature of the service or driver.
  407. This avoids pointer mismatches, which are technically undefined behaviour.
  408. Recent compilers are more picky in catching them as part of Control Flow
  409. Integrity tests.
  410. 2023-05-07 Werner Lemberg <[email protected]>
  411. * src/cid/cidriver.c: Clean up interface.
  412. Ensure that all driver functions use the signature of the service or driver.
  413. This avoids pointer mismatches, which are technically undefined behaviour.
  414. Recent compilers are more picky in catching them as part of Control Flow
  415. Integrity tests.
  416. 2023-05-07 Werner Lemberg <[email protected]>
  417. * src/bdf/bdfdrivr.c: Clean up interface.
  418. Ensure that all driver functions use the signature of the service or driver.
  419. This avoids pointer mismatches, which are technically undefined behaviour.
  420. Recent compilers are more picky in catching them as part of Control Flow
  421. Integrity tests.
  422. 2023-05-07 Werner Lemberg <[email protected]>
  423. * src/cff/*: Clean up interface.
  424. Ensure that all driver functions use the signature of the service or driver.
  425. This avoids pointer mismatches, which are technically undefined behaviour.
  426. Recent compilers are more picky in catching them as part of Control Flow
  427. Integrity tests.
  428. 2023-05-06 Werner Lemberg <[email protected]>
  429. [truetype] Fix style name handling for variation fonts.
  430. * include/freetype/internal/tttypes.h (TT_FaceRec): New field
  431. `non_var_style_name`.
  432. * src/sfnt/sfobjs.c (sfnt_load_face): Initialize `non_var_style_name`.
  433. (sfnt_done_face): Free `non_var_style_name`.
  434. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Restore non-VF style name
  435. if switching back to non-VF mode.
  436. 2023-05-06 Werner Lemberg <[email protected]>
  437. [truetype] Fix PostScript name handling for variation fonts.
  438. A variation font's PostScript name of a named instance is usually different
  439. from the PostScript name of an unnamed instance. However, if a change
  440. between a named instance and an unnamed instance with exactly the same
  441. design axis values happened, it was possible that the PostScript name wasn't
  442. correctly updated.
  443. This commit reorganizes the code to handle this issue within the top-level
  444. API functions, using a new service to trigger recomputation of the
  445. PostScript name.
  446. * include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New
  447. typedef.
  448. (FT_Service_MultiMasters): New field `construct_ps_name`.
  449. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  450. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
  451. FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call
  452. `mm->construct_ps_name` to handle `postscript_name`.
  453. (FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle
  454. `postscript_name`.
  455. Use shortcut.
  456. * src/cff/cffdrivr.c (cff_construct_ps_name): New function.
  457. (cff_service_multi_masters): Updated.
  458. * src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`.
  459. (TT_Set_MM_Blend): Simplify.
  460. (TT_Set_Named_Instance): Return -1 if axis values haven't changed.
  461. Don't set `face_index`.
  462. (tt_construct_ps_name): New function.
  463. * src/truetype/ttgxvar.h: Updated.
  464. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  465. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  466. * src/type1/t1load.c (T1_Set_MM_Blend): Simplify.
  467. 2023-05-06 Werner Lemberg <[email protected]>
  468. * include/freetype/internal/services/svmm.h: Minor changes.
  469. 2023-05-06 Werner Lemberg <[email protected]>
  470. [truetype] Fix deactivation of variation font handling.
  471. According to the documentation, the functions `FT_Set_Named_Instance`,
  472. `FT_Set_MM_Design_Coordinates`, `FT_Set_Var_Design_Coordinates`, and
  473. `FT_Set_Var_Blend_Coordinates` can unset the `FT_FACE_FLAG_VARIATION` flag.
  474. (The same is true for `FT_Set_MM_WeightVector` but this information was
  475. accidentally omitted from the documentation.)
  476. However, if a call of these functions didn't change the axis values this
  477. could fail because internal shortcuts exited too early.
  478. This commit reorganizes the code to handle `FT_FACE_FLAG_VARIATION` in the
  479. top-level API functions, also taking care of the issue at hand.
  480. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_MM_WeightVector,
  481. FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
  482. FT_Set_Var_Blend_Coordinates): Handle `FT_FACE_FLAG_VARIATION`.
  483. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design,
  484. TT_Set_Named_Instance) Don't handle `FT_FACE_FLAG_VARIATION`.
  485. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_WeightVector,
  486. T1_Set_MM_Design): Ditto.
  487. * src/cff/cffobjs.c (cff_face_init): Use `FT_Set_Named_Instance` instead of
  488. low-level functions.
  489. * src/truetype/ttobjs.c (tt_face_init): Ditto.
  490. 2023-05-06 Werner Lemberg <[email protected]>
  491. s/set_instance/set_named_instance/
  492. * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed
  493. to...
  494. (FT_Set_Named_Instance_Func): ...this.
  495. (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`.
  496. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  497. * src/base/ftmm.c (FT_Set_Named_Instance): Updated.
  498. * src/cff/cffdrivr.c (cff_set_instance): Renamed to...
  499. (cff_set_named_instance): ...this.
  500. (cff_service_multi_masters): Updated.
  501. * src/cff/cffobjs.c (cff_face_init): Updated.
  502. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  503. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  504. 2023-05-06 Werner Lemberg <[email protected]>
  505. New Variation Font function `FT_Get_Default_Named_Instance`.
  506. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Get_Default_Named_Instance):
  507. New function.
  508. * include/freetype/internal/services/svmm.h
  509. (FT_Get_Default_Named_Instance_Func): New typedef.
  510. (FT_Service_MultiMasters): New field `get_default_named_instance`.
  511. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  512. * include/freetype/internal/tttypes.h (TT_Face): New field
  513. `var_default_named_instance`.
  514. * src/sfnt/sfobjc.s (sfnt_init_face): Initialize
  515. `var_default_named_instance`.
  516. * src/cff/cffdrivr.c (cff_get_default_named_instance): New function.
  517. (cff_service_multi_masters): Updated.
  518. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize
  519. `var_default_named_instance`.
  520. (TT_Get_Default_Named_Instance): New function.
  521. * src/truetype/ttgxvar.h: Updated.
  522. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  523. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  524. * docs/CHANGES: Updated.
  525. 2023-05-06 Werner Lemberg <[email protected]>
  526. [cid] Improve tracing messages; formatting.
  527. 2023-05-04 Alexei Podtelezhnikov <[email protected]>
  528. * src/cache/ftccache.c (ftc_node_hash_unlink): Minor.
  529. 2023-05-04 Alexei Podtelezhnikov <[email protected]>
  530. * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Purge backwards.
  531. 2023-05-04 Alexei Podtelezhnikov <[email protected]>
  532. [cache] Revise list cleansing.
  533. * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Use one loop to
  534. do it.
  535. * src/cache/ftcmanag.c (FTC_Manager_Compress, FTC_Manager_FlushN):
  536. Streamline loops.
  537. 2023-05-03 suzuki toshiya <[email protected]>
  538. [t1cid] Improve cid_get_cid_from_glyph_index().
  539. Update cid_get_cid_from_glyph_index() to
  540. return an error and CID=0 in the case that
  541. the specified glyph index points to an invalid
  542. entry.
  543. cidgload.h (cid_compute_fd_and_offsets):
  544. Declare new helper function to set the
  545. fd_select and 2 offsets to access the glyph
  546. description data.
  547. cidgload.c (cid_compute_fd_and_offsets):
  548. Move the part loading fd_select and 2 offsets
  549. from cid_load_glyph() to here. If the loaded
  550. parameters are broken, return the Invalid_Offset
  551. error. This function does not load the glyph
  552. data, only fills these parameters.
  553. (cid_load_glyph): Use new helper function in above.
  554. cidriver.c (cid_get_cid_from_glyph_index):
  555. Check whether the requested glyph index points
  556. to a valid entry, by calling cid_compute_fd_and_offsets().
  557. If it is valid, fill the cid by the glyph
  558. index (=CID). If it is invalid, return an
  559. error and fill the cid by 0.
  560. 2023-04-30 Werner Lemberg <[email protected]>
  561. API documentation: Re-organize chapters and sections
  562. * Split the very long 'Base Interface' section into smaller sections.
  563. * Split the 'Core API' chapter into two chapters.
  564. * Remove single enumeration values from `@order` fields since they have no
  565. effect.
  566. 2023-04-29 Alexei Podtelezhnikov <[email protected]>
  567. * src/sfnt/pngshim.c (Load_SBit_Png): Remove FALL_THROUGH warning.
  568. 2023-04-28 Werner Lemberg <[email protected]>
  569. * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard.
  570. Reject 'OTTO' fonts with no valid tables.
  571. 2023-04-28 Werner Lemberg <[email protected]>
  572. * src/cff/cffdrivr/c (cff_get_ps_name): Avoid unnecessary crash.
  573. The situation can happen if `FT_New_Face` (or one of its siblings) is called
  574. with a negative index to get the number of contained faces, followed
  575. immediately by a call to `FT_Get_Postscript_Name`. While this is not a valid
  576. use of the FreeType library there is no need for a crash.
  577. Fixes #1219.
  578. 2023-04-28 Werner Lemberg <[email protected]>
  579. * src/cff/cffdrivr.c (cff_ps_get_font_info): Reject 'CFF2' format.
  580. 2023-04-28 Werner Lemberg <[email protected]>
  581. * src/cid/cidgload.c (cid_load_glyph): Fix compiler warnings.
  582. 2023-04-28 Werner Lemberg <[email protected]>
  583. Minor documentation updates.
  584. 2023-04-27 Werner Lemberg <[email protected]>
  585. * src/ttgxvar.c: Minor changes.
  586. (TT_Get_MM_Var): Improve tracing messages.
  587. (tt_set_mm_blend): Minor speed-up.
  588. 2023-04-27 Werner Lemberg <[email protected]>
  589. s/this is,/that is,/
  590. 2023-04-27 Alexei Podtelezhnikov <[email protected]>
  591. [bdf] Clean up the atom property parsing.
  592. * src/bdflib.c (bdf_is_atom_): Refactor code with fewer checks.
  593. (bdf_list_join_): Return NULL.
  594. (bdf_add_comment_): Use const argument.
  595. (bdf_get_property): Ditto, ditto, make the function static.
  596. * src/bdf.h (bdf_get_property): Remove prototype.
  597. 2023-04-25 Werner Lemberg <[email protected]>
  598. Improve/add source comments and documentation.
  599. 2023-04-25 Werner Lemberg <[email protected]>
  600. [sfnt] Fix handling of PS names for Variation Fonts.
  601. * src/sfnt/sfdriver.c (get_win_string, get_apple_string): Continue
  602. construction of string if an invalid character is encountered.
  603. Fixes #1218.
  604. 2023-04-24 suzuki toshiya <[email protected]>
  605. [t1cid] Change the trace messages of the charstrings retrieval errors.
  606. The t1cid driver catches 3 types of errors in
  607. the charstrings retrieval;
  608. A) The invalid FD number, there are 2 subtypes;
  609. A-1) FD number is the maximum number fitting to FDBytes.
  610. A-2) FD number is greater than num_dicts.
  611. B) Declared length is overrunning.
  612. C) Declared length is invalid (its end is before its head).
  613. Considering that some widely distributed fonts
  614. (e.g., "CJKV" book by O'Reilly) have A-1 errors
  615. in the unimplemented glyphs, the trace level for
  616. A-1 is calmed to level 1.
  617. The errors A-2, B, and C would be irregular;
  618. their trace levels are kept at level 0, but
  619. the updated trace messages include the CID number.
  620. 2023-04-24 suzuki toshiya <[email protected]>
  621. [truetype] Fix `make multi'.
  622. * src/truetype/ttgxvar.c: Include freetype/internal/services/svmetric.h
  623. for the FT_Service_MetricsVariations type definition.
  624. 2023-04-19 Ben Wagner <[email protected]>
  625. [services] FT_Size_Reset_Func to return FT_Error
  626. The `MetricsVariations` `FT_Size_Reset_Func` is currently defined to
  627. return `void`, but the implementations return `FT_Error`. Even though
  628. the pointers passed will be the same at runtime, calling a function
  629. through a pointer of a different type from the original function pointer
  630. type is undefined behavior. This may be caught at runtime by Control
  631. Flow Integrity with something like clang's `cfi-icall`.
  632. Issue: https://crbug.com/1433651
  633. * include/freetype/internal/services/svmetric.h (FT_Size_Reset_Func):
  634. return `FT_Error` instead of `void`.
  635. 2023-04-17 Ben Wagner <[email protected]>
  636. [truetype] tt_size_reset_height to take FT_Size
  637. The `MetricsVariations` `FT_Size_Reset_Func` is defined to take an
  638. `FT_Size`. Because `tt_size_reset_height` is to be used as such a
  639. function, it must also take an `FT_Size` instead of a `TT_Size`. Even
  640. though the pointers passed will be the same at runtime, calling a
  641. function through a pointer of a different type from the original
  642. function pointer type is undefined behavior. This may be caught at
  643. runtime by Control Flow Integrity with something like clang's
  644. `cfi-icall`.
  645. Issue: https://crbug.com/1433651
  646. * src/truetype/ttobjs.h (tt_size_reset_height): take `FT_Size`
  647. * src/truetype/ttobjs.c (tt_size_reset_height): take `FT_Size` and
  648. update documentation
  649. 2023-04-13 Werner Lemberg <[email protected]>
  650. * src/truetype/ttinterp.c: Remove outdated comments.
  651. 2023-04-11 Ben Wagner <[email protected]>
  652. [sfnt, truetype] Add `size_reset` to `MetricsVariations`.
  653. This is a generalization of commit
  654. ```
  655. commit e6699596af5c5d6f0ae0ea06e19df87dce088df8
  656. Author: Werner Lemberg <[email protected]>
  657. Date: Thu Feb 2 11:38:04 2017 +0100
  658. [truetype] Fix MVAR post-action handling.
  659. ```
  660. It is also possible for plain `CFF ` style fonts to contain an `fvar` and
  661. `MVAR` table and use `cff_metrics_adjust`. `tt_size_reset` should only be
  662. called with `TT_Size` and never with `CFF_Size`.
  663. Allow the "metrics-variations" service to specify the correct function (if
  664. any) to reset `FT_Size`s after adjusting metrics.
  665. * src/truetype/ttobjs.c (tt_size_reset): Split off some functionality
  666. into...
  667. (tt_size_reset_height): ... this new function.
  668. * src/truetype/ttdriver.c (tt_service_metrics_variations): Add
  669. `size_reset`.
  670. (tt_size_select, tt_size_request): Updated.
  671. * src/truetype/ttobjs.h: Updated.
  672. * include/freetype/internal/services/svmetric.h (MetricsVariations): Add
  673. `size_reset`.
  674. (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Updated.
  675. * include/freetype/internal/tttypes.h (TT_FaceRec_): Rename `var` to
  676. `tt_var` and add `face_var`.
  677. * src/cff/cffdrivr.c (cff_service_metrics_variations): Add `size_reset`.
  678. (cff_hadvance_adjust, cff_metrics_adjust): Updated.
  679. * src/cff/cffobjs.c (cff_face_init): Use `face_var`.
  680. * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `face_var`.
  681. * src/sfnt/ttmtx.c (tt_face_get_metrics): Use `tt_var`.
  682. * src/truetype/ttgxvar.c (tt_size_reset_iterator): Renamed to...
  683. (ft_size_reset_iterator): ... this new function.
  684. Call `size_reset`.
  685. (tt_apply_mvar): Pass `size_reset` to `ft_size_reset_iterator`.
  686. Fixes #1211
  687. 2023-04-10 Alexei Podtelezhnikov <[email protected]>
  688. * src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate.
  689. 2023-04-10 Alexei Podtelezhnikov <[email protected]>
  690. Align `char_next` return types.
  691. This is mostly cosmetic because FT_UInt and FT_UInt32 are likely identical.
  692. * src/sfnt/ttcmap.c, src/cff/cffcmap.c, src/psaux/t1cmap.c,
  693. src/psnames/psmodule.c, include/freetype/internal/service/svpcsmap.h,
  694. src/pfr/pfrcmap.c, src/winfonts/winfnt.c (*_char_next): return FT_UInt.
  695. 2023-04-09 Alexei Podtelezhnikov <[email protected]>
  696. [sfnt] Clean up CMAP{4,12,13} handling.
  697. This moves the charcode overflow checks upstream and turns some
  698. while-loops into the do-while ones to avoid the uninitialized warnings.
  699. This should slightly reduce the number of checks and jumps.
  700. * src/sfnt/ttcmap.c (tt_cmap{4,12,13}_next,
  701. tt_cmap{4.12.13}_char_map_linear): Remove the charcode overflow check.
  702. (tt_cmap{4,12,13}_char_map_binary): Ditto and use do-while.
  703. (tt_cmap{12,13}_char_next): Add the overflow check.
  704. 2023-04-03 Alexei Podtelezhnikov <[email protected]>
  705. * src/sfnt/ttpost.c (load_format_25): Do not abort frame reading.
  706. 2023-04-03 Alexei Podtelezhnikov <[email protected]>
  707. * src/sfnt/ttpost.c (load_format_*): Streamline frame reading.
  708. 2023-04-02 Alexei Podtelezhnikov <[email protected]>
  709. * src/sfnt/ttpost.c: Formatting and comments.
  710. 2023-04-02 Alexei Podtelezhnikov <[email protected]>
  711. [sfnt] Consolidate POST version 2.0 and 2.5 (pt 2).
  712. * src/sfnt/ttpost.c (load_format_20, load_format_25): Update arguments
  713. and move shared calls and checks upstream to...
  714. (load_post_names): ... this function.
  715. (tt_face_free_ps_names, tt_face_get_ps_name): Updated.
  716. 2023-04-02 Alexei Podtelezhnikov <[email protected]>
  717. [sfnt] Consolidate POST version 2.0 and 2.5 (pt 1).
  718. The deprecated POST version 2.5 can be handled using the data
  719. structures of version 2.0. The goal is to reduce the footprint.
  720. * include/freetype/internal/tttypes.h (TT_Post_Names): Absorb and...
  721. (TT_Post_20, TT_Post_25): ... remove these structures.
  722. src/sfnt/ttpost.c (load_post_names, tt_face_get_ps_name,
  723. tt_face_free_ps_names, load_format_20): Updated accordingly.
  724. (load_format_25): ditto and convert offsets to glyph indices.
  725. 2023-04-01 Alexei Podtelezhnikov <[email protected]>
  726. [sfnt] Miscellaneous POST clean-ups.
  727. * src/sfnt/ttpost.c (load_format_20): Decrease casts.
  728. (load_format_25): Check the table length and impose a theoretical
  729. glyph number limit usable with 8-bit offset. Decrease casts.
  730. (load_post_names): Pass the mapping data length without 2 bytes.
  731. 2023-03-30 Alexei Podtelezhnikov <[email protected]>
  732. * src/sfnt/ttpost.c (load_format_20): Simplify comutations.
  733. 2023-03-29 Alexei Podtelezhnikov <[email protected]>
  734. [sfnt] Streamline POST format 2.0 handing (cont'd).
  735. * src/sfnt/ttpost.c (load_format_20): Co-allocate the string data and
  736. their pointers, which makes it easier to handle and free them.
  737. (tt_face_free_ps_names): Updated.
  738. * include/freetype/internal/tttypes.h (TT_Post_20): Update type.
  739. 2023-03-20 Alexei Podtelezhnikov <[email protected]>
  740. [cff] Simplify `t2_strings` management in the old engine.
  741. * src/cff/cffparse.c (cff_parser_run): Allocate the charstring buffers
  742. and the list nodes together so that they can be freed at once.
  743. (finalize_t2_strings): Removed as no longer needed.
  744. (cff_parser_done): Updated.
  745. 2023-03-19 Alexei Podtelezhnikov <[email protected]>
  746. [cff] Rework the stream limit checks.
  747. The old stream limit checks, before 6986ddac1ece, were good but
  748. pointless for the crafted t2_strings. Checking limits there is
  749. not necessary as they are created to hold all data. By using two
  750. conditions, we can detect the actual crossing of the stream boundary
  751. as appropriate for the stream pointer only. The t2_strings parsing
  752. will not be triggering these checks.
  753. * src/cff/cffparse.c (cff_parser_within_limits): Removed.
  754. (cff_parse_real, cff_parse_integer): Redesign the stream limit check.
  755. (cff_parse_num, do fixed, cff_parse_fixed_dynamic): Update callers.
  756. 2023-03-18 Alexei Podtelezhnikov <[email protected]>
  757. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use for-loop.
  758. Even though we never call `TT_Load_Simple_Glyph` with zero contours,
  759. out of abundance of precaution, let's handle this case properly.
  760. 2023-03-18 Alexei Podtelezhnikov <[email protected]>
  761. [truetype] Clean up zeroing and local variables.
  762. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Avoid zeroing.
  763. (load_truetype_glyph): Avoid zeroing and clean local variables.
  764. 2023-03-16 Werner Lemberg <[email protected]>
  765. * include/freetype/ftsystem.h (FT_Stream_IoFunc): Improve documentation.
  766. Fixes #1208.
  767. 2023-03-16 Alexei Podtelezhnikov <[email protected]>
  768. * src/base/ftsynth.c (FT_GlyphSlot_AdjustWeight): New API.
  769. 2023-03-16 Alexei Podtelezhnikov <[email protected]>
  770. [truetype] Clean up glyph loading.
  771. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean space checking.
  772. (TT_Hint_Glyph): Don't copy the outline structure.
  773. (TT_Process_Simple_Glyph): Cosmetic update.
  774. 2023-03-15 Alexei Podtelezhnikov <[email protected]>
  775. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean up.
  776. 2023-03-13 Werner Lemberg <[email protected]>
  777. builds/vms/apinames_vms.bash: Fix `unzip` artifact
  778. The problem occured when unpacking a zip file created on OpenVMS on Linux.
  779. While OpenVMS knows many different file formats, Unix only knows stream-LF
  780. and binary. In principle `zip` on Linux should have translated the file to
  781. stream-LF but failed to do so. That caused the file to incorrectly contain
  782. only one line with control-characters.
  783. 2023-03-11 Alexei Podtelezhnikov <[email protected]>
  784. [truetype] Fix recent fallout in memory management.
  785. * src/truetype/ttgload.c (TT_Process_Composite_Glyph,
  786. TT_Load_Simple_Glyph): Clean up old instructions regardless of
  787. new ones, postpone setting `control_len` and `control_data` until...
  788. (TT_Load_Glyph): ... the exit from this function.
  789. 2023-03-10 Jouk Jansen <[email protected]>
  790. Update VMS installation support.
  791. 2023-03-10 Alexei Podtelezhnikov <[email protected]>
  792. * src/truetype/ttgload.c (TT_Hint_Glyph): Mostly cosmetic update.
  793. The number of instructions is now taken from the executed context.
  794. Technically, this means that `control_len` and `control_data`
  795. values are no longer _used_ internally but only expose them.
  796. 2023-03-08 Werner Lemberg <[email protected]>
  797. apinames.c: Add comment.
  798. 2023-03-07 Werner Lemberg <[email protected]>
  799. [gzip] File `infback.c` is not needed.
  800. * src/gzip/infback.c: Remove.
  801. * src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
  802. 2023-03-07 Werner Lemberg <[email protected]>
  803. [apinames] Fix VMS handling of overly long function names.
  804. Based on ideas from Jouk Jansen <[email protected]>.
  805. * src/tools/vms_shorten_symbol.c: New file, taken from
  806. https://sourceforge.net/p/vms-ports/vmsshortsym/ci/default/tree/vms_shorten_symbol.c
  807. with some minor edits to allow compilation with C++ and being included in
  808. another source code file.
  809. * src/tools/apinames.c: Include `vms_shorten_symbol.c`.
  810. (PROGRAM_VERSION): Set to '0.5'.
  811. (names_dump) [OUTPUT_VMS_OPT]: Call `vms_shorten_symbol` to get unique function
  812. identifiers not longer than 31 characters.
  813. 2023-03-07 Werner Lemberg <[email protected]>
  814. * src/tools/apinames.c (panic): Accept variable number of arguments.
  815. 2023-03-07 Alexei Podtelezhnikov <[email protected]>
  816. * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix leak too.
  817. 2023-03-07 Alexei Podtelezhnikov <[email protected]>
  818. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Triage memory leak.
  819. This leak has been introduced in the previous commit and immediately
  820. detected:
  821. https://chromium-review.googlesource.com/c/chromium/src/+/4313202
  822. 2023-03-06 Alexei Podtelezhnikov <[email protected]>
  823. [truetype] Simplify memory management.
  824. Instead of using `Update_Max`, switch to regular FreeType memory
  825. allocation macros, stop pre-allocating the glyph instruction arrays.
  826. * src/truetype/ttgload.c (TT_Load_Simple_Glyph,
  827. TT_Process_Composite_Glyph): Switch to regular memory allocation.
  828. * src/truetype/ttinterp.c (Update_Max): Removed.
  829. (TT_Load_Context): Reallocate stack and free old instructions.
  830. (Modify_CVT_Check, Ins_WS): Switch to regular memory allocation.
  831. * src/truetype/ttinterp.h (Update_Max): Removed.
  832. 2023-03-06 David PROVENT <[email protected]>
  833. Added information about the zlib version update in the changelog
  834. 2023-03-06 Alexei Podtelezhnikov <[email protected]>
  835. Fix a couple of MSVC warnings.
  836. * src/base/ftcalc.c (FT_MulAddFix): Add cast.
  837. * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Ditto.
  838. 2023-03-05 Alexei Podtelezhnikov <[email protected]>
  839. * builds/windows/vc2010/freetype.vcxproj: Suppress C4267 on _WIN64.
  840. This usually comes from `strlen` returning 64-bit `size_t`, which
  841. we often assign to 32-bit `FT_ULong` on Windows-64 (LLP64).
  842. 2023-03-05 Alexei Podtelezhnikov <[email protected]>
  843. * src/cff/cffparse.c (cff_parser_run): Thinko.
  844. 2023-03-05 Alexei Podtelezhnikov <[email protected]>
  845. [cff] Clean up CharString number encoding.
  846. * src/cff/cffparser.c (cff_parser_run): Work with signed numbers.
  847. 2023-03-05 Alexei Podtelezhnikov <[email protected]>
  848. * src/cff/cffparse.c (cff_parser_run): Fix variable type.
  849. 2023-03-04 Alexei Podtelezhnikov <[email protected]>
  850. [cff] Clean up memory management in the old engine.
  851. * src/cff/cffparse.c (finalize_t2_strings): Fix NULL-dereferencing
  852. in the out-of-memory situation, use `FT_FREE`.
  853. (cff_parser_run): Use FreeType memory allocation macros and avoid
  854. uninitialized pointers.
  855. 2023-03-04 Alexei Podtelezhnikov <[email protected]>
  856. * src/cff/cffobjs.c (cff_size_init): Synonymous change.
  857. 2023-03-04 Alexei Podtelezhnikov <[email protected]>
  858. * src/sfnt/sfobjs.c (sfnt_load_face): Shorten de-referencing.
  859. 2023-03-04 Alexei Podtelezhnikov <[email protected]>
  860. [pfr] Shorten de-referencing.
  861. * src/pfr/pfrobjs.c (pfr_face_done, pfr_face_init): Use closer `memory`.
  862. * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove `loader`.
  863. 2023-03-03 Alexei Podtelezhnikov <[email protected]>
  864. * src/cff/cffobjs.c (cff_size_get_globals_funcs): Shorten de-referencing.
  865. 2023-03-03 Alexei Podtelezhnikov <[email protected]>
  866. [cff,cid,type1] Shorten de-referencing.
  867. * src/cff/cffobjs.c (cff_clot_init): Use immediate library reference.
  868. * src/cid/cidobjs.c (cid_slot_init): Ditto.
  869. * src/type1/t1objs.c (T1_GlyphSlot_Init): Ditto.
  870. 2023-03-02 Alexei Podtelezhnikov <[email protected]>
  871. * configure: Use `sed` instead of `grep`.
  872. This is more portable and consistent with `autogen.sh`.
  873. 2023-03-02 Ben Wagner <[email protected]>
  874. Avoid strtol on non-null-terminated data.
  875. Technically, `strtol` can only be used with C strings terminated with
  876. `\0`. CID data is not generally null-terminated and often does not
  877. contain a `\0` if it is hex-encoded. AddressSanitizer with `ASAN_OPTIONS`
  878. containing `strict_string_checks=1` verifies this by using an adversarial
  879. `strtol` that always reads to the terminating `\0`.
  880. To avoid undefined behavior from `strtol` in `cid_parser_new`, use the
  881. parser to parse the tokens instead of attempting to parse them ad-hoc.
  882. This will internally use `PS_Conv_Strtol` to parse the integer, which
  883. respects the parser's limits and directly implements the PostScript
  884. parsing rules for integers.
  885. * src/cid/cidparse.c (cid_parser_new): Use the parser to parse the
  886. tokens.
  887. Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1420329
  888. 2023-03-02 Alexei Podtelezhnikov <[email protected]>
  889. * src/cff/cffload.c (cff_subfont_load): Synonymous update.
  890. 2023-03-01 ubawurinna <[email protected]>
  891. * src/gzip/README.freetype: Update version.
  892. 2023-03-01 ubawurinna <[email protected]>
  893. [gzip] Fix static linking.
  894. Without this patch, static linking with MS Visual Studio causes linking
  895. errors.
  896. * src/gzip/ftgzip.c: Set `ZEXPORT` to nothing and `ZEXTERN` to static for
  897. all compilers.
  898. 2023-03-01 Werner Lemberg <[email protected]>
  899. * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update.
  900. This follows
  901. https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00200.html
  902. 2023-02-28 Alexei Podtelezhnikov <[email protected]>
  903. [truetype] Treat 38 as 40 without Infinality.
  904. * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Reinstate.
  905. * src/truetype/ttdriver.c (tt_property_set): Fallback from 38 to 40.
  906. 2023-02-26 Werner Lemberg <[email protected]>
  907. * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update.
  908. This follows
  909. https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html
  910. 2023-02-26 Werner Lemberg <[email protected]>
  911. * src/*: Replace leading underscores with trailing ones in dummy variables.
  912. This is to avoid clang warnings.
  913. 2023-02-26 Karl Berry <[email protected]>
  914. * configure: Don't hardcode `grep -E`.
  915. TeXLive still supports Solaris 5.10, where the system's `grep` doesn't
  916. accept the `-E` option. We thus introduce an `EGREP` variable that is set
  917. to either `grep -E` or `-egrep`.
  918. 2023-02-26 Alexei Podtelezhnikov <[email protected]>
  919. * src/cff/cffload.c (cff_encoding_load): Optimize array zeroing.
  920. This is unnecessary for predefined standard and expert encodings.
  921. Even for custom encodings the arrays might be already zeroed when
  922. CFF_FontRec is created but we keep it just in case.
  923. 2023-02-25 Alexei Podtelezhnikov <[email protected]>
  924. * src/type1/t1load.c (T1_Get_MM_Var): Optimize array zeroing.
  925. 2023-02-25 Tamir Duberstein <[email protected]>
  926. * src/base/ftsystem.c (ft_ansi_stream_io): Avoid undefined behaviour.
  927. Also short-circuit on `offset` to avoid checking `count` a second time when
  928. `ft_ansi_stream_io` is used for reading.
  929. Per ISO/IEC 9899:
  930. If an argument to a function has an invalid value (such as a value outside
  931. the domain of the function, or a pointer outside the address space of the
  932. program, or a null pointer, or apointer to non-modifiable storage when the
  933. corresponding parameter is not const-qualified) or a type (after
  934. promotion) not expected by a function with variable number of arguments,
  935. the behavior is undefined. If a function argument is described as being
  936. an array, the pointer actually passed to the function shall have a value
  937. such that all address computations and accesses to objects (that would be
  938. valid if the pointer did point to the first element of such an array) are
  939. in fact valid.
  940. Per IEEE Std 1003.1:
  941. size_t fread(void *restrict ptr, size_t size, size_t nitems,
  942. FILE *restrict stream);
  943. The `fread` function shall read into the array pointed to by `ptr` up to
  944. `nitems` elements whose size is specified by `size` in bytes, from the
  945. stream pointed to by `stream`.
  946. Since the first argument to `fread` is described as being an array, its
  947. behavior is undefined when that argument is a null pointer.
  948. Per the documentation on `ft_ansi_stream_io`:
  949. If `count' is zero (this is, the function is used for seeking), a non-zero
  950. return value indicates an error.
  951. Thus the intent is clear, and the call to `fread` can be skipped, avoiding
  952. undefined behaviour.
  953. 2023-02-21 Alexei Podtelezhnikov <[email protected]>
  954. [raster] Clean up contour indexing.
  955. * src/raster/ftraster.c (Decompose_Curve, Convert_Glyph): Use consistent
  956. index types (Int) and compact iterations.
  957. 2023-02-21 Alexei Podtelezhnikov <[email protected]>
  958. [autofit] Clean up contour indexing.
  959. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Refactor.
  960. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Ditto.
  961. 2023-02-21 Alexei Podtelezhnikov <[email protected]>
  962. * src/base/ftoutln.c (FT_Outline_Check): Fix C4701 warning.
  963. 2023-02-21 Alexei Podtelezhnikov <[email protected]>
  964. * src/sdf/ftsdf.c (get_min_distance_cubic): Fix C4701, typos.
  965. 2023-02-20 Alexei Podtelezhnikov <[email protected]>
  966. * src/base/ftstroke.c (FT_Stroker_ParseOutline): Clean up contour indexing.
  967. 2023-02-20 Alexei Podtelezhnikov <[email protected]>
  968. [base] Clean up contour indexing.
  969. * src/base/ftoutln.c (FT_Outline_Reverse, FT_Outline_EmboldenXY,
  970. FT_Outline_Get_Orientation): Set the first and last indexes together.
  971. (FT_Outline_Decompose): Ditto and check them more stringently.
  972. * src/smooth/ftgrays.c (FT_Outline_Decompose)[STANDALONE_]: Ditto.
  973. 2023-02-20 Alexei Podtelezhnikov <[email protected]>
  974. * src/base/ftoutln.c (FT_Outline_Check): Update error code, clean up.
  975. 2023-02-17 Alexei Podtelezhnikov <[email protected]>
  976. [truetype] Hide Infinality.
  977. Remove Infinality as an option before its complete extraction.
  978. * include/freetype/ftoption.h: Remove the Infinality option.
  979. * devel/ftoption.h: Ditto.
  980. * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now.
  981. 2023-02-17 Alex Ringlein <[email protected]>
  982. * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.
  983. A cubic contour has to always start from an on-point. Therefore, we
  984. should not swap the first with the last point, which might be off, and
  985. obtain an invalid contour. This does not matter for conic contours.
  986. If anything, it also saves one swap there. Fixes #1207.
  987. 2023-02-16 Werner Lemberg <[email protected]>
  988. Documentation improvement for `FT_Bitmap`.
  989. Fixes #1205.
  990. 2023-02-10 Alexei Podtelezhnikov <[email protected]>
  991. [type1/MM] Round design coordinates.
  992. The design coordinates for MM fonts were not rounded. For example,
  993. `FT_Get_Var_Design_Coordinates` returned values with fractional part.
  994. * src/type1/t1load.c (mm_axis_unmap): Refactor with rounding.
  995. * include/freetype/ftmm.h (FT_Var_Axis, FT_Set_Var_Design_Coordinates,
  996. FT_Get_Var_Design_Coordinates): Reword documentation.
  997. 2023-02-09 Jan Alexander Steffens (heftig) <[email protected]>
  998. * builds/meson/parse_modules_cfg.py: Handle `gxvalid` and `otvalid`.
  999. These need a name mapping similar to what was done for other modules,
  1000. or linking will fail.
  1001. 2023-02-09 Werner Lemberg <[email protected]>
  1002. * build/toplevel.mk (do_dist): Fix typo.
  1003. 2023-02-09 Werner Lemberg <[email protected]>
  1004. * Version 2.13 released.
  1005. ==========================
  1006. Tag sources with `VER-2-13-0'.
  1007. * docs/VERSION.TXT: Add entry for version 2.13.
  1008. * docs/CHANGES: Updated.
  1009. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  1010. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  1011. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  1012. docs/freetype-config.1: s/2.12.1/2.13/, s/2121/2130/.
  1013. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 13.
  1014. (FREETYPE_PATCH): Set to 0.
  1015. * builds/unix/configure.raw (version_info): Set to 25:0:19.
  1016. * CMakeLists.txt (VERSION_MINOR): Set to 13.
  1017. (VERSION_PATCH): Set to 0.
  1018. 2023-02-09 Alexei Podtelezhnikov <[email protected]>
  1019. Comment on `FT_GlyphSlot_Slant'.
  1020. 2023-02-08 Werner Lemberg <[email protected]>
  1021. [autofit] Fix 'multi' compilation.
  1022. * src/autofit/ft-hb.c: Decorate with `FT_LOCAL_DEF`.
  1023. Add ANSI boilerplate code for otherwise empty file.
  1024. * src/autofit/ft-hb.h: Include `compiler-macros.h` and `freetype.h`.
  1025. Use `FT_BEGIN_HEADER` and `FT_END_HEADER`.
  1026. Decorate with `FT_LOCAL`.
  1027. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `ft-hb.c`.
  1028. 2023-02-08 Werner Lemberg <[email protected]>
  1029. Fix `FT_LOCAL` and `FT_LOCAL_DEF` tags.
  1030. 2023-02-08 Werner Lemberg <[email protected]>
  1031. Fix 'fall-through' warning messages.
  1032. Modern compilers get more insistent on that...
  1033. * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Define.
  1034. * src/*: Use it instead of `/* fall through */` comments.
  1035. 2023-02-08 Werner Lemberg <[email protected]>
  1036. For debugging, avoid implicit conversion from integer to double.
  1037. Otherwise we get zillions of clang 15 warnings.
  1038. * src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c,
  1039. src/base/ftobjs.c, src/base/ftoutln.c, src/cff/cffparse.c,
  1040. src/raster/ftraster.c, src/sfnt/pngshim.c, src/truetype/ttgload.c,
  1041. src/truetype/ttgxvar.c, src/truetype/ttobjs.c, src/type1/t1gload.c: Use
  1042. `double` cast in debugging and tracing macros.
  1043. 2023-02-08 Werner Lemberg <[email protected]>
  1044. Avoid reserved identifiers that are globally defined.
  1045. This is mandated by the C99 standard, and clang 15 produces zillions of
  1046. warnings otherwise.
  1047. * devel/ftoption.h, include/freetype/config/ftoption.h,
  1048. include/freetype/internal/ftmemory.h, src/autofit/afhints.h,
  1049. src/autofit/afmodule.c, src/autofit/aftypes.h, src/base/ftadvanc.c,
  1050. src/base/ftdbgmem.c, src/base/ftstream.c, src/bdf/bdflib.c,
  1051. src/truetype/ttinterp.c: Replace identifiers of the form `_foo` with `foo_`.
  1052. 2023-02-08 Werner Lemberg <[email protected]>
  1053. Fix minor clang and clang++ warnings.
  1054. 2023-02-08 Alexei Podtelezhnikov <[email protected]>
  1055. [truetype, type1] Additional variation tags.
  1056. Sync with
  1057. https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags
  1058. * src/truetype/ttgxvar.h (TTAG_ital): New tag.
  1059. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use it.
  1060. * src/type1/t1load.c (T1_Get_MM_Var): Handle 'slnt' and 'ital'.
  1061. 2023-02-08 Alexei Podtelezhnikov <[email protected]>
  1062. * src/base/ftsynth.c (FT_GlyphSlot_Slant): Add vertical slant.
  1063. * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Update it.
  1064. 2023-02-08 anuj <[email protected]>
  1065. [sdf] Use 32-bit integers internally.
  1066. * src/sdf/ftsdfcommon.h (FT_16D16, FT_26D6): Use 32-bit integers
  1067. instead of `FT_Fixed` for internal data types. `FT_Fixed` i.e.
  1068. `signed long` is 64-bit on some architectures.
  1069. 2023-02-07 Werner Lemberg <[email protected]>
  1070. docs/CHANGES: Updated.
  1071. 2023-02-04 Alexei Podtelezhnikov <[email protected]>
  1072. Comment on optional ascender and descender.
  1073. 2023-02-04 Alexei Podtelezhnikov <[email protected]>
  1074. * src/type1/t1afm.c (T1_Read_Metrics): Reaffirm ascender and descender.
  1075. 2023-02-04 Alexei Podtelezhnikov <[email protected]>
  1076. * src/type1/t1afm.c (T1_Read_Metrics): Validate ascender and descender.
  1077. The ascender and descender are optional in the AFM specifications.
  1078. They could be omitted or even set to zero, e.g., in the current release
  1079. of URW++ base 35 fonts.
  1080. 2023-02-02 Werner Lemberg <[email protected]>
  1081. * src/cff/cffgload.c (cff_slot_load): Avoid memory leak.
  1082. Fixes issue #1204.
  1083. 2023-02-01 Werner Lemberg <[email protected]>
  1084. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Check `face->blend`.
  1085. Reported as
  1086. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55581
  1087. 2023-02-01 Werner Lemberg <[email protected]>
  1088. * docs/CHANGES: Add news for 'freetype-demos'.
  1089. 2023-01-30 Werner Lemberg <[email protected]>
  1090. * subprojects/harfbuzz.wrap, subprojects/libpng.wrap: Updated.
  1091. 2023-01-28 Werner Lemberg <[email protected]>
  1092. Minor changes.
  1093. Comment fixes, typos, removing of unnecessary parentheses.
  1094. 2023-01-28 Werner Lemberg <[email protected]>
  1095. Whitespace.
  1096. 2023-01-27 Behdad Esfahbod <[email protected]>
  1097. [ttgxvar] Fix crash in COLRv1.
  1098. This is a stopgap until issue #1202 is properly fixed.
  1099. * src/truetype/ttxgvar.c (tt_var_get_item_delta): Check `normalizedcoords`.
  1100. 2023-01-19 Werner Lemberg <[email protected]>
  1101. The 'COLR' v1 API will no longer be experimental in the next release.
  1102. 2023-01-18 Alexei Podtelezhnikov <[email protected]>
  1103. * docs/oldlogs/ChangeLog.210: Typos.
  1104. 2023-01-18 Ben Wagner <[email protected]>
  1105. [base] Fix typo.
  1106. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Request module 't1cid',
  1107. not 'cid'.
  1108. 2023-01-18 Ben Wagner <[email protected]>
  1109. [base] Return error if requested driver is not found.
  1110. In `open_face_from_buffer` it is possible that a driver is requested but
  1111. FreeType was built without the requested module. Return an error in this
  1112. case to indicate that the request could not be satisfied, rather than trying
  1113. all existing driver modules.
  1114. * src/base/ftobjs.c (open_face_from_buffer): Return `FT_Err_Missing_Module`
  1115. if a driver is specified but not found.
  1116. 2023-01-18 Dominik Röttsches <[email protected]>
  1117. [sfnt] Avoid nullptr dereference in reading malformed 'COLR' v1 table.
  1118. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1408044.
  1119. * src/sfnt/ttcolr.c (tt_face_load_colr): When the 'COLR' v1 table header is
  1120. too small, don't deallocate delta set index map structures.
  1121. 2023-01-17 Werner Lemberg <[email protected]>
  1122. * src/tools/update-copyright: Allow execution from other repositories.
  1123. We use this for `freetype-demos`.
  1124. 2023-01-17 Werner Lemberg <[email protected]>
  1125. Update all copyright notices.
  1126. 2023-01-17 Werner Lemberg <[email protected]>
  1127. * src/tools/no-copyright: Updated.
  1128. 2023-01-17 Ben Wagner <[email protected]>
  1129. [base] 'close' callback may not use `stream->memory`.
  1130. The documentation for `FT_StreamRec::memory` states that it 'shouldn't be
  1131. touched by stream implementations'. This is true even for internal
  1132. implementations of the 'close' callback, since it is not guaranteed that
  1133. `memory` will even be set when the 'close' callback occurs.
  1134. * src/base/ftobjs.c (new_memory_stream): stash current `memory` in
  1135. `stream->descriptor`.
  1136. (memory_stream_close): Use it.
  1137. 2023-01-17 Ben Wagner <[email protected]>
  1138. [base] Always close user-provided stream.
  1139. The `FT_Open_Face` documentation states
  1140. > If `FT_OPEN_STREAM` is set in `args->flags`, the stream in `args->stream`
  1141. > is automatically closed before this function returns any error (including
  1142. > `FT_Err_Invalid_Argument`).
  1143. However, if the user provides a stream in `args.stream` with
  1144. `FT_OPEN_STREAM` set and a `close` function, but then for some reason passes
  1145. NULL for `aface` and a non-negative `face_index`, the error
  1146. `Invalid_Argument` is returned but the `close` callback will not be called
  1147. on the user-provided stream. This may cause resource leaks if the caller is
  1148. depending on the `close` callback to free resources.
  1149. The difficulty is that a user may fill out a `FT_StreamRec` and pass its
  1150. address as `args.stream`, but the stream isn't really 'live' until
  1151. `FT_Stream_New` is called on it (and `memory` is set). In particular, it
  1152. cannot really be cleaned up properly in `ft_open_face_internal` until the
  1153. stream pointer has been copied into the `stream` local variable.
  1154. * src/base/ftobj.c (ft_open_face_internal): Ensure that user-provided
  1155. `args.stream.close` is called even with early errors.
  1156. 2023-01-17 Ben Wagner <[email protected]>
  1157. [base] Fix leak of internal stream marked external.
  1158. `open_face_from_buffer` allocates a new `FT_Stream` to pass to
  1159. `ft_open_face_internal`. Because this is an `FT_OPEN_STREAM`,
  1160. `ft_open_face_internal` will mark this as an 'external stream', which the
  1161. caller must free. However, `open_face_from_buffer` cannot directly free it
  1162. because the stream must last as long as the face. There is currently an
  1163. attempt at this by clearing the 'external stream' bit after
  1164. `open_face_from_buffer` returns successfully. However, this is too late as
  1165. the original stream may have already been closed and the stream on the face
  1166. may not be the same stream as originally passed.
  1167. It is tempting to use `FT_OPEN_MEMORY` and let `ft_open_face_internal`
  1168. create the stream internally. However, with this method there is no means
  1169. to pass through a 'close' function to the created stream to free the
  1170. underlying data, which must be owned by the stream.
  1171. A possibility is to check on success if the stream of the face is the same
  1172. as the original stream. If it is then unset the external flag. If not,
  1173. then free the original stream. Unfortunately, while no current
  1174. implementation does so, it is possible that the face still has the original
  1175. stream somewhere other than as the `FT_FaceRec::stream`. The stream needs
  1176. to remain available for the life of the face or until it is closed,
  1177. whichever comes earlier.
  1178. The approach taken here is to let the stream own itself. When the stream is
  1179. closed it will free itself.
  1180. * src/base/ftobjs.c (memory_stream_close): Free `stream`.
  1181. (open_face_from_buffer): Simplify error handling, since
  1182. `ft_open_face_internal` always closes `args.stream` on any error.
  1183. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54930
  1184. 2023-01-16 Werner Lemberg <[email protected]>
  1185. sr/*.c: Various minor fixes.
  1186. * src/autofit/ft-hb.c (_hb_ft_reference_table): Call `FT_UNUSED` after
  1187. variable declarations.
  1188. * src/gxvalid/gxvjust.c (gxv_just_widthDeltaClusters_validate): Eliminate
  1189. unused variable.
  1190. * src/gzip/ftgzip.c: Don't call GCC '-Wstrict-prototypes' pragma for C++
  1191. compiler.
  1192. * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): Remove final semicolon to avoid
  1193. compiler warning.
  1194. * src/sfnt/ttsvg.c (tt_face_load_svg_doc): Fix signedness warning.
  1195. 2023-01-16 Dominik Röttsches <[email protected]>
  1196. [sfnt] Remove temporary runtime flag for variable 'COLR' v1.
  1197. Fixes #1187.
  1198. * src/sfnt/ttcolr.c (top level, read_paint, tt_face_load_colr,
  1199. tt_face_free_colr, get_deltas_for_var_index_base,
  1200. tt_face_get_color_glyph_clipbox, tt_face_get_colorline_stops): Remove macro
  1201. definition `VARIABLE_COLRV1_ENABLED` and its usage.
  1202. * src/truetype/ttdriver.c (tt_property_set): Remove parsing of
  1203. 'TEMPORARY-enable-variable-colrv1' property name.
  1204. * src/truetype/ttobjs.h (TT_DriverRec): Remove `enable_variable_colrv1`
  1205. flag.
  1206. 2023-01-07 Werner Lemberg <[email protected]>
  1207. * src/autofit/ft-hb.c (_hb_ft_reference_table): Minor integration fixes.
  1208. 2023-01-07 Ben Wagner <[email protected]>
  1209. [truetype] Reset cvt and storage in context load.
  1210. Currently the cvt and storage are saved and restored in `TT_RunIns`.
  1211. However, this is too granular as the cvt and storage area should be set to
  1212. the original cvt and storage area only when setting up the hinting context.
  1213. This allows for the cvt and storage area to be modified while parsing
  1214. multiple glyphs, as is the case with composite glyphs.
  1215. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove `origCvt` and
  1216. `origStorage`.
  1217. * src/truetype/ttinterp.c (TT_RunIns): Don't save and restore the cvt and
  1218. storage area.
  1219. (Modify_CVT_Check, Ins_WS): Switch from "if in glyph and using original data
  1220. do copy on write" to "if in glyph and not using glyph specific data do copy
  1221. on write".
  1222. 2023-01-06 Matthias Clasen <[email protected]>
  1223. [autofit] Don't depend on 'hb-ft'.
  1224. The circular dependency is still there, but at least we no longer depend on
  1225. the HarfBuzz API that is only present if HarfBuzz has been built with
  1226. FreeType support, making the bootstrapping a bit easier.
  1227. * src/autofit/ft-hb.c, src/autofit/ft-hb.h: New files, providing
  1228. `_hb_ft_font_create`, which is more or less a verbatim copy of the
  1229. corresponding HarfBuzz code from file `hb-ft.cc`.
  1230. * src/autofit/afglobal.c (af_face_globals_new): Use it.
  1231. * src/autofit/afshaper.h: Don't include `hb-ft.h` but `ft-hb.h`.
  1232. * src/autofit/autofit.c: Include `ft-hb.c`.
  1233. * LICENSE.TXT: Updated.
  1234. 2023-01-06 Ben Wagner <[email protected]>
  1235. [truetype] Keep variation store consistent.
  1236. `tt_var_load_item_variation_store` fills out a `GX_ItemVarStore`. While it
  1237. may return an error, the item store must be left in a consistent state so
  1238. that any use or destruction of the item store can properly use or free the
  1239. data in it. Before this change the counts from the font data were read
  1240. directly into the item store before the actual allocation of the arrays to
  1241. which they referred. There exist many opportunities between the time the
  1242. counts are read and the arrays are allocated to return early due to invalid
  1243. data. When this happened the item store claimed to have entires it actually
  1244. did not, leading to crashes later when it was used.
  1245. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54449
  1246. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Read the counts
  1247. into local variables and store them in the item store only after the related
  1248. arrays are actually created on the item store.
  1249. 2023-01-05 Ben Wagner <[email protected]>
  1250. [base] Report used stream's external status.
  1251. In `open_face` the initial stream is set on the face, along with the
  1252. information about if FreeType is the owner of the stream object itself. The
  1253. loaders may in the course of their work replace this stream with a new
  1254. stream (as is the case for 'woff' and 'woff2'), which may have a different
  1255. ownership than the initial stream object (likely the original stream object
  1256. is owned by the user and is external, while the new stream object is created
  1257. internally to FreeType and is internal). When the stream is replaced, the
  1258. face's flags are updated with the new ownership status.
  1259. However, `open_face` cannot itself free this stream as its caller
  1260. `ft_open_face_internal` is responsible for this. In addition, in the case
  1261. of an error `open_face` cannot return an actual face with the new stream and
  1262. its ownership status to the caller. As a result, it must pass this
  1263. information back to the caller as a sort of "failed face" so that the caller
  1264. can clean up.
  1265. `open_face` was already passing back the new stream but was not passing back
  1266. the stream ownership information. As a result the stream may not have been
  1267. free'd when needed.
  1268. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54700
  1269. * src/base/ftobjs.c (open_face): Pass back the ownership information as
  1270. well.
  1271. (ft_open_face_internal): Updated.
  1272. 2023-01-05 Noah Cabral <[email protected]>
  1273. fix spelling err in LICENSE.txt
  1274. 2023-01-05 Dominik Röttsches <[email protected]>
  1275. [sfnt] Fix color stop bounds check calculation at table end.
  1276. Fixes https://bugs.chromium.org/p/skia/issues/detail?id=14021
  1277. * src/sfnt/ttcolr.c (VAR_IDX_BASE_SIZE): New macro.
  1278. (tt_face_get_colorline_stops): Fix off-by-one bounds check calculation, take
  1279. `VarColorStop` into account, and hopefully make it easier to read.
  1280. 2023-01-05 Alexei Podtelezhnikov <[email protected]>
  1281. * src/base/ftobjs.c (FT_Request_Metrics): Avoid division by zero.
  1282. The division-by-zero might happen in broken fonts (see #1194).
  1283. Instead of returning a huge number from FT_DivFix and failing
  1284. to scale later, we now bail immediately.
  1285. 2022-12-20 Alexei Podtelezhnikov <[email protected]>
  1286. [psaux] Delay the upem validity assertion.
  1287. Fixes #1194.
  1288. * src/psaux/psft.c (cf2_getUnitsPerEm): Remove the upem assert.
  1289. (cf2_checkTransform): Assert the upem validity after checking the scale.
  1290. 2022-12-14 David Vanderson <[email protected]>
  1291. Werner Lemberg <[email protected]>
  1292. [gzip] Make static compilation not leak global symbols.
  1293. * src/gzip/ftgzip.c (HAVE_HIDDEN): Do not define; it is no longer needed
  1294. because everything is static.
  1295. (HAVE_MEMCPY): Define.
  1296. (zcalloc, zcfree): Remove no longer needed definitions (because `Z_SOLO` is
  1297. active).
  1298. * src/gzip/patches/freetype-zlib.diff: Regenerated.
  1299. Fixes #1146.
  1300. 2022-12-14 Werner Lemberg <[email protected]>
  1301. * src/gzip/ftzconf.h: Updated to zlib 1.2.13.
  1302. I forgot to copy that file.
  1303. 2022-12-14 Werner Lemberg <[email protected]>
  1304. * builds/unix/configure.raw: Don't check for `memcpy` and `memmove`.
  1305. We expect a C99 compiler, and both functions are part of this standard.
  1306. 2022-12-13 Werner Lemberg <[email protected]>
  1307. [sdf, sfnt] Handle minor compiler warnings.
  1308. * src/sdf/ftsdf.c (get_min_distance_conic): Initialize `nearest_point`.
  1309. * src/sfnt/ttsvg.c (find_doc): Initialize `mid_doc`.
  1310. Fixes #1195.
  1311. 2022-12-07 Werner Lemberg <[email protected]>
  1312. * subprojects/zlib.wrap: Micro-update from upstream.
  1313. 2022-12-06 Jiří Malák <[email protected]>
  1314. * include/freetype/internal/ftcalc.h (FT_MSB): Support Open Watcom 2.0.
  1315. Closes !232.
  1316. 2022-11-23 Luca Bacci <[email protected]>
  1317. * src/base/ftdbgmem.c (ft_mem_source_compare): Add FT_COMPARE_DEF.
  1318. Closes !230.
  1319. 2022-11-21 Alexei Podtelezhnikov <[email protected]>
  1320. * src/autofit/afloader.c (af_loader_load_glyph): Remove `size` check.
  1321. This is done by `FT_Load_Glyph`.
  1322. 2022-11-18 Alexei Podtelezhnikov <[email protected]>
  1323. Comments added.
  1324. 2022-11-16 Johan Matsson <mjunix@ at github>
  1325. * src/autofit/afloader.c (af_loader_load_glyph): Fix dereference.
  1326. This must happen after the NULL check.
  1327. Taken from
  1328. https://github.com/freetype/freetype/pull/2
  1329. 2022-11-15 Alexei Podtelezhnikov <[email protected]>
  1330. * src/pcf/pcfutil.c ({Two,Four}ByteSwap): Use builtins or shifts.
  1331. We trust glibc which uses shifts or builtins to swap bytes. This
  1332. must be more efficient.
  1333. 2022-11-14 Werner Lemberg <[email protected]>
  1334. * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Integer overflow.
  1335. Reported as
  1336. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462
  1337. 2022-11-14 Loïc Yhuel <[email protected]>
  1338. [meson] Use generated ftmodule.h
  1339. ftmodule.h is generated at the root of the build directory, but FT_CONFIG_MODULES_H
  1340. (freetype/config/ftmodule.h) is used instead.
  1341. This makes the build fail when disabling modules in modules.cfg.
  1342. * meson.build (harfbuzz_dep): Add '-DFT_CONFIG_MODULES_H=<ftmodule.h>'.
  1343. 2022-11-14 Loïc Yhuel <[email protected]>
  1344. [meson] Fix generated ftmodule.h
  1345. The sdf module wasn't recognized, so the generated ftmodule.h had "None_renderer_class".
  1346. * builds/meson/parse_modules_cfg.py: Handle sdf in RASTER_MODULES.
  1347. 2022-11-12 Dominik Röttsches <[email protected]>
  1348. Add `TT_CONFIG_OPTION_NO_BORING_EXPANSION` configuration macro.
  1349. This gives users a possibility to deactivate new features not (yet) in the
  1350. OpenType standard.
  1351. * include/freetype/config/ftoption.h, devel/ftoption.h
  1352. (TT_CONFIG_OPTION_NO_BORING_EXPANSION): New macro.
  1353. * src/truetype/ttgxvar.c (ft_var_load_avar): Use it to disable 'avar'
  1354. version 2.0 support.
  1355. 2022-11-12 Behdad Esfahbod <[email protected]>
  1356. [truetype] Improve bounds checks for `ItemVariationStore`.
  1357. * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Move bounds check ...
  1358. (tt_var_get_item_delta): ... to this function, because it is safer. For
  1359. example, the 'avar' table 2.0 codepath was not performing a bounds check at
  1360. all.
  1361. 2022-11-12 Behdad Esfahbod <[email protected]>
  1362. [truetype] In `ItemVariationStore`, value 0xFFFF for `dataCount` is valid.
  1363. It corresponds to outer indices of 0 to 0xFFFE.
  1364. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Remove invalid
  1365. code.
  1366. 2022-11-11 Alexei Podtelezhnikov <[email protected]>
  1367. [pcf] Improve CMap efficiency and readability.
  1368. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Check and walk
  1369. the encoding array indexes.
  1370. 2022-11-10 Sam James <[email protected]>
  1371. Fix `-Wstrict-prototypes`.
  1372. * builds/unix/configure.raw: Fix `-Wstrict-prototypes`.
  1373. Clang 16 warns on these and they will be dropped in C23.
  1374. * builds/unix/freetype2.m4: Ditto.
  1375. 2022-11-09 Ben Wagner <[email protected]>
  1376. [truetype] Check avar_segment before access
  1377. * src/truetype/ttgxvar.c (tt_done_blend): check `avar_segment` before
  1378. accessing to free its `correspondence`.
  1379. Reported as:
  1380. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53062
  1381. 2022-11-09 Ben Wagner <[email protected]>
  1382. [truetype] Restore behavior of ft_var_load_hvvar
  1383. * src/truetype/ttgcvar.c (ft_var_load_hvvar): restore previous behavior
  1384. In a previous change [0] the behavior of `ft_var_load_hvvar` was changed
  1385. to not load the item variation store if it was at offset 0, but not
  1386. return an error when this happened. This broke any users, like
  1387. `tt_hvadvance_adjust`, that rely on successful completion of
  1388. `ft_var_load_hvvar` to imply that returned table's `itemStore` had been
  1389. initialized. This lead such users to dereference NULL.
  1390. This change appears to have been unintentional and unrelated to the
  1391. actual avar2 changes. As a result, fix these NULL dereferences by
  1392. restoring the code to always attempt to initialize the `itemStore`.
  1393. [0] ae4eb996 "[truetype] Add support for `avar` table 2.0 format."
  1394. Reported as
  1395. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53061
  1396. 2022-11-08 Werner Lemberg <[email protected]>
  1397. docs/CHANGES: Updated.
  1398. 2022-11-08 suzuki toshiya <[email protected]>
  1399. [build] use AC_CHECK_PROG() macro for libpng-config detection
  1400. * builds/unix/configure.raw: use AC_CHECK_PROG() instead of `which` to find `libpng-config`.
  1401. 2022-11-08 suzuki toshiya <[email protected]>
  1402. [build] fix for make multi
  1403. Fix "make multi" by MR !223
  1404. * include/freetype/internal/services/svmm.h: include ftmm.h to define FT_Get_MM_Func.
  1405. * src/truetype/ttgxvar.h: include ftmmtypes.h to use GX_AVarTable properly.
  1406. * src/base/ftmac.c: include ftdebug.h to use FT_THROW() properly.
  1407. 2022-11-08 Alexei Podtelezhnikov <[email protected]>
  1408. * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Accelerate the search.
  1409. This is mostly for consistency because PFR fonts with bitmap strikes
  1410. do not seem to exist.
  1411. 2022-11-06 Alexei Podtelezhnikov <[email protected]>
  1412. [bdf, pfr, psnames] Accelarate charmap searches.
  1413. The binary searches within charmaps can be accelerated because they
  1414. often contain dense continuous blocks of character codes. Within such
  1415. blocks, you can predict matches based on misses. This method has been
  1416. deployed in `bdf` since 0f122fef34; we only refactor it there. We now
  1417. use it in `pfr` and `psnames`, which speeds up the unicode charmap
  1418. access by about 50% in PFR and Type 1 fonts.
  1419. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Refactor.
  1420. * src/pfr/pfrcmap.c (pfr_cmap_char_{index,next}): Predict `mid` based
  1421. on the mismatch distance.
  1422. * src/psnames/psmodule.c (ps_unicodes_char_{index,next}): Ditto.
  1423. 2022-11-04 Behdad Esfahbod <[email protected]>
  1424. [truetype] Add support for `avar` table 2.0 format.
  1425. See
  1426. https://github.com/harfbuzz/boring-expansion-spec/blob/main/avar2.md
  1427. for the specification.
  1428. Currently, this is implemented only in most recent OS versions on Apple
  1429. platforms and in the HarfBuzz library, but it is expected to be added to the
  1430. OpenType standard soon.
  1431. * src/truetype/ttgxvar.h (GX_AVarTableRec): New structure.
  1432. (GX_BlendRec): Use it to replace `avar_segment` with `avar_table`.
  1433. * src/truetype/ttgxvar.c (ft_var_load_avar): Load new table version.
  1434. (ft_var_to_normalized, tt_done_blend): Extend for new format.
  1435. (ft_var_load_hvvar, ft_var_to_design): Updated.
  1436. 2022-10-24 Werner Lemberg <[email protected]>
  1437. Replace '1/64th' (and similar entries) with '1/64' in docs and comments.
  1438. 2022-10-24 Ivan Panchenko <[email protected]>
  1439. * include/freetype/*: Fix documentation typos.
  1440. 2022-10-21 Alexei Podtelezhnikov <[email protected]>
  1441. * src/truetype/ttgload.c: Cosmetic changes.
  1442. 2022-10-21 Alexei Podtelezhnikov <[email protected]>
  1443. [cff, truetype] Simplify SVG metrics scaling.
  1444. Use pre-calculated scaling factors. Also, the advance widths used
  1445. to be rounded, which was incorrect.
  1446. * src/cff/cffgload.c (cff_slot_load): Use `x_scale` and `y_scale`.
  1447. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
  1448. 2022-10-20 Werner Lemberg <[email protected]>
  1449. * subprojects/zlib.wrap: Update to zlib version 1.2.13.
  1450. 2022-10-18 Dominik Röttsches <[email protected]>
  1451. [sfnt] Additional bounds checks for `COLR` v1 table handling.
  1452. * src/sfnt/ttcolr.c (read_paint): Add `colr` argument, necessary for...
  1453. ... another use of `ENSURE_READ_BYTES`.
  1454. Update callers.
  1455. (tt_face_get_paint_layers): Ensure that the 4-byte paint table
  1456. offset can be read.
  1457. This is a follow-up to !124 and issue
  1458. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404
  1459. 2022-10-18 Werner Lemberg <[email protected]>
  1460. [gzip] Update sources to zlib 1.2.13.
  1461. 2022-10-18 Alexei Podtelezhnikov <[email protected]>
  1462. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Simplify calculations.
  1463. 2022-10-18 Werner Lemberg <[email protected]>
  1464. Minor formatting.
  1465. 2022-10-18 Dominik Röttsches <[email protected]>
  1466. [sfnt] Guard individual `COLR` v1 paint field reads.
  1467. * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): New macro.
  1468. (read_paint): Use it – after the start pointer `p` has been checked for
  1469. whether it allows reading the format byte, each successive paint table field
  1470. read need to be bounds-checked before reading further values.
  1471. Reported as
  1472. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404
  1473. 2022-10-17 Xiang Xiao <[email protected]>
  1474. * builds/toplevel.mk: Prefix all paths with `$(TOP_DIR)/`.
  1475. This is useful for builds that are not started from the root directory.
  1476. 2022-10-17 Liu Kunpeng(柳鲲鹏) <[email protected]>
  1477. * src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant.
  1478. * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it.
  1479. 2022-10-15 Alexei Podtelezhnikov <[email protected]>
  1480. Note the lack of floating-point data types.
  1481. 2022-10-10 Werner Lemberg <[email protected]>
  1482. [cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`.
  1483. This ancient option stayed completely undocumented. Given that the 'cff'
  1484. driver requires the 'psnames' module, it makes no sense today to have this
  1485. macro.
  1486. * src/cff/cffdrivr.c (cff_services), src/cff/cffobjs.c (cff_face_init):
  1487. Remove corresponding conditional code.
  1488. 2022-10-10 Werner Lemberg <[email protected]>
  1489. Synchronize `ftoption.h` flavours.
  1490. 2022-10-10 Werner Lemberg <[email protected]>
  1491. Minor comment changes.
  1492. 2022-10-05 Alexei Podtelezhnikov <[email protected]>
  1493. Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name.
  1494. 2022-10-04 Alexei Podtelezhnikov <[email protected]>
  1495. [autofit] Reset the face charmap directly.
  1496. There is no need to validate the original charmap in `FT_Set_Charmap`.
  1497. It can be reset directly.
  1498. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
  1499. Use direct assignment.
  1500. * src/autofit/af{latin,cjk,indic}.c (af_latin_metrics_init): Ditto.
  1501. 2022-10-04 Alexei Podtelezhnikov <[email protected]>
  1502. * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
  1503. As with the previous commit, we can avoid the validation checks
  1504. of `FT_Set_Charmap` and set it directly when choosing from the
  1505. available list.
  1506. 2022-10-03 Alexei Podtelezhnikov <[email protected]>
  1507. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Avoid `FT_Set_Charmap`.
  1508. Set charmap aggressively without all validations of `FT_Set_Charmap`
  1509. because we take it from the available array and only temporarily.
  1510. Even CMap Format 14 will gracefully return 0.
  1511. 2022-10-03 Alexei Podtelezhnikov <[email protected]>
  1512. * src/cache/ftcbasic.c (ftc_basic_family_get_count): Remove redundancy.
  1513. 2022-09-30 Werner Lemberg <[email protected]>
  1514. * src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.
  1515. Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid
  1516. overflow.
  1517. Fixes #1180.
  1518. 2022-09-30 Werner Lemberg <[email protected]>
  1519. * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.
  1520. 2022-09-29 mlugg <[email protected]>
  1521. [truetype] Fix undefined pointer arithmetic.
  1522. * src/truetype/ttgxvar.c (tt_var_get_item_delta, ft_var_load_mvar): Use
  1523. `FT_OFFSET`.
  1524. 2022-09-29 Alexei Podtelezhnikov <[email protected]>
  1525. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Use lighter FT_DivFix.
  1526. 2022-09-29 Ali Chraghi <[email protected]>
  1527. [base] FT_Attach_Stream: Make `parameters` argument constant.
  1528. 2022-09-29 Azamat Hackimov <[email protected]>
  1529. * src/tools/*.py: Migrate to Python 3.
  1530. Fixes #1185, closes !205. Formatting changes according to PEP8.
  1531. 2022-09-27 Dominik Röttsches <[email protected]>
  1532. [sfnt] Guard access in 'COLR' table when requesting child table pointer.
  1533. * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Tighten
  1534. pointer bounds checks.
  1535. (get_child_table_pointer): Check whether incoming pointer `p` lies within
  1536. the 'COLR' table.
  1537. Reported as
  1538. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51816
  1539. 2022-09-27 Ben Wagner <[email protected]>
  1540. [sfnt] Add SVG document bounds checking.
  1541. Add a check that the document content is actually contained within the
  1542. `SVG ` table. Without this check a malformed font may claim arbitrary
  1543. memory as its document content.
  1544. * src/sfnt/ttsvg.c (tt_face_load_svg): Take `numEntries` into account when
  1545. testing 'documentRecord' extents.
  1546. (find_doc): Rename `stream` to `document_records` for clarity.
  1547. (tt_face_load_svg_doc): Split `doc` from `doc_list` pointer for clarity.
  1548. Test that the document content is contained within the table.
  1549. Ensure minimum length of document before testing for gzip format.
  1550. Reported as
  1551. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51812
  1552. 2022-09-23 Alexei Podtelezhnikov <[email protected]>
  1553. [base] Clean up the bitmap flow control.
  1554. * src/base/ftbitmap.c (FT_Bitmap_Copy): Flip the copy if its pitch
  1555. is trully opposite, zero is not a positive value.
  1556. (FT_Bitmap_Convert): Set negative pitch as needed, accept negative
  1557. alignment values.
  1558. 2022-09-22 Alexei Podtelezhnikov <[email protected]>
  1559. [base] Discard and recreate bitmaps for copying and converting.
  1560. Reusing target bitmaps for copying and converting is permitted. It is,
  1561. however, pointless to preserve their content before overwriting. Free-
  1562. malloc might be faster than realloc.
  1563. * src/base/ftbitmap.c (FT_Bitmap_Copy, FT_Bitmap_Convert): Free
  1564. an old buffer and create a new one.
  1565. 2022-09-16 Dominik Röttsches <[email protected]>
  1566. Reject 'COLR' table if version is 1 but header too small.
  1567. * src/sfnt/ttcolr.c (tt_face_load_colr): If the version is determined to
  1568. be 1, then the table size has to be at least the size of the v1 header.
  1569. Also, for peeking the number of base glyphs and entries in the layer list,
  1570. ensure that the table is sufficiently long.
  1571. Fixes #1179. Original patch by Sergey Temnikov.
  1572. 2022-09-15 Werner Lemberg <[email protected]>
  1573. * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix format 1 handling.
  1574. Fixes #1181.
  1575. 2022-09-06 Dominik Röttsches <[email protected]>
  1576. [truetype] Reject 'fvar' loading when `num_instances` is too small.
  1577. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Reject retrieving master when
  1578. 'fvar' values locally do not match with sanitized values from initialization
  1579. at `sfnt_init_face` time.
  1580. Reported as
  1581. https://bugs.chromium.org/p/chromium/issues/detail?id=1360295
  1582. 2022-09-05 Dominik Röttsches <[email protected]>
  1583. [sfnt] Handle variable `COLR` v1 fonts without delta set index map
  1584. Fixes #1178.
  1585. * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Set outer index to
  1586. 0 and inner index to the delta index when retrieving deltas if the
  1587. `COLR` table has no delta set index map.
  1588. 2022-09-05 Dominik Röttsches <[email protected]>
  1589. [sfnt] Pointer sanity checks before reading layer info in 'COLR' v0
  1590. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Check that the pointer to
  1591. read from is within the 'COLR' table.
  1592. Reported as
  1593. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50633
  1594. 2022-09-05 Werner Lemberg <[email protected]>
  1595. [autofit] Minor fix.
  1596. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Avoid
  1597. compiler warning.
  1598. 2022-09-05 Dominik Röttsches <[email protected]>
  1599. [sfnt] Don't require 'gvar' table to support variation fonts.
  1600. Fixes #1172.
  1601. * src/sfnt/sfobjs.c (sfnt_load_face): Tag font as Multiple Masters font if
  1602. `fvar` is present; do not require other tables to be present.
  1603. * src/truetype/ttgxvar.c (tt_set_mm_blend): Allow for a missing 'gvar' table
  1604. when setting variation coordinates. However, if a 'gvar' table is actually
  1605. present, do perform a sanity check and fail on malformedness.
  1606. (TT_Get_MM_Var): Don't assume 'fvar' needs 'gvar' or 'CFF2 tables in all
  1607. cases, which is an overly tight check.
  1608. 2022-08-27 Alexei Podtelezhnikov <[email protected]>
  1609. * src/base/ftver.rc: Explicitly use UTF-16.
  1610. Fixes #1177 to avoid mistranslation and other problems.
  1611. 2022-08-26 Dominik Röttsches <[email protected]>
  1612. [sfnt] Avoid undefined shifts in `COLR` v1 color line retrieval
  1613. * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): Disambiguate shift
  1614. behavior by using multiplication using macros from ftcalc.h.
  1615. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50573
  1616. 2022-08-21 Sean Farrell <[email protected]>
  1617. CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option.
  1618. This option uncomments FreeType configuration macro
  1619. `FT_CONFIG_OPTION_ERROR_STRINGS` to make function `FT_Error_String` return
  1620. meaningful error strings.
  1621. This option is off by default.
  1622. 2022-08-21 Chris Liddell <[email protected]>
  1623. [base, type1] Better handling of out-of-memory situations.
  1624. This follows similar code in `cff_slot_done`.
  1625. * src/base/ftobjs.c (ft_glyphslot_done), src/type1/t1objs.c
  1626. (T1_GlyphSlot_Done): Check `internal` pointer.
  1627. The Type1 problems was reported as
  1628. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50057.
  1629. 2022-08-06 Tim-Philipp Müller <[email protected]>
  1630. ci: bump windows image and use newer runner and vs2019
  1631. The old 1809 runner will be decommissioned at some point.
  1632. 2022-08-04 @udoudou <>
  1633. * src/cache/ftcmanag.c (FTC_Manager_New): Initialize `cur_weight`.
  1634. See !192.
  1635. 2022-08-02 Alexei Podtelezhnikov <[email protected]>
  1636. * src/sfnt/ttload.c: Trace formatting updates.
  1637. 2022-08-02 Alexei Podtelezhnikov <[email protected]>
  1638. * src/psaux/psobjs.c (ps_table_release): Remove redundant casting.
  1639. 2022-08-02 Alexei Podtelezhnikov <[email protected]>
  1640. * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Reduce casting.
  1641. 2022-08-02 Alexei Podtelezhnikov <[email protected]>
  1642. [cache] Remove some casts, clean up tracing.
  1643. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup):
  1644. Clean up tracing types.
  1645. * src/cache/ftccache.c (ftc_node_destroy): Ditto.
  1646. * src/cache/ftcmanag.c (FTC_Manager_Check): Ditto.
  1647. (FTC_Manager_Check, FTC_Node_Unref): Remove a cast.
  1648. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
  1649. 2022-08-01 Alexei Podtelezhnikov <[email protected]>
  1650. [autofit] Updated to reduce casting (cont'd).
  1651. * src/autofit/afmodule.h (AF_ModuleRec): Change `default_script` type.
  1652. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
  1653. Remove casting.
  1654. * src/autofit/afmodule.c (af_property_{set,get}): Updated accordingly.
  1655. 2022-08-01 Alexei Podtelezhnikov <[email protected]>
  1656. [autofit] Updated to reduce casting.
  1657. * src/autofit/afglobal.h (AF_FaceGlobalsRec): Change `glyph_count` type.
  1658. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
  1659. af_face_globals_get_metrics, af_face_globals_is_digit,
  1660. af_face_globals_new): Changed local types and updated accordingly.
  1661. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Ditto.
  1662. 2022-08-01 Alexei Podtelezhnikov <[email protected]>
  1663. [psaux] Remove unused structure field.
  1664. * include/freetype/internal/psaux.h (PS_TableRec): Remove `num_elems`.
  1665. * src/psaux/psobjs.c (ps_table_new): Remoove its initialization.
  1666. 2022-07-30 Dominik Röttsches <[email protected]>
  1667. [sfnt] Implement VarClipBox.
  1668. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Depending on the
  1669. format, read `var_index_base`, then retrieve and apply scaled deltas.
  1670. 2022-07-30 Dominik Röttsches <[email protected]>
  1671. [sfnt] Fix typo in clip box computation.
  1672. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Use appropriate
  1673. scale factor for `yMin` and `yMax`.
  1674. 2022-07-30 Alexei Podtelezhnikov <[email protected]>
  1675. [autofit] Use unsigned accounting for hints.
  1676. * src/autofit/afhints.h (AF_AxisHintsRec): Use unsigned types.
  1677. * src/autofit/afhints.c (af_axis_hints_new_{segment,edge},
  1678. af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset):
  1679. Updated accordingly.
  1680. * src/autofit/aflatin.c (af_cjk_hints_compute_edges): Ditto.
  1681. * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Ditto.
  1682. 2022-07-30 Alexei Podtelezhnikov <[email protected]>
  1683. * src/autofit/afhints.h: Remove dead code.
  1684. 2022-07-29 Werner Lemberg <[email protected]>
  1685. * src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error.
  1686. 2022-07-29 Werner Lemberg <[email protected]>
  1687. Fix compilation if `TT_CONFIG_OPTION_GX_VAR_SUPPORT` is not set.
  1688. * src/sfnt/ttcolr.c: Protect relevant code with
  1689. `TT_CONFIG_OPTION_GX_VAR_SUPPORT`.
  1690. 2022-07-29 Werner Lemberg <[email protected]>
  1691. Fix clang14 compiler warnings.
  1692. * include/freetype/internal/ftstream.h (FT_GET_SHORT_LE, FT_GET_USHORT_LE):
  1693. Fix type.
  1694. * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Always return boolean
  1695. value.
  1696. (tt_face_get_colorline_stops): Fix type of `var_index_base`.
  1697. 2022-07-26 Alexei Podtelezhnikov <[email protected]>
  1698. [pfr] Fortify the kerning code.
  1699. Any array index must be strictly less then the array size. Therefore,
  1700. we must reject indexes that are equal to the array size. Alternatively,
  1701. we should move the bounds check before the index decrement but that
  1702. would be confusing.
  1703. In addition, it is ok to decrement zero (.notdef) and get UINT_MAX,
  1704. which is then automatically rejected in the bounds check.
  1705. * src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix the bounds checking.
  1706. 2022-07-26 Werner Lemberg <[email protected]>
  1707. [pfr] Add some safety guards.
  1708. * src/pfr/pfrload.c (pfr_phy_font_load): Check resolutions and number of
  1709. characters.
  1710. Fixes #1174.
  1711. 2022-07-26 Werner Lemberg <[email protected]>
  1712. * src/pfr/*.c: Trivial improvements and formatting.
  1713. 2022-07-24 Werner Lemberg <[email protected]>
  1714. * configure: s/egrep/grep -E/
  1715. `egrep` is deprecated.
  1716. 2022-07-23 Ben Wagner <[email protected]>
  1717. [base] Build outlines in amortized constant time.
  1718. When resizing the loader's points and contours, resize them to at least 1.5
  1719. times their current size. The code currently only reserves as much space as
  1720. is currently required, leading to O(n^2) runtime when adding points one at a
  1721. time.
  1722. This change does not attempt to ever shrink the loader's point and contour
  1723. storage since this was not attempted previously either. The 1.5 multiple
  1724. was chosen as a trade-off between potentially unused space and the runtime.
  1725. * src/base/ftgloader.c (FT_GlyphLoader_CheckPoints): Implement it.
  1726. Fixes #1173.
  1727. 2022-07-09 Dominik Röttsches <[email protected]>
  1728. [sfnt] Support variable 'COLR' v1 `PaintVarSkew*`.
  1729. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values
  1730. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW`,
  1731. `FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER`, and
  1732. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW_CENTER`.
  1733. (read_paint): Handle new enumeration values.
  1734. 2022-07-09 Dominik Röttsches <[email protected]>
  1735. [sfnt] Support variable 'COLR' v1 `PaintVarRotate*`.
  1736. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values
  1737. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE` and
  1738. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER`.
  1739. (read_paint): Handle new enumeration values.
  1740. 2022-07-09 Dominik Röttsches <[email protected]>
  1741. [sfnt] Support 'COLR' v1 variable `PaintVarScale*`.
  1742. * src/sfnt/ttcolr.c: (FT_PaintFormatInternal): New enumeration values
  1743. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE`,
  1744. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER`,
  1745. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM`, and
  1746. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER`.
  1747. (read_paint): Handle new enumeration values.
  1748. 2022-07-09 Dominik Röttsches <[email protected]>
  1749. [sfnt] Support for 'COLR' v1 variable translate.
  1750. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value
  1751. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE`.
  1752. (read_paint): Handle new enumeration value.
  1753. 2022-07-09 Dominik Röttsches <[email protected]>
  1754. [sfnt] Support for 'COLR' v1 variable transforms.
  1755. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value
  1756. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM`.
  1757. (read_paint): Handle new enumeration value.
  1758. 2022-07-09 Dominik Röttsches <[email protected]>
  1759. [sfnt] Deltas for 'COLR' v1 gradient coordinates.
  1760. * src/sfnt/ttcolr.c (read_paint) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Read and
  1761. apply deltas to radial, linear, and sweep gradient coordinates such as 'p0',
  1762. 'p1', 'p2', 'center', 'radii', and 'angles'.
  1763. 2022-07-08 Dominik Röttsches <[email protected]>
  1764. [sfnt] Support variable 'COLR' v1 color lines.
  1765. * include/freetype/ftcolor.h (FT_ColorStopIterator): Add field
  1766. `read_variable` to indicate whether a variation index base should be read.
  1767. * src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations
  1768. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT`
  1769. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and
  1770. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`.
  1771. (read_color_line): New parameter `read_variable`; update callers.
  1772. (read_paint): Handle new enumerations.
  1773. 2022-07-07 Dominik Röttsches <[email protected]>
  1774. [sfnt] Apply variation deltas to `PaintVarSolid`.
  1775. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal_): New enumeration
  1776. `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`.
  1777. (get_deltas_for_var_index_base) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New
  1778. function to retrieve an array of delta values, which will be used for most
  1779. of 'COLR' v1 variation formats (in follow-up commits).
  1780. (read_paint): Add `face` parameter; update caller.
  1781. Handle `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`.
  1782. 2022-07-07 Dominik Röttsches <[email protected]>
  1783. [sfnt] Check safety of cast to `TT_Driver` before accessing member.
  1784. * src/sfnt/ttcolr.c (VARIABLE_COLRV1_ENABLED): Access
  1785. `enable_variable_colrv1` only if driver class matches.
  1786. 2022-07-06 Stephen Holdaway <[email protected]>
  1787. doc: Clarify description of `FT_Stream_IoFunc`.
  1788. The existing documentation comments on `FT_Stream_IoFunc` hinted at the dual
  1789. seek/read behavior required for custom stream implementations to work, but
  1790. it didn't explicitly explain it. Without looking at the internals of
  1791. FreeType, it was easy for someone to assume their implementation should
  1792. handle both seek and read operations all the time. If this is done, you get
  1793. a variety of errors, but mostly just `Unknown_File_Format` (error code
  1794. 0x02).
  1795. 2022-07-04 Dominik Röttsches <[email protected]>
  1796. [sfnt] Load variation store for 'COLR' v1.
  1797. * src/sfnt/ttcolr.c: Include `ttobjs.h` temporarily.
  1798. (VARIABLE_COLRV1_ENABLED): New temporary macro to detect whether variable
  1799. COLRv1 is enabled.
  1800. (Colr): New fields `var_store` and `delta_set_idx_map`.
  1801. (tt_face_load_colr, tt_face_free_colr) [VARIABLE_COLRV1_ENABLED]: Load and
  1802. free variation store data using the functions from the Multiple Masters
  1803. service.
  1804. 2022-07-03 Chris Liddell <[email protected]>
  1805. [base] Improve error handling in `FT_GlyphLoader_CheckPoints`.
  1806. If `FT_GlyphLoader_CreateExtra` returns an error (and a couple of other
  1807. places), `FT_GlyphLoader_CheckPoints` would propagate the error immediately,
  1808. rather than cleaning up the partially set up `FT_GlyphLoader`. As a
  1809. consequence, a subsequent attempt to create a glyph could result in a crash.
  1810. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Ensure all the error
  1811. conditions exits are consistent, eventually calling `FT_GlyphLoader_Reset`.
  1812. 2022-07-03 Thomas Sondergaard <[email protected]>
  1813. CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets.
  1814. FreeType can be located by consuming projects that use
  1815. `find_package(Freetype)` either via the old `MODULE` path (which uses
  1816. `FindFreetype.cmake` supplied by CMake), or via the new `CONFIG` path (which
  1817. uses `freetype-config.cmake` as supplied by this project). Up to this point
  1818. the CMake module has supplied the target `Freetype::Freetype` and the config
  1819. file provided by this project the target `freetype`. Now we supply both
  1820. `freetype` and `Freetype::Freetype` so that consuming projects can always
  1821. use the target `Freetype::Freetype` regardless of what path was taken by
  1822. `find_package(Freetype)`.
  1823. Fixes #1165.
  1824. 2022-07-02 Werner Lemberg <[email protected]>
  1825. include/freetype/ftmm.h: Improve documentation.
  1826. 2022-07-01 Dominik Röttsches <[email protected]>
  1827. [base] Round values in `FT_MulAdd_Fix`.
  1828. This avoids regressing Blink layout tests and makes `FT_MulAdd_Fix` delta
  1829. retrieval implementation consistent with the previous implementation, which
  1830. used `FT_fixedToInt` and included rounding.
  1831. * src/base/ftcalc.c (FT_MulAdd_Fix): Implement it.
  1832. Also fix remaining `temp` initialization compilation issue.
  1833. Fixes #1169.
  1834. 2022-07-01 Werner Lemberg <[email protected]>
  1835. Minor formatting.
  1836. 2022-06-30 Dominik Röttsches <[email protected]>
  1837. Fix initialisation of temp variable in new FT_MulAddFix
  1838. src/truetype/ttgxvar.c (FT_MulAddFix): Initialise `temp`.
  1839. 2022-06-29 Dominik Röttsches <[email protected]>
  1840. [truetype] Perform variation store delta computation with 64-bit precision.
  1841. * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Make type
  1842. explicitly 32-bit.
  1843. * include/freetype/internal/services/svmm.h
  1844. (FT_Var_Get_Item_Delta_Func): Change return type to `FT_ItemVarDelta`
  1845. * truetype/ttgxvar.h (tt_var_get_item_delta): Change return type to
  1846. `FT_ItemVarDelta`.
  1847. * truetype/ttgxvar.c (tt_var_get_item_delta): Store scalars and deltas
  1848. to intermediate array, perform computation using new method
  1849. `FT_MulAddFix`.
  1850. 2022-06-29 Dominik Röttsches <[email protected]>
  1851. New function `FT_MulAddFix` to compute the sum of fixed-point products.
  1852. This function, based on the code of `FT_MulFix`, uses 64-bit precision
  1853. internally for intermediate computations.
  1854. * include/freetype/internal/ftcalc.h, base/ftcalc.c (FT_MulAddFix):
  1855. Implement it.
  1856. 2022-06-22 Werner Lemberg <[email protected]>
  1857. CMakeLists.txt: Move inclusion of `FindPkgConfig` down.
  1858. It must come after `CMAKE_TOOLCHAIN_FILE`.
  1859. Fixes #1167.
  1860. 2022-06-22 Dominik Röttsches <[email protected]>
  1861. [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14
  1862. 2022-06-21 Alexei Podtelezhnikov <[email protected]>
  1863. * docs/CHANGES: Announce impending Infinality removal.
  1864. 2022-06-21 Alexei Podtelezhnikov <[email protected]>
  1865. * ttgload.c (TT_Process_Composite_Glyph): Fix a signedness warning.
  1866. 2022-06-21 Werner Lemberg <[email protected]>
  1867. s/fixed point/fixed-point/
  1868. 2022-06-21 Werner Lemberg <[email protected]>
  1869. .gitlab-ci.yml: Correctly upgrade `meson`.
  1870. 2022-06-21 Dominik Röttsches <[email protected]>
  1871. Proposal: Feature control for variable COLRv1
  1872. * include/freetype/ftdriver.h (variable-color-v1 property): Add documentation
  1873. for variable-colr-v1 property.
  1874. * src/truetype/ttdriver.c (tt_property_set): Ingest variable-control property
  1875. when called, set to enable_variable_colrv1 driver flag.
  1876. * src/truetype/ttobjs.h (TT_DriverRec): Add enable_variable_colrv1 flag.
  1877. 2022-06-21 Xavier Claessens <[email protected]>
  1878. [meson] Disable FreeType in HarfBuzz fallback.
  1879. This avoids cyclic subproject configuration when the 'harfbuzz' feature is
  1880. enabled, or `--wrap-mode=forcefallback` is used, but HarfBuzz is built as a
  1881. subproject. HarfBuzz does the same and disables HarfBuzz support when
  1882. configuring FreeType as a subproject.
  1883. * meson.build (harfbuzz_dep): Implement it.
  1884. * subprojects/harfbuzz.wrap: New file.
  1885. * .gitlab-ci.yml [windows meson]: Use latest version of the meson 0.59
  1886. series, which has a necessary bug fix to make CI work.
  1887. 2022-06-19 Alexei Podtelezhnikov <[email protected]>
  1888. [truetype] Clean up phantom point accounting.
  1889. This formalizes that the phantom points appended in the outline
  1890. do not increase its point count, nor are they tagged or included
  1891. in any additional contours. Only their coordinates are stored.
  1892. They are counted in the glyph zone, however.
  1893. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Infer `n_points`
  1894. from the outline size plus four phantom points.
  1895. * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Remove this
  1896. argument.
  1897. * src/truetype/ttgload.c (tt_prepare_zone): Add phantom four.
  1898. (TT_Process_Simple_Glyph, load_truetype_glyph): Update all callers.
  1899. 2022-06-19 Alexei Podtelezhnikov <[email protected]>
  1900. [truetype/GX] Clean up phantom point adjustment.
  1901. This moves phantom point and advance variation adjustment next to
  1902. calculations. The logic stays the same, HVAR and VVAR take priority.
  1903. * src/truetype/ttgload.c (load_truetype_glyph): Move it from here...
  1904. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here
  1905. and check for HVAR and VVAR presence outside the main loop.
  1906. 2022-06-18 Ben Wagner <[email protected]>
  1907. [stream] Fix reading s32 when long is s64
  1908. `FT_READ_LONG`, `FT_GET_LONG`, and related macros did not return
  1909. negative values when `long` is more than 32 bits. `FT_Stream_ReadULong`
  1910. would read four bytes into the LSB of an `FT_ULong` and return that.
  1911. Since this can never set the MSb of the `FT_ULong` when `FT_ULong` is
  1912. more than 32 bits the cast to `FT_Long` never resulted in a negative
  1913. value.
  1914. Fix this by modifying `FT_Stream_Read*` to return a type of the same
  1915. size as the bytes it is reading and changing the `FT_READ_*` and
  1916. `FT_GET_*` macros to cast to the same type returned by `FT_Stream_Read*`
  1917. but with the correctly signed type (instead of casting to what is
  1918. assumed to be the type of `var` which will happen automatically anyway).
  1919. There exist a few cases like with the `OFF3` variants where there isn't
  1920. generally a type with the correct size. `FT_PEEK_OFF3` works around this
  1921. loading the bytes into the three most significant bits and then doing a
  1922. signed shift down. `FT_NEXT_OFF3` also already worked correctly by
  1923. casting this signed value to another signed type. `FT_Stream_GetUOffset`
  1924. works correctly but one must be careful not to attempt to cast the
  1925. returned value to a signed type. Fortunately there is only
  1926. `FT_GET_UOFF3` and no `FT_GET_OFF3`.
  1927. All of these cases are handled correctly when reading values through
  1928. `FT_Stream_ReadFields` since it generically computes the signed value
  1929. through an `FT_Int32`. This change is essentially doing the same for
  1930. these macros.
  1931. * include/freetype/internal/ftstream.h (FT_NEXT_*, FT_GET_*, FT_READ*):
  1932. Update macros and return types to use fixed size types for fixed size
  1933. values.
  1934. * src/base/ftstream.c (FT_StreamGet*, FT_StreamRead*): Dito.
  1935. Issue: #1161
  1936. 2022-06-17 Alexei Podtelezhnikov <[email protected]>
  1937. [truetype/GX] Fix an old typo.
  1938. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Vertical
  1939. advance is measured along y-coordinate.
  1940. 2022-06-16 Alexei Podtelezhnikov <[email protected]>
  1941. [truetype/GX] Clean up advance adjustment (Brrr).
  1942. * src/truetype/ttgload.c (load_truetype_glyph): Remove remaining code.
  1943. 2022-06-16 Ben Wagner <[email protected]>
  1944. [type1] Directly search for eexec in private dict
  1945. This code originally just searched for `eexec`. This was later modified
  1946. to check that the `eexec` found is valid (not in a string or comment).
  1947. This was done by searching for `eexec` as before and then, for each
  1948. `eexec` found, searching from the beginning using the correct parsing to
  1949. see if the `eexec` was still found. If the private dictionary is large
  1950. and contains many copies of `eexec` which are not valid, the initial
  1951. part of the private dictionary is scanned once for each, potentially
  1952. leading to n^2 parsing time.
  1953. Instead of finding an initial `eexec` and then re-parsing to discover if
  1954. it is valid, drop the initial search for `eexec` and just parse to find
  1955. a valid `eexec`. This is strictly faster since the validation must
  1956. happen anyway and avoids restarting from the beginning each time an
  1957. `eexec` is found in the data.
  1958. * src/type1/t1parse.c (T1_Get_Private_Dict): avoid n^2 parsing
  1959. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1328883
  1960. 2022-06-16 Alexei Podtelezhnikov <[email protected]>
  1961. [truetype/GX] Clean up advance adjustment.
  1962. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph):
  1963. Move the advance adjustment from here...
  1964. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here and
  1965. simplify arguments.
  1966. * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Update prototype
  1967. with fewer arguments.
  1968. 2022-06-14 Ben Wagner <[email protected]>
  1969. [gzip] Handle inflate returning Z_NEED_DICT
  1970. When `inflate` returns `Z_NEED_DICT` this is currently not reported as
  1971. an error and callers may assume that the decompression succeeded when it
  1972. did not. In particular, a compressed table in a woff file may not
  1973. actually be decompressed and written as expected, leaving the backing
  1974. memory for the expanded table uninitialized.
  1975. * src/gzlip/ftgzip.c (FT_Gzip_Uncompress): treat `Z_NEED_DICT` as
  1976. indicating invalid data since there is no means to provide a dictionary.
  1977. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1335712
  1978. 2022-06-13 Ben Wagner <[email protected]>
  1979. [woff] Don't allocate table entries until needed
  1980. * src/sfnt/sfwoff.c (woff_open_font): delay allocating space for the
  1981. table entries until they are actually written out with the data.
  1982. 2022-06-12 Alexei Podtelezhnikov <[email protected]>
  1983. * src/sfnt/sfwoff2.c (woff2_open_font): Partial revert.
  1984. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47981.
  1985. 2022-06-12 Alexei Podtelezhnikov <[email protected]>
  1986. * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Cosmetic macro change.
  1987. 2022-06-11 Alexei Podtelezhnikov <[email protected]>
  1988. [woff, woff2] Avoid buffer zeroing.
  1989. * src/sfnt/sfwoff.c (woff_open_font): Use Q-macros.
  1990. * src/sfnt/sfwoff2.c: Ditto.
  1991. (reconstruct_font): Allocate table_entry on stack.
  1992. 2022-06-10 Alexei Podtelezhnikov <[email protected]>
  1993. [smooth] Fix GCC LTO crashes on Windows.
  1994. Fixes #1164 by using a volatile variable around `setjmp`. It is hard to
  1995. say how this fixes crashes related to certain link-time optimizations.
  1996. This does not decrease the rendering performance.
  1997. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`.
  1998. 2022-06-09 bruvzg <@bruvzg>
  1999. * src/smooth/ftgrays.c [FT_STATIC_RASTER]: Fix compilation.
  2000. 2022-06-06 Ben Wagner <[email protected]>
  2001. [svg] Set linear advances when loading SVG glyphs
  2002. * include/freetype/freetype.h (FT_GlyphSlotRec_): update doc
  2003. * src/cff/cffgload.c (cff_slot_load): do it
  2004. * src/truetype/ttgload.c (TT_Load_Glyph): do it
  2005. Fixes: #1156
  2006. 2022-06-01 Ben Wagner <[email protected]>
  2007. [svg] Clear correct flags for doc ownership
  2008. This issue was discovered with an SVG based font with some documents
  2009. compressed and other uncompressed. After loading the first compressed
  2010. document the ownership flag on the glyph slot was set to true but never
  2011. set to false. As a result after loading a compressed document a glyph
  2012. from an uncompressed document would load fine, but when this glyph slot
  2013. was cleared it would try to free its document resulting in a wild free.
  2014. * src/base/ftobjs.c (ft_glyphslot_clear): clear correct flags
  2015. Fixes: #1162
  2016. 2022-06-01 Alexei Podtelezhnikov <[email protected]>
  2017. [docs] Correct favicon.
  2018. 2022-06-01 Alexei Podtelezhnikov <[email protected]>
  2019. [docs] Use hinted favicon.
  2020. 2022-05-27 Alexei Podtelezhnikov <[email protected]>
  2021. [docs] Update favicon.
  2022. 2022-05-25 Behdad Esfahbod (بهداد اسفهبد) <[email protected]>
  2023. * src/sfnt/ttmtx.c (tt_face_get_metrics): Apply variations unconditionally.
  2024. This causes a speed-up of approx. 20% for getting advance widths.
  2025. 2022-05-23 Dominik Röttsches <[email protected]>
  2026. [truetype] Support reading 32bit/16bit VarStore deltas
  2027. * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Define type
  2028. to be used for delta arrays, upgrade to FT_long.
  2029. * src/truetype/ttgxvar.c: Adhere to long_words bit and read either
  2030. Short/Byte pairs or Long/Short pairs, as defined by spec. For better
  2031. readability, define macro for repetitive read code.
  2032. 2022-05-20 Dominik Röttsches <[email protected]>
  2033. [truetype] Handle 0xFFFF special value inside delta retrieval function
  2034. * truetype/ttgxvar.c (tt_hvadvance_adjust, tt_apply_mvar,
  2035. tt_var_get_item_delta): Remove special 0xFFFF handling in favor of less
  2036. redundant handling inside the tt_var_get_item_delta function, as it is
  2037. equivalent to returning a 0 delta. Avoids code-duplication checking for
  2038. special value 0xFFFF.
  2039. 2022-05-19 Dominik Röttsches <[email protected]>
  2040. [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.
  2041. This will be needed for 'COLR' v1 variation support.
  2042. * src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion,
  2043. GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to...
  2044. * include/freetype/internal/ftmmtypes.h: ... this new file.
  2045. * include/freetype/internal/service/svmm.h (MultiMasters): Include
  2046. `ftmmtypes.h`.
  2047. (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func,
  2048. FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func,
  2049. FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs.
  2050. (MultiMasters): Add them.
  2051. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  2052. * src/cff/cffdrivr.c (cff_load_item_variation_store,
  2053. cff_load_delta_set_index_mapping, cff_get_item_delta,
  2054. cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper
  2055. methods calling into mm service.
  2056. (cff_service_multi_masters): Updated.
  2057. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store,
  2058. ft_var_load_delta_set_index_mapping, ft_var_get_item_delta,
  2059. ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed
  2060. to ...
  2061. (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping,
  2062. tt_var_get_item_delta, tt_var_done_item_variation_store,
  2063. tt_var_done_delta_set_index_map): ... this for consistency.
  2064. Mark them as non-static.
  2065. * src/truetype/ttgxvar.h: Add corresponding prototypes.
  2066. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  2067. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
  2068. 2022-05-19 Dominik Röttsches <[email protected]>
  2069. [truetype] Move deallocation of `DeltaSetIdxMap` into own function.
  2070. This is a preparation for handling `DeltaSetIdxMap` and `VarStore` as a
  2071. FreeType service.
  2072. * src/truetype/ttgxvar.c (ft_var_done_delta_set_index_map): New function.
  2073. (tt_done_blend): Use it.
  2074. 2022-05-18 Werner Lemberg <[email protected]>
  2075. * builds/toplevel.mk (do-dist): Don't remove meson wrap files.
  2076. Fixes #1157.
  2077. 2022-05-18 Werner Lemberg <[email protected]>
  2078. * subprojects/zlib.wrap: Update to zlib version 1.2.12.
  2079. 2022-05-18 Werner Lemberg <[email protected]>
  2080. REAMDE: Mention that gitlab's 'download' button doesn't work.
  2081. This is because the `git archive` command doesn't preserve submodules.
  2082. Note that currently there is no support for disabling the 'download' button
  2083. in gitlab (https://gitlab.com/gitlab-org/gitlab/-/issues/17032).
  2084. Fixes issue #1158.
  2085. 2022-05-11 Werner Lemberg <[email protected]>
  2086. [truetype] Handle inner/outer index values 0xFFFF/0xFFFF.
  2087. This was introduced in OpenType 1.8.4.
  2088. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping,
  2089. tt_hvadvance_adjust, ft_var_load_mvar, tt_apply_mvar): Handle special
  2090. inner/outer index values.
  2091. (ft_var_load_item_variation_store): Add test.
  2092. Fixes #1154.
  2093. 2022-05-01 Werner Lemberg <[email protected]>
  2094. * Version 2.12.1 released.
  2095. ==========================
  2096. Tag sources with `VER-2-12-1'.
  2097. * docs/VERSION.TXT: Add entry for version 2.12.1.
  2098. * docs/CHANGES, docs/release: Updated.
  2099. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  2100. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  2101. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  2102. docs/freetype-config.1: s/2.12.0/2.12.1/, s/2120/2121/.
  2103. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  2104. * builds/unix/configure.raw (version_info): Set to 24:3:18.
  2105. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  2106. 2022-04-30 Anuj Verma <[email protected]>
  2107. [sdf] Do not throw errors for invisible glyphs.
  2108. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Return `FT_Err_Ok` if
  2109. width or height is zero, since some glyphs do not generate visible bitmaps.
  2110. Fixes #1150.
  2111. 2022-04-30 Werner Lemberg <[email protected]>
  2112. * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_COLOR` for SVG fonts.
  2113. Fixes #1151.
  2114. 2022-04-27 Brendan Shanks <[email protected]>
  2115. autogen.sh: Fix building when freetype is itself a git submodule.
  2116. There are situations where .git is not a directory, like when
  2117. freetype is a submodule in another repository.
  2118. 2022-04-26 Alexei Podtelezhnikov <[email protected]>
  2119. [builds/windows] Simplify non-desktop UWP check.
  2120. Fixes mingw compilation described in !159.
  2121. * builds/windows/ftsystem.c: Do not use WINAPI_FAMILY_PARTITION macro.
  2122. 2022-04-25 Alexei Podtelezhnikov <[email protected]>
  2123. [truetype] Reset IUP flags in `TT_RunIns`.
  2124. Fixes #1148 by moving the flag initialization back, partly reverting
  2125. 7809007a and fd03dcc1. Initializing these flags elsewhere skips 'cvt'.
  2126. * src/truetype/ttinterp.c (TT_RunIns): Initialize the IUP flag here...
  2127. (TT_Run_Context): ... instead of here.
  2128. 2022-04-24 Xavier Claessens <[email protected]>
  2129. [meson] Remove `default_library=both` from `default_options`.
  2130. It is inconsistent with what all other Meson projects do.
  2131. It also prevents static linking to FreeType when it is a subproject because
  2132. `default_options` in a subproject takes precedence on values set on the main
  2133. project. For example, building 'GStreamer' with `-Ddefault_library=static`
  2134. would still dynamically link on FreeType unless the user also sets
  2135. `-Dfreetype2:default_library=static`.
  2136. * meson.build: Updated.
  2137. * .gitlab-ci.yml: Retain `both` option for testing.
  2138. 2022-04-19 Werner Lemberg <[email protected]>
  2139. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Integer overflow.
  2140. Reported as
  2141. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46792
  2142. 2022-04-16 Georg Brandl <[email protected]>
  2143. * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_SVG]: Fix segfault.
  2144. This can happen if the function is called with `size` being `NULL`.
  2145. Fixes #1147.
  2146. 2022-04-14 Steve Lhomme <[email protected]>
  2147. .gitlab-ci.yml: Add a Universal Windows build target
  2148. It's compiled for Windows 10 and up, ensuring UNICODE is set (default for UWP)
  2149. and selecting the proper WINAPI_FAMILY (WINAPI_FAMILY_APP).
  2150. Do not try to run the UWP exe in the Docker as it doesn't work.
  2151. 2022-04-04 Ben Wagner <[email protected]>
  2152. [sfnt] Correct FT_ColorStopIterator documentation.
  2153. * include/freetype/ftcolor.h (FT_ColorStopIterator): the user should not
  2154. set `p` to NULL before calling `FT_Get_Colorline_Stops`. `p` and
  2155. `num_color_stops` are set by `FT_Get_Paint`. `p` and
  2156. `current_color_stop` are updated by `FT_Get_Colorline_Stops`.
  2157. 2022-04-01 Werner Lemberg <[email protected]>
  2158. * builds/unix/configure.raw: Add option `--with-librsvg`.
  2159. Since 'librsvg' is written in Rust, this option allows distributions to
  2160. avoid a dependency on the entire Rust toolchain to provide the FreeType demo
  2161. programs.
  2162. Suggested by Lars Wendler in !156.
  2163. 2022-04-01 Werner Lemberg <[email protected]>
  2164. * src/sfnt/sfwoff.c (reconstruct_glyf): Fix gcc 10 warning.
  2165. 2022-04-01 Werner Lemberg <[email protected]>
  2166. [gzip] Update sources to zlib 1.2.12.
  2167. 2022-04-01 Eric Jing <@CPUcontrol>
  2168. CMakeLists.txt: Fix `Info.plist` path.
  2169. When building a framework using CMake with `add_subdirectory`, CMake must be
  2170. able to find `freetype-Info.plist` when configuring the framework
  2171. properties.
  2172. Fixes #1145.
  2173. 2022-04-01 Werner Lemberg <[email protected]>
  2174. Whitespace.
  2175. 2022-04-01 Ben Wagner <[email protected]>
  2176. [truetype] Use SUB_LONG for component offset.
  2177. * src/truetype/ttgload.c (TT_Process_Composite_Component): do it.
  2178. Bug: https://crbug.com/1309429
  2179. 2022-03-31 Werner Lemberg <[email protected]>
  2180. CMakeList.txt: Update code to handle recent changes for `freetype.pc`.
  2181. Fixes #1144.
  2182. 2022-03-31 Werner Lemberg <[email protected]>
  2183. CMakeLists.txt: s/PKG_CONFIG/PKGCONFIG/, s/REQUIRED_/REQUIRES_/.
  2184. 2022-03-31 Werner Lemberg <[email protected]>
  2185. * Version 2.12.0 released.
  2186. ==========================
  2187. Tag sources with `VER-2-12-0'.
  2188. * docs/VERSION.TXT: Add entry for version 2.12.0.
  2189. * docs/CHANGES, docs/release: Updated.
  2190. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  2191. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  2192. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  2193. docs/freetype-config.1: s/2.11.1/2.12.0/, s/2111/2120/.
  2194. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 12.
  2195. (FREETYPE_PATCH): Set to 0.
  2196. * builds/unix/configure.raw (version_info): Set to 24:2:18.
  2197. * CMakeLists.txt (VERSION_MINOR): Set to 12.
  2198. (VERSION_PATCH): Set to 0.
  2199. * builds/toplevel.mk (do-dist): Generate `ChangeLog` entries for all commits
  2200. since version 2.11.0 (when we stopped creating this file manually).
  2201. 2022-03-31 Werner Lemberg <[email protected]>
  2202. Fix clang++ warnings.
  2203. * src/base/ftglyph.c (ft_svg_glyph_prepare), src/base/ftobj.c
  2204. (ft_glyphslot_init), src/cache/ftccmap.c (ftc_cmap_node_new),
  2205. src/cache/ftcimage.c (FTC_INode_New), src/lzw/ftlzw.c (FT_Stream_OpenLZW),
  2206. src/psaux/psobjs.c (ps_parser_load_field), src/pshinter/pshglob.c
  2207. (psh_globals_new), src/sfnt/ttsvg.c (tt_face_load_svg_doc): Initialize
  2208. variables used for allocation.
  2209. * src/sdf/ftsdf.c (split_sdf_conic, split_sdf_cubic): Change type of
  2210. `max_splits` to FT_UInt.
  2211. (sdf_generate_bounding_box): Add cast.
  2212. 2022-03-30 Werner Lemberg <[email protected]>
  2213. Whitespace.
  2214. 2022-03-30 Werner Lemberg <[email protected]>
  2215. [builds] Fix creation of `freetype2.pc` for static-only builds.
  2216. We have to help `pkg-config` since it can't recognize that there is no
  2217. shared library installed.
  2218. Note that meson already does exactly the same.
  2219. * builds/unix/configure.raw (REQUIRES_PRIVATE, LIBS_PRIVATE): Rename to...
  2220. (PKGCONFIG_REQUIRES_PRIVATE, PKGCONFIG_LIBS_PRIVATE): This. Adjust them
  2221. depending on `$enable_shared`.
  2222. (PKGCONFIG_REQUIRES, PKGCONFIG_LIBS): New variables.
  2223. * builds/unix/freetype2.in, builds/unix/unix-def.in: Use new and updated
  2224. variables.
  2225. 2022-03-25 Werner Lemberg <[email protected]>
  2226. Add `FT_FACE_FLAG_SBIX_OVERLAY` and `FT_HAS_SBIX_OVERLAY`.
  2227. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX_OVERLAY,
  2228. FT_HAS_SBIX_OVERLAY): New macro.
  2229. * src/sfnt/ttsbit.c (tt_face_load_sbit): Handle `FT_FACE_FLAG_SBIX_OVERLAY`.
  2230. Remove obsolete tracing message.
  2231. 2022-03-25 Werner Lemberg <[email protected]>
  2232. Add `FT_PARAM_TAG_IGNORE_SBIX`.
  2233. This is another bit to handle 'sbix' tables as described in the OpenType
  2234. specification.
  2235. * include/freetype/ftparams.h (FT_PARAM_TAG_IGNORE_SBIX): New macro.
  2236. * src/sfnt/sfobjc.c (is_apple_sbix): Rename to...
  2237. (has_sbix): ... this.
  2238. Check for more sbit tables.
  2239. Handle `FT_PARAM_TAG_IGNORE_SBIX` to eventually control `has_sbix`.
  2240. Only call sbit table loader if an sbit table is present.
  2241. 2022-03-25 Werner Lemberg <[email protected]>
  2242. [truetype] Fix 'sbix' table handling.
  2243. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Correct calculation of
  2244. 'metrics->horiBearingY'.
  2245. Set vertical metrics.
  2246. * src/sfnt/sfobjs.c (sfnt_load_face): Adjust setting of `FT_FACE_FLAG_SBIX`.
  2247. Handle metrics of fonts with 'sbix' table.
  2248. * src/truetype/ttgload.c (TT_Load_Glyph): For 'sbix' embedded bitmaps, apply
  2249. bbox offset and bearing values of the corresponding glyph in the 'glyf'
  2250. table if it exists and has a contour.
  2251. * src/truetype/ttobjs.c (tt_face_init): Handle font with 'sbix' table.
  2252. Fixes issue #998.
  2253. 2022-03-25 Werner Lemberg <[email protected]>
  2254. Add `FT_FACE_FLAG_SBIX` and `FT_HAS_SBIX`.
  2255. Fonts with 'sbix' tables need special handling by the application.
  2256. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX, FT_HAS_SBIX): New macros.
  2257. * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_SBIX` if 'sbix'
  2258. table is present.
  2259. 2022-03-25 Werner Lemberg <[email protected]>
  2260. * include/freetype/freetype.h (FT_LOAD_SBITS_ONLY): Tag macro as public.
  2261. 2022-03-24 Carlo Bramini <[email protected]>
  2262. [builds/windows] Fix WCE support.
  2263. * builds/windows/ftsystem.c [_WIN32_WCE]: Include <malloc.h> needed by
  2264. _alloca.
  2265. 2022-03-24 Steve Lhomme <[email protected]>
  2266. [build/windows] Improve UWP support.
  2267. * builds/windows/ftsystem.c [UWP]: Wrap CreateFile2 into CreateFileA.
  2268. 2022-03-21 Werner Lemberg <[email protected]>
  2269. * src/sfnt/ttkern.c (tt_face_get_kerning): Exit early if no table.
  2270. Fixes #1141.
  2271. 2022-03-20 Ben Wagner <[email protected]>
  2272. [woff2] Support overlap flag for simple glyphs.
  2273. In the woff2 spec it has been proposed to allow the OVERLAP_SIMPLE flag
  2274. to be retained through the woff2 format [0].
  2275. [0] https://www.w3.org/TR/WOFF2/#glyf_table_format
  2276. * src/sfnt/sfwoff2.h (GLYF_OVERLAP_SIMPLE): add glyf flag.
  2277. * src/sfnt/sfwoff2.c (reconstruct_glyf): parse optionFlags and
  2278. overlapSimpleBitmap[]. (store_points): set OVERLAP_SIMPLE on first point's
  2279. flag if the overlap bit is set.
  2280. 2022-03-19 Werner Lemberg <[email protected]>
  2281. [cff] Synchronize `cff_slot_load` with `TT_Load_Glyph`.
  2282. * src/cff/cffgload.c (IS_DEFAULT_INSTANCE): New macro.
  2283. (cff_slot_load): Use it.
  2284. 2022-03-19 Werner Lemberg <[email protected]>
  2285. * src/base/ftobjs.c (FT_Request_Size): Guard `face->size`.
  2286. Fixes #1140.
  2287. 2022-03-19 Werner Lemberg <[email protected]>
  2288. * src/base/ftobjs.c (ft_open_face_internal): Thinko.
  2289. 2022-03-19 Ben Wagner <[email protected]>
  2290. [doc] FT_OUTLINE_OVERLAP was introduced in 2.10.3.
  2291. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Document when added.
  2292. 2022-03-19 Werner Lemberg <[email protected]>
  2293. * src/base/ftobjs.c (ft_open_face_internal): Properly guard `face_index`.
  2294. We must ensure that the cast to `FT_Int` doesn't change the sign.
  2295. Fixes #1139.
  2296. 2022-03-17 Werner Lemberg <[email protected]>
  2297. [sfnt] Avoid invalid face index.
  2298. Fixes #1138.
  2299. * src/sfnt/sfobjs.c (sfnt_init_face), src/sfnt/sfwoff2.c (woff2_open_font):
  2300. Check `face_index` before decrementing.
  2301. 2022-03-07 Werner Lemberg <[email protected]>
  2302. Documentation, whitespace.
  2303. 2022-03-05 Anuj Verma <[email protected]>
  2304. [sdf] Fix corner checks and improve performance.
  2305. * src/sdf/ftsdf.c (sdf_generate_bounding_box): Always check for a corner if
  2306. two distances (for different curves) are very close.
  2307. (sdf_conic_to): Check whether the conic curve can be treated as a line
  2308. (which happens if the control point coincides with any end point).
  2309. 2022-03-05 Anuj Verma <[email protected]>
  2310. [sdf] Implement deviation-based splitting for Bezier curves.
  2311. * src/sdf/ftsdf.c (split_sdf_cubic, split_sdf_shape): Add checks to figure
  2312. out the deviation of Bezier curves and stop splitting if the curve is flat
  2313. enough.
  2314. * src/sdf/ftsdfcommon.h (ONE_PIXEL): New macro.
  2315. 2022-03-05 Anuj Verma <[email protected]>
  2316. * include/freetype/freetype.h: Improve SDF documentation.
  2317. 2022-03-03 Ben Wagner <[email protected]>
  2318. [sfnt] Fix bounds check in SVG.
  2319. The `SVG_DOCUMENT_LIST_MINIMUM_SIZE` macro is non trivial and not
  2320. protected by parentheses. As a result, the expression
  2321. `table_size - SVG_DOCUMENT_LIST_MINIMUM_SIZE` expands to
  2322. `table_size - 2U + SVG_DOCUMENT_RECORD_SIZE` instead of the expected
  2323. `table_size - (2U + SVG_DOCUMENT_RECORD_SIZE)`. This causes an incorrect
  2324. bounds check which may lead to reading past the end of the `SVG ` table.
  2325. * src/sfnt/ttsvg.c (tt_face_load_svg): wrap macro definitions in
  2326. parentheses.
  2327. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45179
  2328. 2022-02-23 Ben Wagner <[email protected]>
  2329. [psaux] Full bounds check for OtherSubr 19.
  2330. It is possible for OtherSubr 19 to be invoked when `decoder->buildchar` is
  2331. NULL (so that `decoder->len_buildchar` is 0), the `blend` is non-NULL with
  2332. `blend->num_designs` set to 2, and the user supplied `idx` to be large (for
  2333. example 0xFFFFFFFE). Since these are all `FT_UInt32` the existing bounds
  2334. check overflows in a well defined manner, allowing for an invalid call to
  2335. `memcpy`.
  2336. In addition, it is possible to call OtherSubr 19 with
  2337. `decoder->len_buildchar`, `blend->num_designs`, and `idx` all zero (implying
  2338. that `blend->weight_vector` and `decoder->buildchar` are NULL). This passes
  2339. the bounds check (it is logically always fine to copy nothing starting at
  2340. index zero) but may invoke undefined behavior in `ft_memcpy` if it is backed
  2341. by `memcpy`. Calling `memcpy` with either the `src` or `dst` NULL is
  2342. undefined behavior (even if `count` is zero).
  2343. * src/psaux/psintrp.c (cf2_interpT2CharString): Correctly check that
  2344. `blend->num_designs` can be copied to `decoder->buildchar[idx]`.
  2345. Also avoid passing NULL to `ft_memcpy`.
  2346. Bug: https://crbug.com/1299259
  2347. 2022-02-21 suzuki toshiya <[email protected]>
  2348. [cmake] Drop the support of CMake 2.x.
  2349. * CMakeLists.txt: Require CMake 3.0 (released on 2014) or newer.
  2350. The issue #1059 reports the difficulty to support both of
  2351. CMake 2.x and newer one by single CMakeLists.txt without
  2352. the inflation of cmake_policy() workarounds.
  2353. For better maintainability, the support of CMake 2.x is
  2354. dropped.
  2355. 2022-02-19 Werner Lemberg <[email protected]>
  2356. * src/bdf/README: Updated.
  2357. 2022-02-19 Werner Lemberg <[email protected]>
  2358. * builds/mac/ftmac.c, src/base/ftmac.c: s|FT_MAC_H|<freetype/ftmac.h>|.
  2359. 2022-02-19 Werner Lemberg <[email protected]>
  2360. src/sfnt/ttkern.c (tt_face_load_kern): Micro-optimize.
  2361. A kerning table can be handled by binary search if it has equal entries.
  2362. Fixes #1132.
  2363. 2022-02-17 Steve Lhomme <[email protected]>
  2364. Alexei Podtelezhnikov <[email protected]>
  2365. [builds/windows] Add support for legacy UWP builds.
  2366. * builds/windows/ftsystem.c: Add neccessary macro substitutions to
  2367. enable strict UWP builds.
  2368. See !141.
  2369. 2022-02-16 Werner Lemberg <[email protected]>
  2370. ftmm.h: Minor documentation improvement.
  2371. 2022-02-13 Alexei Podtelezhnikov <[email protected]>
  2372. [pshinter] Tune PSH_STRONG_THRESHOLD_MAXIMUM value.
  2373. Before the change, the hinting engine frequently confused horizontal
  2374. stem and serif hints making some stems too thin and some serifs too
  2375. thick. The value was tuned using serif fonts from the URW+ base 35
  2376. collection.
  2377. * src/pshinter/pshalgo.c [PSH_STRONG_THRESHOLD_MAXIMUM]: s/30/12/.
  2378. 2022-02-12 Werner Lemberg <[email protected]>
  2379. t1tables.h: Documentation improvements.
  2380. 2022-02-12 Werner Lemberg <[email protected]>
  2381. t1tables.h: Whitespace.
  2382. 2022-02-11 Werner Lemberg <[email protected]>
  2383. [type42] Fix `FT_Get_PS_Font_Private` for this format.
  2384. Since Type42 fonts don't have a 'Private' dictionary, the return value
  2385. should be `FT_Err_Invalid_Argument`.
  2386. * src/type42/t42drivr.c (t42_ps_get_font_private): Removed.
  2387. (t42_service_ps_info): Updated.
  2388. 2022-02-09 Alexei Podtelezhnikov <[email protected]>
  2389. [pshinter] Clear reused mask.
  2390. In PS hinter, memory allocations persist until the module is done.
  2391. Therefore, we have to clear reused masks.
  2392. * src/pshinter/pshrec.c (ps_mask_table_alloc): Clear reused mask.
  2393. 2022-02-09 Alexei Podtelezhnikov <[email protected]>
  2394. [pshinter] Use unsigned indices.
  2395. This reduces casting and eliminates some checks.
  2396. * src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_table_merge,
  2397. ps_dimension_add_t1stem, ps_hints_t1stem3): Updated.
  2398. (ps_dimension_add_counter): Updated, unnecessary checks removed.
  2399. 2022-02-08 Alexei Podtelezhnikov <[email protected]>
  2400. [pshinter] Fix mask merging.
  2401. We forgot to update the number of bits when merging a larger mask
  2402. into a smaller one. This fix might have rendering effects.
  2403. * src/pshinter/pshrec.c (ps_mask_table_merge): Inherit the number
  2404. of bits from a larger mask. There is no need to zero unused bits,
  2405. already zeroed during allocation.
  2406. (ps_mask_clear_bit): Removed.
  2407. (ps_mask_ensure): Minor.
  2408. 2022-02-08 Alexei Podtelezhnikov <[email protected]>
  2409. [pshinter] Revise the hint table handling.
  2410. * src/pshinter/pshrec.c (ps_hint_table_ensure): Remove redundant size
  2411. check; avoid array zeroing because it is fully initialized when used.
  2412. (ps_hint_table_alloc): Fix off-by-one comparison and remove another
  2413. zeroing of the array elements.
  2414. 2022-02-06 Werner Lemberg <[email protected]>
  2415. Various minor doc fixes.
  2416. 2022-02-06 Alexei Podtelezhnikov <[email protected]>
  2417. [builds/windows] Add SVG to to project files.
  2418. * builds/windows/vc2010/freetype.vcxproj: Updated.
  2419. * builds/windows/vc2010/freetype.vcxproj.filters: Updated.
  2420. * builds/windows/visualc/freetype.vcproj: Updated.
  2421. 2022-02-03 Alexei Podtelezhnikov <[email protected]>
  2422. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Trace font resources.
  2423. 2022-02-02 Eric Jing <@CPUcontrol>
  2424. [cmake] Fix build on MacOS.
  2425. * CMakeLists.txt (CMAKE_OSX_ARCHITECTURES): Update value to fix the building
  2426. of a framework on MacOS.
  2427. * builds/mac/freetype-Info.plist (CFBundleExecutable): Make identifier
  2428. lowercase only.
  2429. Fixes #1127.
  2430. 2022-02-02 Alexei Podtelezhnikov <[email protected]>
  2431. [psaux] Revise `PS_Table` handling.
  2432. The old impleemntation was not using `FT_REALLOC`, buing too careful
  2433. with the offset rebasing. It shoudl be safe to rely on the base
  2434. movements.
  2435. * src/psaux/psobjs.c (reallocate_t1_table, shift_elements): Combine
  2436. into...
  2437. (ps_table_realloc): ... this function based on `FT_REALLOC`.
  2438. (ps_table_done): Simplified.
  2439. (ps_table_add): Updated.
  2440. 2022-02-02 Alexei Podtelezhnikov <[email protected]>
  2441. * src/cache/ftcmru.c (FTC_MruList_New): Explain zeroing.
  2442. 2022-01-31 Alexei Podtelezhnikov <[email protected]>
  2443. [cache] Partially revert 9870b6c07e2c.
  2444. Fix crashes reported by Werner.
  2445. * src/cache/ftcmru.c (FTC_MruList_New): Use `FT_ALLOC` again.
  2446. 2022-01-31 Werner Lemberg <[email protected]>
  2447. freetype.h: Minor documentation improvement.
  2448. 2022-01-31 Alexei Podtelezhnikov <[email protected]>
  2449. [cache] Fix fallouts from edd4fedc5427.
  2450. Reported by Werner.
  2451. * src/cache/ftcimage.c (FTC_INode_New): Always initialize FT_Glyph.
  2452. * src/cache/ftcsbits.c (FTC_SNode_New): Always initialize FT_SBit.
  2453. 2022-01-31 Alexei Podtelezhnikov <[email protected]>
  2454. Clean-up - do not doubt FT_FREE.
  2455. * src/base/ftobjs.c (memory_stream_close): Do not reassign zero
  2456. after `FT_FREE`.
  2457. * src/sfnt/sfwoff.c (sfnt_stream_close): Ditto.
  2458. * src/sfnt/sfwoff2.c (stream_close): Ditto.
  2459. * src/psaux/psobjs.c (ps_parser_load_field): Ditto.
  2460. * src/truetype/ttgxvar.c (ft_var_load_avar, tt_set_mm_blend,
  2461. tt_set_mm_blend): Ditto.
  2462. 2022-01-30 Werner Lemberg <[email protected]>
  2463. * CMakeLists.txt: Include 'FindPkgConfig' module.
  2464. Older cmake versions don't provide `pkg_check_modules` by default.
  2465. Fixes #1126.
  2466. 2022-01-30 Alexei Podtelezhnikov <[email protected]>
  2467. * src/psaux/psobjs.c (ps_parser_load_field): Reduce `string` scope.
  2468. 2022-01-29 suzuki toshiya <[email protected]>
  2469. [cmake] Check the availability of `bzip2.pc'.
  2470. (CMakeLists.txt): Check the availability of `bzip2.pc'.
  2471. * If `bzip2.pc' is available, Requires.private should include
  2472. bzip2, but Libs.private should not include -lbz2.
  2473. * If `bzip2.pc' is unavailable, Requires.private cannot include
  2474. bzip2, but Libs.private should include -lbz2.
  2475. Fix #897.
  2476. 2022-01-28 Werner Lemberg <[email protected]>
  2477. * unix/configure.raw: We need 'librsvg' version 2.46.0 or newer.
  2478. Older versions don't have function `rsvg_handle_get_intrinsic_dimensions`.
  2479. 2022-01-28 Alexei Podtelezhnikov <[email protected]>
  2480. Minor clean-ups.
  2481. * src/base/ftrfork.c (raccess_make_file_name): Do not set error.
  2482. * src/sfnt/sfdriver.c (get_win_string, get_apple_string): Ditto.
  2483. * src/cff/cffobjs.c (cff_strcpy): Do not confuse about error.
  2484. * src/psaux/psobjs.c (ps_table_done): Ditto.
  2485. * src/truetype/ttgxvar.c (ft_var_readpacked*, ft_var_load_avar): Ditto.
  2486. 2022-01-27 Ben Wagner <[email protected]>
  2487. Document `FT_Outline_Decompose` degenerate segments.
  2488. `FT_Outline_Decompose` does not filter out and can return degenerate
  2489. segments in an outline. This can be surprising when attemping to
  2490. stroke such an outline. Clarify the existing documentation on this
  2491. matter to cover all forms of degeneracy (without specifying exactly
  2492. how they will be reported), why they might arise, and better explain in
  2493. what cases they may be an issue.
  2494. * include/freetype/ftoutlin.h (FT_Outline_Decompose): update
  2495. documentation.
  2496. Fixes #952.
  2497. 2022-01-27 Anuj Verma <[email protected]>
  2498. Fix sdf computation while `USE_SQUARED_DISTANCES`.
  2499. Function `map_fixed_to_sdf` expects spread to be absolute
  2500. and not squared.
  2501. * src/sdf/ftbsdf.c (finalize_sdf): Pass absolute spread
  2502. while `map_fixed_to_sdf`.
  2503. * src/sdf/ftsdf.c (sdf_generate_bounding_box): Ditto.
  2504. 2022-01-27 Tapish Ojha <[email protected]>
  2505. [sfnt] Improve sRGB constants.
  2506. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use slightly
  2507. more precise values.
  2508. Fixes #1018.
  2509. 2022-01-27 Werner Lemberg <[email protected]>
  2510. docs/release: Updated.
  2511. 2022-01-26 Alexei Podtelezhnikov <[email protected]>
  2512. * src/pfr/pfrload.c (pfr_phy_font_load): Use FT_QNEW_ARRAY.
  2513. 2022-01-26 Alexei Podtelezhnikov <[email protected]>
  2514. * src/sdf/ftsdf.c (sdf_*_new): Use standard macro.
  2515. 2022-01-26 Alexei Podtelezhnikov <[email protected]>
  2516. [pcf] Delay encoding allocation and avoid its zeroing.
  2517. * src/pcf/pcfread.c (pcf_get_encodings): Refactor and use FT_QNEW_ARRAY.
  2518. 2022-01-25 Werner Lemberg <[email protected]>
  2519. Aarg, typo.
  2520. 2022-01-25 Werner Lemberg <[email protected]>
  2521. freetype.h: More updates to `FT_LOAD_COLOR` description.
  2522. 2022-01-25 Werner Lemberg <[email protected]>
  2523. * builds/unix/configure.raw (FT_DEMO_CFLAGS): Pass `-DHAVE-LIBRSVG`.
  2524. This helps in decoupling library support from `pkg-config` for other
  2525. platforms.
  2526. 2022-01-25 Werner Lemberg <[email protected]>
  2527. Update documentation for `FT_LOAD_COLOR`.
  2528. 2022-01-24 Ben Wagner <[email protected]>
  2529. [pshinter] Ensure all point flags are initialized.
  2530. Only off curve point flags were fully initialized.
  2531. * src/pshinter/pshalgo.c (psh_glyph_init): always initialize flags.
  2532. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43930
  2533. 2022-01-24 Werner Lemberg <[email protected]>
  2534. .mailmap: Typo.
  2535. 2022-01-23 Werner Lemberg <[email protected]>
  2536. * src/svg/ftsvg.c (ft_svg_property_set): Disallow NULL pointers.
  2537. 2022-01-23 Werner Lemberg <[email protected]>
  2538. .mailmap: Updated.
  2539. 2022-01-23 Werner Lemberg <[email protected]>
  2540. More documentation on handling OT-SVG.
  2541. 2022-01-23 Werner Lemberg <[email protected]>
  2542. * src/svg/ftsvg.c: Rename `svg_hooks` to `svg-hooks` for consistency.
  2543. 2022-01-22 Werner Lemberg <[email protected]>
  2544. [sfnt] Reject malformed SVG tables.
  2545. * src/sfnt/ttsvg.c (SVG_TABLE_HEADER_SIZE, SVG_DOCUMENT_RECORD_SIZE,
  2546. SVG_DOCUMENT_LIST_MINIMUM_SIZE, SVG_MINIMUM_SIZE): New macros.
  2547. (tt_face_load_svg): Check offsets.
  2548. Check table and record sizes.
  2549. Reported as
  2550. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43918
  2551. 2022-01-22 Alexei Podtelezhnikov <[email protected]>
  2552. * src/psaux/psobjs.c (ps_table_new): Revert to zeroing.
  2553. 2022-01-20 Alexei Podtelezhnikov <[email protected]>
  2554. [psaux, type1, type42] Avoid annecessary zeroing.
  2555. * src/psaux/psobjs.c (ps_table_new): Use FT_QNEW_ARRAY.
  2556. * src/type1/t1load.c (parse_encoding): Ditto.
  2557. * src/type42/t42parse.c (t42_parse_encoding): Ditto.
  2558. 2022-01-20 Werner Lemberg <[email protected]>
  2559. [builds/unix] Handle 'librsvg' for demo programs.
  2560. * builds/unix/configure.raw: Check for 'librsvg'.
  2561. (LIB_CLOCK_GETTIME): Don't call `AC_SUBST` on this but on...
  2562. (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables.
  2563. * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): Replaced by...
  2564. (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables.
  2565. 2022-01-20 Moazin Khatti <[email protected]>
  2566. Add 'svg' module for OT-SVG rendering.
  2567. * CMakeLists.txt (BASE_SRCS): Add svg module file.
  2568. * meson.build (ft2_public_headers): Add `otsvg.h`.
  2569. * modules.cfg (RASTER_MODULES): Add `svg` module.
  2570. * builds/meson/parse_modules_cfg.py: Add svg module.
  2571. * include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`.
  2572. * include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and
  2573. `Missing_SVG_Hooks` error codes.
  2574. * include/freetype/internal/fttrace.h: Add tracing for `otsvg`.
  2575. * include/freetype/internal/svginterface.h: New file. It adds an interface
  2576. to enable the presetting hook from the `base` module.
  2577. * include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func,
  2578. SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering.
  2579. (SVG_RendererHooks): New structure to access them.
  2580. * src/base/ftobjs.c: Include `svginterface.h`.
  2581. (ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG
  2582. glyphs.
  2583. (ft_add_renderer): Updated.
  2584. * src/svg/*: New files.
  2585. 2022-01-20 Moazin Khatti <[email protected]>
  2586. Add `FT_Glyph` support for OT-SVG glyphs.
  2587. * include/freetype/ftglyph.h (FT_SvgGlyphRec, FT_SvgGlyph): New structure.
  2588. * src/base/ftglyph.c: Include `otsvg.h`.
  2589. (ft_svg_glyph_init, ft_svg_glyph_done, ft_svg_glyph_copy,
  2590. ft_svg_glyph_transform, ft_svg_glyph_prepare): New function.
  2591. (ft_svg_glyph_class): New class.
  2592. (FT_New_Glyph, FT_Glyph_To_Bitmap): Updated to handle OT-SVG glyphs.
  2593. * src/base/ftglyph.h: Updated.
  2594. 2022-01-20 Moazin Khatti <[email protected]>
  2595. [truetype, cff] Add code to load SVG document.
  2596. * src/cff/cffgload.c (cff_slot_load): Add code to load SVG doc.
  2597. * src/truetype/ttgload.c (TT_Load_Glyph): Add code to load SVG doc.
  2598. 2022-01-20 Moazin Khatti <[email protected]>
  2599. Add code to load OT-SVG glyph documents.
  2600. * include/freetype/config/ftheader.h (FT_OTSVG_H): New macro.
  2601. * include/freetype/freetype.h (FT_FACE_FLAG_SVG, FT_HAS_SVG): New macros.
  2602. (FT_LOAD_SVG_ONLY): New internal macro.
  2603. * include/freetype/ftimage.h (FT_Glyph_Format): New enumeration value
  2604. `FT_GLYPH_FORMAT_SVG`.
  2605. * include/freetype/internal/ftobjs.h (FT_GLYPH_OWN_GZIP_SVG): New macro.
  2606. * include/freetype/internal/fttrace.h: Add `ttsvg` for `ttsvg.c`.
  2607. * include/freetype/internal/sfnt.h(load_svg, free_svg, load_svg_doc): New
  2608. functions.
  2609. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `svg` for
  2610. the SVG table.
  2611. * include/freetype/otsvg.h (FT_SVG_DocumentRec): New structure to hold the
  2612. SVG document and other necessary information of an OT-SVG glyph in a glyph
  2613. slot.
  2614. * include/freetype/tttags.h (TTAG_SVG): New macro.
  2615. * src/base/ftobjs.c: Include `otsvg.h`.
  2616. (ft_glyphslot_init): Allocate `FT_SVG_DocumentRec` in `slot->other`
  2617. if the SVG table exists.
  2618. (ft_glyphslot_clear): Free it upon clean-up if it is a GZIP compressed
  2619. glyph.
  2620. (ft_glyphslot_done): Free the document data if it is a GZIP compressed
  2621. glyph.
  2622. (FT_Load_Glyph): Don't auto-hint SVG documents.
  2623. * src/cache/ftcbasic.c (ftc_basic_family_load_glyph): Add support for
  2624. FT_GLYPH_FORMAT_SVG.
  2625. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttsvg.c`.
  2626. * src/sfnt/sfdriver.c: Include `ttsvg.h`.
  2627. (sfnt_interface): Add `tt_face_load_svg`, `tt_face_free_svg` and
  2628. `tt_face_load_svg_doc`.
  2629. * src/sfnt/sfnt.c: Include `ttsvg.c`.
  2630. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Add code to load and
  2631. free data of the the SVG table.
  2632. * src/sfnt/ttsvg.c: New file, implementing `tt_face_load_svg`,
  2633. `tt_face_free_svg` and `tt_face_load_svg_doc`.
  2634. * src/sfnt/ttsvg.h: Declarations of the SVG functions in
  2635. `ttsvg.c`.
  2636. 2022-01-20 Moazin Khatti <[email protected]>
  2637. Add flag `FT_CONFIG_OPTION_SVG`.
  2638. This flag is going to be used to conditionally compile support for OT-SVG
  2639. glyphs. FreeType will do the parsing and rely on external hooks for
  2640. rendering of OT-SVG glyphs.
  2641. * devel/ftoption.h, include/freetype/config/ftoption.h
  2642. (FT_CONFIG_OPTION_SVG): New flag.
  2643. 2022-01-20 Alexei Podtelezhnikov <[email protected]>
  2644. [pshinter] Avoid unnecessary zeroing.
  2645. * src/pshinter/pshalgo.c (psh_hint_table_init,psh_glyph_init,
  2646. psh_glyph_interpolate_normal_points): Use FT_QNEW_ARRAY.
  2647. 2022-01-20 Alexei Podtelezhnikov <[email protected]>
  2648. * include/freetype/freetype.h: Clarify `FT_Size` life cycle.
  2649. 2022-01-20 Alexei Podtelezhnikov <[email protected]>
  2650. [base] Undefined scale means no scale.
  2651. It might be surprising that FreeType does not have default ppem and
  2652. the size has to be set explicitly or face undefined behavior with
  2653. undefined variables and errors. This offers an alternative to
  2654. missing or zero scale by simply setting FT_LOAD_NO_SCALE. Defined
  2655. behavior is bettr than undefined one.
  2656. This is alternative to !132 and discussed in
  2657. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43708
  2658. * src/base/ftobjs.c (FT_Load_Glyph): Deal with zero scale.
  2659. * include/freetype/freetype.h: Document it.
  2660. 2022-01-18 Alexei Podtelezhnikov <[email protected]>
  2661. * src/autofit/afglobal.c (af_face_globals_new): Reduce zeroing.
  2662. Everything in AF_FaceGlobals is initialized except metrics. Those
  2663. are zeroed here and initialized on demand later.
  2664. 2022-01-16 Alexei Podtelezhnikov <[email protected]>
  2665. [bdf,type1] Avoid unnecessary hash zeroing.
  2666. * src/bdf/bdflib.c (_bdf_parse_start): Use `FT_QALLOC`.
  2667. * src/type1/t1load.c (parse_subrs): Use `FT_QNEW`.
  2668. 2022-01-16 Ozkan Sezer <[email protected]>
  2669. Add Watcom C/C++ calling.
  2670. In the unlikely case the source is built with OpenWatcom's -ec?
  2671. switches to enforce a calling convention, the qsort() compare
  2672. function must still be set to __watcall.
  2673. * include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
  2674. Updated.
  2675. 2022-01-15 Ben Wagner <[email protected]>
  2676. [pshinter] Avoid accessing uninitialized zone.
  2677. The `normal_top.count` may be 0, implying no `normal_top.zones` exist.
  2678. The code must not access these (non-existent) `normal_top.zones`.
  2679. * src/pshinter/pshalgo.c (ps_hints_apply): Do not assume that
  2680. `normal_top.zones[0]` is initialized. Test `normal_top.count`
  2681. before using `normal_top.zones[0]`. Do not rescale if there are no
  2682. `zones`.
  2683. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43675
  2684. 2022-01-15 Alexei Podtelezhnikov <[email protected]>
  2685. [cache] Avoid unnecessary zeroing.
  2686. * src/cache/ftccmap.c (ftc_cmap_node_new): Use `FT_QNEW`.
  2687. * src/cache/ftcimage.c (FTC_INode_New): Ditto.
  2688. * src/cache/ftcsbits.c (FTC_SNode_New): Ditto.
  2689. 2022-01-15 Ozkan Sezer <[email protected]>
  2690. Add Watcom C/C++ support.
  2691. * include/freetype/config/integer-types.h: Make sure `long long` is
  2692. used then available.
  2693. * include/freetype/internal/ftcalc.h (FT_MSB): Add Watcom C/C++ pragma.
  2694. 2022-01-15 Alexei Podtelezhnikov <[email protected]>
  2695. * src/sdf/ftbsdf.c (ED): s/near/prox/.
  2696. This works around the Watcom C definition of `near` as restricted
  2697. __near.
  2698. 2022-01-15 Alexei Podtelezhnikov <[email protected]>
  2699. * include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten.
  2700. This works around Watcom C library using __watcall.
  2701. 2022-01-14 Alexei Podtelezhnikov <[email protected]>
  2702. * src/pshinter/pshglob.c (psh_globals_new): Avoid zeroing.
  2703. This large allocation is followed by careful initialization. Whatever
  2704. is missed should be initialized manually.
  2705. 2022-01-14 Alexei Podtelezhnikov <[email protected]>
  2706. * src/base/fthash.c (hash_insert): Avoid unnecessary zeroing.
  2707. 2022-01-14 Alexei Podtelezhnikov <[email protected]>
  2708. * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove redundant assignment.
  2709. 2022-01-13 Alexei Podtelezhnikov <[email protected]>
  2710. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Avoid unnecessary zeroing.
  2711. 2022-01-13 Ben Wagner <[email protected]>
  2712. [bzip2] Reset bzip stream on any error.
  2713. According to the bzip documentation it is undefined what will happen if
  2714. `BZ2_bzDecompress` is called on a `bz_stream` it has previously returned an
  2715. error against. If `BZ2_bzDecompress` returns anything other than `BZ_OK`
  2716. the only valid next action is `BZ2_bzDecompressEnd`.
  2717. Reported as
  2718. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43564
  2719. * src/bzip2/ftbzip2.c (FT_BZip2FileRec_): Add `reset` to track the need to
  2720. reset the stream.
  2721. (ft_bzip2_file_init): Initialize `reset` to 0.
  2722. (ft_bzip2_file_reset): Set `reset` to 0 after resetting.
  2723. (ft_bzip2_file_fill_output): Set `reset` to 1 when `BZ2_bzDecompress`
  2724. returns anything other than `BZ_OK`.
  2725. 2022-01-12 Werner Lemberg <[email protected]>
  2726. .gitlab-ci.yml: Minor comment cleanups.
  2727. 2022-01-12 Azamat H. Hackimov <[email protected]>
  2728. .gitlab-ci.yml: Add steps to `before_script` to ensure recent CA.
  2729. Fetch current list of valid CAs from Windows Update and manually import them
  2730. to trusted datastore. This action is required to make downloads work from
  2731. sites that need recent Let's Encrypt ISRG Root X1 certificate.
  2732. 2022-01-11 Ben Wagner <[email protected]>
  2733. Revert "[bzip2] Avoid use of uninitialized memory."
  2734. This reverts commit d276bcb7f0c02c20d3585b2e5626702df6d140a6.
  2735. The original commit did avoid the use of uninitialized memory. However,
  2736. it appears that the original commit is no longer required. The
  2737. underlying issue was resolved by a change in freetype2-testing "Build
  2738. bzip2 correctly." [0]. Prior to [0] bzip2 was built without msan, so
  2739. bzip2 writes were not tracked or considered initialized. Clearing
  2740. `buffer` in the original commit allowed msan to see the `buffer` content
  2741. initialized once in FreeType code, but msan saw no writes into buffer
  2742. from bzip2. With bzip2 now built with msan, the bzip2 writes are
  2743. properly instrumented and msan sees the bzip2 writes into the buffer. As
  2744. a result the original commit can be safely reverted to allow for better
  2745. detection of other uninitialized data scenarios.
  2746. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Revert to using `FT_QNEW`.
  2747. [0] https://github.com/freetype/freetype2-testing/commit/3c052a837a3c960709227a0d6ddd256e87b88853
  2748. 2022-01-11 Ben Wagner <[email protected]>
  2749. [type42] Track how much type42 ttf data is available.
  2750. Currently `T42_Open_Face` eagerly allocates 12 bytes for the ttf header
  2751. data which it expects `t42_parse_sfnts` to fill out from /sfnts data.
  2752. However, there is no guarantee that `t42_parse_sfnts` will actually be
  2753. called while parsing the type42 data as the /sfnts array may be missing
  2754. or very short. This is also confusing behavior as it means
  2755. `T42_Open_Face` is tightly coupled to the implementation of the very
  2756. distant `t42_parse_sfnts` code which requires at least 12 bytes to
  2757. already be reserved in `face->ttf_data`.
  2758. `t42_parse_sfnts` itself eagerly updates `face->ttf_size` to track how
  2759. much space is reserved for ttf data instead of traking how much data has
  2760. actually been written into `face->ttf_data`. It will also act strangely
  2761. in the presense of multiple /sfnts arrays.
  2762. * src/type42/t42objs.c (T42_Open_Face): ensure `ttf_data` is initialized
  2763. to NULL. Free `ttf_data` on error.
  2764. * src/type42/t42parse.c (t42_parse_sfnts): delay setting `ttf_size` and
  2765. set it to the actual number of bytes read. Ensure `ttf_data` is freed
  2766. if there are multiple /sfnts arrays or there are any errors.
  2767. 2022-01-11 Dominik Röttsches <[email protected]>
  2768. [sfnt] Fix limit checks for `COLR` v1 ClipBoxes
  2769. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Fix off-by-one in
  2770. limit checks.
  2771. 2022-01-11 Werner Lemberg <[email protected]>
  2772. Update all copyright notices.
  2773. 2022-01-11 Werner Lemberg <[email protected]>
  2774. * src/sfnt/ttcolr.c (read_paint): Fix undefined left-shift operation.
  2775. Reported as
  2776. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43151
  2777. 2022-01-11 Werner Lemberg <[email protected]>
  2778. * src/type42/t42objs.c (T42_Open_Face): Avoid use of uninitialized memory.
  2779. Reported as
  2780. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43508
  2781. 2022-01-11 Werner Lemberg <[email protected]>
  2782. .gitlab-ci.yml: Fix typo in previous commit.
  2783. 2022-01-11 Werner Lemberg <[email protected]>
  2784. .gitlab-ci.yml: Update Windows image.
  2785. The old image produced errors like
  2786. ```
  2787. Downloading zlib patch from
  2788. https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch
  2789. A fallback URL could be specified using patch_fallback_url key in the wrap file
  2790. WrapDB connection failed to
  2791. https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch
  2792. with error
  2793. <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
  2794. failed: certificate has expired (_ssl.c:1122)>
  2795. ```
  2796. 2022-01-11 Werner Lemberg <[email protected]>
  2797. * subprojects/zlib.wrap: Update from upstream.
  2798. 2022-01-10 Werner Lemberg <[email protected]>
  2799. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Add limit checks.
  2800. Reported as
  2801. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40716
  2802. 2022-01-10 Werner Lemberg <[email protected]>
  2803. [zlib] Don't typedef `ptrdiff_t`.
  2804. While using zlib in 'solo' mode (via the `Z_SOLO` macro), we actually
  2805. include some standard header files, making the typedef fail on systems where
  2806. the native `ptrdiff_t` type differs.
  2807. Fixes #1124.
  2808. * src/zlib/zutil.h: Comment out definition; it doesn't work on Windows.
  2809. * src/zlib/patches/freetype-zlib.diff: Updated.
  2810. 2022-01-10 Werner Lemberg <[email protected]>
  2811. [zlib] Some organizational changes.
  2812. We now first apply zlib's `zlib2ansi` script, then FreeType's patch file.
  2813. * src/gzip/README.freetype: Updated.
  2814. * patches/0001-zlib-Fix-zlib-sources-to-compile-for-FreeType.patch: Renamed
  2815. to...
  2816. * patches/freetype-zlib.diff: This.
  2817. Clean up description, then regenerate it as follows:
  2818. - Copy unmodified files from `zlib` repository.
  2819. - Run `zlib2ansi` script.
  2820. - Run `git diff -R > patches/freetype-zlib.diff.new`.
  2821. - Insert patch description of old diff file, then replace old diff with
  2822. new diff file.
  2823. 2022-01-09 David Turner <[email protected]>
  2824. [gzip] Update sources to zlib 1.2.11
  2825. This can be tested by building with the Unix development build
  2826. make setup devel
  2827. make
  2828. or by building the freetype-demos programs with
  2829. meson setup build -Dfreetype2:zlib=internal
  2830. meson compile -C out
  2831. and trying to run `ftview` with a `.pcf.gz` font file.
  2832. * src/gzip/ftgzip.c, src/gzip/rules.mk: Update for new zlib sources. Also
  2833. remove the temporary fix introduced in commit 6a431038 to work around the
  2834. fact that the internal sources were too old.
  2835. * src/gzip/README.freetype: New file describing the origin of the sources
  2836. and how they were modified.
  2837. * src/gzip/patches/*: Patch files applied to original sources.
  2838. * src/gzip/*: Updated zlib sources with the patch file(s) from
  2839. `src/gzip/patches/` applied, followed by a conversion with zlib's
  2840. `zlib2ansi` script.
  2841. 2022-01-09 David Turner <[email protected]>
  2842. [meson] Change Zlib configuration option.
  2843. * meson_options.txt, meson.build: Change the format of the 'zlib' meson
  2844. build configuration option to be a combo with the following choices:
  2845. - none: Do not support gzip-compressed streams at all.
  2846. - internal: Support gzip-compressed streams using the copy of the gzip
  2847. sources under `src/gzip/`; this should only be used during development
  2848. to ensure these work properly.
  2849. - external: Support gzip-compressed streams using the 'zlib' Meson
  2850. subproject, linked as a static library.
  2851. - system: Support gzip-compressed streams using a system-installed version
  2852. of zlib.
  2853. - auto: Support gzip-compressed streams using a system-installed version
  2854. of zlib, if available, or using the 'zlib' subproject otherwise. This
  2855. is the default.
  2856. - disabled: Backward-compatible alias for 'none'.
  2857. - enabled: Backward-compatible alias for 'auto'.
  2858. 2022-01-09 Werner Lemberg <[email protected]>
  2859. [bzip2] Avoid use of uninitialized memory.
  2860. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Don't use `FT_QNEW` but
  2861. `FT_NEW` for setting up `zip` to avoid uninitialized memory access while
  2862. handling malformed PCF fonts later on.
  2863. Fixes
  2864. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42800
  2865. 2022-01-09 Alexei Podtelezhnikov <[email protected]>
  2866. [sfnt] Fix off-by-one error.
  2867. The 0-base index is equal to the number of previosly parsed entries.
  2868. It is an error to adjust it by one to get the number truncated by
  2869. a stream error. This is probably inconsequential because valid
  2870. entries are correctly accounted for.
  2871. * src/sfnt/ttload.c (check_table_dir): Do not adjust the truncated
  2872. number of tables.
  2873. 2022-01-08 Werner Lemberg <[email protected]>
  2874. [sfnt, type42] Correct previous commit.
  2875. Really fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773.
  2876. * src/sfnt/ttload.c (check_table_dir): Revert change.
  2877. * src/type42/t42.parse.c (t42_parse_sfnts): Don't use `FT_QREALLOC` but
  2878. `FT_REALLOC` for setting up `ttf_data` to avoid uninitialized memory access
  2879. while handling malformed TrueType fonts later on.
  2880. 2022-01-07 Werner Lemberg <[email protected]>
  2881. * src/sfnt/ttload.c (check_table_dir): Initialize `table`.
  2882. Reported as
  2883. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773
  2884. 2022-01-07 Werner Lemberg <[email protected]>
  2885. [sfnt] Avoid 'runtime error: applying zero offset to null pointer'.
  2886. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_byte_aligned): Exit early if
  2887. `line` is NULL.
  2888. 2022-01-07 Werner Lemberg <[email protected]>
  2889. [autofit, pshinter] Use `FT_OFFSET`.
  2890. This avoids
  2891. ```
  2892. runtime error: applying zero offset to null pointer
  2893. ```
  2894. warnings of clang's undefined behaviour sanitizer.
  2895. * src/autofit/afcjk.c (af_cjk_hints_link_segments,
  2896. af_cjk_hints_compute_edges, af_cjk_hints_compute_blue_edges,
  2897. af_cjk_hint_edges, af_cjk_align_edge_points): Do it.
  2898. * src/autofit/afhints.c (af_glyph_hints_align_edge_points,
  2899. af_glyph_hints_align_strong_points): Ditto.
  2900. * src/autofit/aflatin.c (af_latin_metrics_init_widths,
  2901. af_latin_hints_link_segments, af_latin_hints_compute_edges,
  2902. af_latin_hints_compute_blue_edges, af_latin_hint_edges): Ditto.
  2903. * src/pshinter/pshalgo.c (psh_hint_table_init): Ditto.
  2904. 2022-01-06 Ben Wagner <[email protected]>
  2905. [truetype] Reset localpoints when varying cvt.
  2906. When iterating over the cvt tuples and reading in the points it is necessary
  2907. to set all of `localpoints`, `points`, and `point_count` in all cases. The
  2908. existing code did not reset `localpoints` to `NULL` when there were no
  2909. private point numbers. If the previous tuple did have private point numbers
  2910. and set `localpoints` to `ALL_POINTS` this would not be cleared and the
  2911. wrong branch would be taken later, leading to possible heap buffer overflow.
  2912. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Reset `localpoints` to `NULL`
  2913. when it isn't valid.
  2914. Fixes: https://crbug.com/1284742
  2915. 2022-01-02 Werner Lemberg <[email protected]>
  2916. * builds/unix/configure.raw: Restore `SYSTEM_ZLIB` variable.
  2917. This was accidentally removed with commit 93ebcbd0 almost eight years ago.
  2918. 2021-12-27 Alexander Borsuk <[email protected]>
  2919. Fix warnings for CMake Unity builds.
  2920. * src/cache/ftcbasic.c (FT_COMPONENT): Undefine macro before redefinition.
  2921. * src/smooth/ftgrays.c (TRUNC, FRACT): Ditto.
  2922. 2021-12-18 Alexander Borsuk <[email protected]>
  2923. Clang-Tidy warning fixes.
  2924. * src/base/ftobjs.c (FT_Get_Paint): Operator has equivalent nested operands.
  2925. * src/bdf/bdflib.c (_bdf_add_property): Value stored to `fp` is never read.
  2926. * src/sdf/ftbsdf.c (bsdf_init_distance_map): Value stored to `pixel` is
  2927. never read.
  2928. * src/sdf/ftsdf.c (split_sdf_shape): Value stored to `error` is never read.
  2929. 2021-12-17 Eli Schwartz <[email protected]>
  2930. * meson.build: Optimize lookup for `python3` program.
  2931. The python module's `find_installation` method is intended to provide
  2932. routines for compiling and installing python modules into the
  2933. `site-packages` directory. It does a couple of slow things, including run
  2934. an introspection command to scrape sysconfig info from the detected
  2935. interpreter, which are not needed for the sole use case of invoking the
  2936. found installation as an executable.
  2937. Furthermore, when invoked without the name or path of a python binary, it is
  2938. hardcoded to always look for `python3` corresponding to the interpreter
  2939. meson itself uses to run. So using `find_installation` did not even allow
  2940. detecting `python2` as a fallback.
  2941. Instead, switch to a simple `find_program` lookup that finishes as soon as
  2942. the program is found.
  2943. 2021-12-17 Eli Schwartz <[email protected]>
  2944. * builds/meson/*.py: Fix name of python executable for auxiliary scripts.
  2945. The previous change to check the return code of `run_command` invocations
  2946. caused the CI to fail. Although most scripts used `python_exe` as the
  2947. program command, the script to determine the project version did not.
  2948. But, all scripts used `python` as the shebang, and this is not available on
  2949. all systems. Particularly Debian does not provide a `python` command,
  2950. though `python3` does exist. This meant that formerly the version number
  2951. was lacking, and now the build simply fails.
  2952. Instead, rely on `python3` since it is guaranteed to exist when running
  2953. meson, and `python2` is end of life anyway.
  2954. 2021-12-17 Eli Schwartz <[email protected]>
  2955. * meson.build: Check the return value of `run_command`.
  2956. By default, errors are not checked and a command that is somehow broken will
  2957. just capture incorrect output (likely an empty string). Current development
  2958. versions of meson now raise a warning for this implicit behavior, and advise
  2959. explicitly setting the `check:` keyword argumend to determine whether a
  2960. failing return code should be considered an error.
  2961. Since none of the commands in this project are expected to fail, mark them
  2962. as required to succeed.
  2963. 2021-12-13 Alexei Podtelezhnikov <[email protected]>
  2964. [truetype] Upstream the hdmx binary search.
  2965. * src/truetype/ttobjs.h (TT_SizeRec): Add `widthp` for the hdmx
  2966. widths.
  2967. * src/truetype/ttobjs.c (tt_size_reset): Initialize `widthp` even
  2968. though it might never be used by the interpreter.
  2969. * src/truetype/ttgload.c (tt_loader_init): Avoid repeated searches
  2970. in the hdmx table.
  2971. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  2972. [truetype] Reset the IUP-called flags for each subglyph.
  2973. This fixes fall-out from 7809007a5b88b15, where the composite
  2974. accents were no longer hinted.
  2975. * src/truetype/ttgload.c (ttloader_init): Move the IUP-called flag
  2976. initialization from here...
  2977. * src/truetype/ttinterp.c (TT_Run_Context): ... to here.
  2978. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  2979. [truetype] Binary search through the `hdmx` records.
  2980. The `hdmx` table is supposed to be sorted by ppem size, which
  2981. enables binary search. We also drop the check for the sufficient
  2982. length of the record because it is now enforced when the table
  2983. is loaded.
  2984. * include/freetype/internal/tttypes.h (TT_FaceRec): Store the `hdmx`
  2985. record pointers sorted by ppem instead of ppem's themselves.
  2986. * src/truetype/ttpload.c (tt_face_load_hdmx): Prudently sort records.
  2987. (tt_face_get_device_metrics): Implement binary search to retrieve
  2988. advances.
  2989. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  2990. [truetype] Honor FT_LOAD_ADVANCE_ONLY if `hdmx` is usable.
  2991. This simply shortcuts the glyph loading if FT_LOAD_ADVANCE_ONLY
  2992. is specified by FT_Get_Advances and the `hdmx` data are located.
  2993. Particularly, the classic v35 interpreter or "verified" ClearType
  2994. fonts might see 100x speed up in retrieving the hdmx cache.
  2995. * src/truetype/ttgload.c (TT_Load_Glyph): Insert the shortcut.
  2996. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  2997. [truetype] Initialize the loader with `hdmx` data.
  2998. The `hdmx` matching can be done before the glyph is loaded.
  2999. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add a field.
  3000. * src/truetype/ttgload.c (compute_glyph_metrics): Relocate the `hdmx`
  3001. code from here...
  3002. (tt_loader_init): ... to here, before the glyph is loaded.
  3003. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  3004. [truetype] Relocate subpixel flag setting.
  3005. `TT_RunIns` is too busy to deal with subpixel flags. It is better
  3006. to set them in `tt_loader_init`, which is executed before each
  3007. glyph program.
  3008. * src/truetype/ttinterp.c (TT_RunIns): Move the flag setting from
  3009. here...
  3010. * src/truetype/ttgload.c (tt_loader_init): ... to here.
  3011. 2021-12-12 Alexei Podtelezhnikov <[email protected]>
  3012. [truetype] Limit INSTCTRL appication within specs.
  3013. * src/truetype/ttinterp.c (Ins_INSTCTRL): Limit its global effects
  3014. to the CVT program and local effects to the glyph program.
  3015. This also fixes an Infinality buglet. The `ignore_x_mode` should be
  3016. locally unset by the glyph program.
  3017. 2021-12-09 Ben Wagner <[email protected]>
  3018. [bdf] Fix use of uninitialized value.
  3019. In _bdf_readstream if the data contained no newline then the buffer
  3020. would continue to grow and uninitialized data read until either the
  3021. uninitialized data contained a newline or the buffer reached its
  3022. maxiumum size. The assumption was that the line was always too long and
  3023. the buffer had been filled, however this case can also happen when there
  3024. is not enough data to fill the buffer.
  3025. Correct this by properly setting the cursor to the end of the available
  3026. data, which may be different from the end of the buffer. This may still
  3027. result in one extra allocation, but only on malformed fonts.
  3028. * src/bdf/bdflib.c (_bfd_readstream): Correctly update cursor. Remove
  3029. unread set of `avail`.
  3030. Bug: https://lists.nongnu.org/archive/html/freetype-devel/2021-12/msg00001.html
  3031. 2021-12-07 Alexei Podtelezhnikov <[email protected]>
  3032. [truetype] Reduce Infinality footprint again.
  3033. * src/truetype/ttgload.c (compute_glyph_metrics): Streamline and
  3034. prioritize the Infinality checks to use `hdmx`.
  3035. 2021-12-07 Cameron Cawley <[email protected]>
  3036. [builds/windows] Guard some non-ancient API.
  3037. We can support Windows 98 and NT 4.0 in principle...
  3038. * builds/windows/ftdebug.c, builds/windows/ftsystem.c: Check for the
  3039. ancient SDK using _WIN32_WINDOWS, _WIN32_WCE, or _WIN32_WINNT.
  3040. 2021-12-07 Cameron Cawley <[email protected]>
  3041. * builds/windows/visualc/freetype.vcproj: Add missing file.
  3042. 2021-12-02 Werner Lemberg <[email protected]>
  3043. * Version 2.11.1 released.
  3044. ==========================
  3045. Tag sources with `VER-2-11-1'.
  3046. * docs/VERSION.TXT: Add entry for version 2.11.1.
  3047. * docs/CHANGES, docs/release: Updated.
  3048. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  3049. builds/windows/visualc/index.html, builds/windows/visualce/index.html,
  3050. builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
  3051. docs/freetype-config.1: s/2.11.0/2.11.1/, s/2110/2111/.
  3052. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  3053. * builds/unix/configure.raw (version_info): Set to 24:1:18.
  3054. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  3055. * builds/toplevel.mk (version_tag, CHANGELOG_SCRIPT): New variables.
  3056. (do-dist): Generate `ChangeLog` file with all commits since last release.
  3057. 2021-11-30 Alexei Podtelezhnikov <[email protected]>
  3058. [builds/windows] Improve debugging.
  3059. * builds/windows/ftdebug.c (FT_Message, FT_Panic): Buffer output
  3060. and call `OutputDebugStringA` only if `IsDebuggerPresent`.
  3061. [_WIN32_WCE] (OutputDebugStringA): Implement the missing API.
  3062. 2021-11-29 Seigo Nonaka <[email protected]>
  3063. * src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android.
  3064. Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in
  3065. Android).
  3066. 2021-11-28 Alexei Podtelezhnikov <[email protected]>
  3067. * builds/windows/vc2010/freetype.vcxproj (DlgCopy): Minor tweak.
  3068. 2021-11-26 Alexei Podtelezhnikov <[email protected]>
  3069. * src/truetype/ttpload.c (tt_face_load_hdmx): Added comments.
  3070. 2021-11-26 Alexei Podtelezhnikov <[email protected]>
  3071. [truetype] Quietly reject out-of-spec `hdmx` tables.
  3072. The `hdmx` table is optional and can be safely rejected without
  3073. an error if it does not follow specifications. The record size
  3074. must be equal to the number of glyphs + 2 + 32-bit padding.
  3075. * src/truetype/ttpload.c (tt_face_load_hdmx): Thoroughly check
  3076. the record size and improve tracing.
  3077. 2021-11-23 Alexei Podtelezhnikov <[email protected]>
  3078. [truetype] Partly revert 5b626281.
  3079. Fixes #1118.
  3080. * src/truetype/ttpload.c (tt_face_load_hdmx): Do not assume that
  3081. `record_size` is rounded even though the records are padded.
  3082. 2021-11-23 Alexei Podtelezhnikov <[email protected]>
  3083. * builds/windows/vc2010/freetype.vcxproj (DlgCopy): Use transforms.
  3084. 2021-11-22 Werner Lemberg <[email protected]>
  3085. Update `CHANGES` files, other minor whitespace and documentation issues.
  3086. 2021-11-21 Werner Lemberg <[email protected]>
  3087. formats.txt: Add info about WOFF and WOFF2.
  3088. 2021-11-21 Werner Lemberg <[email protected]>
  3089. meson.build: Initialize `common_ldflags`.
  3090. 2021-11-21 Lukas Oberhuber <@lukaso>
  3091. * meson.build: Fix compatibility version on MacOS.
  3092. Fixes #1117.
  3093. 2021-11-21 Werner Lemberg <[email protected]>
  3094. * src/truetype/ttinterp.c (Ins_MD): Avoid `FT_ABS`.
  3095. Reported as
  3096. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38562
  3097. 2021-11-20 Alexei Podtelezhnikov <[email protected]>
  3098. * include/freetype/fttypes.h (FT_MAKE_TAG): Remove the same casting.
  3099. 2021-11-20 Werner Lemberg <[email protected]>
  3100. [gxvalid] Fix minor compilation warning.
  3101. * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup): Declare
  3102. as static.
  3103. 2021-11-20 Werner Lemberg <[email protected]>
  3104. [smooth] Fix stand-alone compilation.
  3105. * src/smooth/ftgrays.c (FT_Trace_Enable, FT_Trace_Disable)[STANDALONE_]:
  3106. Define.
  3107. 2021-11-20 Werner Lemberg <[email protected]>
  3108. Avoid undefined left-shifts.
  3109. We really have to use double casts to avoid issues with C's and C++'s
  3110. signedness propagation rules in implicit casts.
  3111. Reported as
  3112. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178
  3113. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182
  3114. * include/freetype/config/public-macros.h (FT_STATIC_CAST,
  3115. FT_REINTERPRET_CAST): Modify macro to take two arguments.
  3116. Update all callers.
  3117. (FT_STATIC_BYTE_CAST): New macro.
  3118. * include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`.
  3119. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
  3120. * include/freetype/fttypes.h (FT_MAKE_TAG): Ditto.
  3121. Use `FT_Tag` for casting.
  3122. * src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed.
  3123. (FT_STATIC_BYTE_CAST): New macro.
  3124. * src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with...
  3125. (FT_STATIC_BYTE_CAST): ... this.
  3126. 2021-11-18 Werner Lemberg <[email protected]>
  3127. Provide C++ versions for public macros with casts.
  3128. Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for
  3129. macros with C-style casts even for system header files; this also affects
  3130. directories included with `-isystem`. While this could be seen as a problem
  3131. with g++, the problem is more a philosophical one: Over the time, C and C++
  3132. diverged more and more, and some features of C are no longer the 'right'
  3133. solution in C++.
  3134. * include/freetype/config/public-macros.h (FT_STATIC_CAST,
  3135. FT_REINTERPRET_CAST): New macros.
  3136. * include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_,
  3137. FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`.
  3138. Correctly handle negative 'signed char' input.
  3139. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
  3140. * include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto.
  3141. * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use
  3142. `FT_REINTERPRET_CAST`.
  3143. * src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro.
  3144. [!STANDALONE]: Include `FT_CONFIG_CONFIG_H`.
  3145. Fixes #1116.
  3146. 2021-11-16 Werner Lemberg <[email protected]>
  3147. Fix clang++ warnings.
  3148. * src/*: Initialize some variables to NULL.
  3149. 2021-11-16 Werner Lemberg <[email protected]>
  3150. [truetype] Updates for the forthcoming OpenType 1.9 standard (2/2).
  3151. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store):
  3152. s/shortDeltaCount/wordDeltaCount/ (as done in the specification, too).
  3153. Recognize new format and reject it for now.
  3154. 2021-11-16 Werner Lemberg <[email protected]>
  3155. [truetype] Updates for the forthcoming OpenType 1.9 standard (1/2).
  3156. This is in preparation for implementing `DeltaSetIndexMap` format 1, which
  3157. is used by `COLR` v1 tables, and which allows 32bit indices.
  3158. https://docs.microsoft.com/en-us/typography/opentype/otspec190/delta/otvarcommonformats_delta.html
  3159. * src/truetype/ttgxvar.h (GX_DeltaSetIdxMapRec): Change type of `mapCount`
  3160. to `FT_ULong`.
  3161. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add argument
  3162. for passing the table size; update caller.
  3163. Implement new format.
  3164. 2021-11-14 Werner Lemberg <[email protected]>
  3165. Fix clang warnings.
  3166. * src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block.
  3167. * src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto.
  3168. * src/smooth/ftgrays.c (gray_convert_glyph): Add cast.
  3169. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast.
  3170. * src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter.
  3171. (parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts.
  3172. 2021-11-13 Dominik Röttsches <[email protected]>
  3173. [sfnt] Avoid undefined shifts in `COLR` v1 paint parsing
  3174. * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Tighten shift
  3175. behavior by using multiplication, mostly using macros from ftcalc.h.
  3176. Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1269168
  3177. 2021-11-13 Alexei Podtelezhnikov <[email protected]>
  3178. [builds/windows] Improve `DlgCopy` target.
  3179. Fixes #1113.
  3180. * builds/windows/vc2010/freetype.vcxproj: Run `DlgCopy` conditionally
  3181. and decouple it from `Build`.
  3182. 2021-11-12 Alexei Podtelezhnikov <[email protected]>
  3183. Explicitly define `FT_MSB` for Clang.
  3184. * include/freetype/internal/ftcalc.h [__clang__] (FT_MSB): Updated.
  3185. 2021-11-10 Alexei Podtelezhnikov <[email protected]>
  3186. * src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization.
  3187. 2021-11-10 Alexei Podtelezhnikov <[email protected]>
  3188. Additional `FT_MSB` macro definitions.
  3189. Better macros for Windoes CE and ARM in general, based on !109
  3190. from metarutaiga.
  3191. * include/freetype/internal/ftcalc.h [_MSC_VER] (FT_MSB): Updated.
  3192. 2021-11-09 Alexei Podtelezhnikov <[email protected]>
  3193. [build/windows] Remove logging from default debug configurations.
  3194. DLG is rather costly for performance and should be used judiciously.
  3195. This removes it from the default configurations but gives an example
  3196. how to enable it using the `UserDefines` property.
  3197. * builds/windows/vc2010/freetype.vcxproj: Hide FT_DEBUG_LOGGING.
  3198. 2021-11-08 Werner Lemberg <[email protected]>
  3199. * src/sfnt/sfobjs.c (sfnt_open_font): Fix typo.
  3200. 2021-11-08 Werner Lemberg <[email protected]>
  3201. * src/gxvalid.*, src/otvalid.*: Fix `-Wformat` warnings.
  3202. 2021-11-08 Werner Lemberg <[email protected]>
  3203. [pshinter] Fix C++ compilation.
  3204. * src/pshinter/pshalgo.c (psh_compute_dir): Fix type of `result`.
  3205. (psh_hint_table_find_strong_points): Add cast.
  3206. 2021-11-08 Werner Lemberg <[email protected]>
  3207. [sfnt] Reduce footprint if WOFF and WOFF2 support is not needed.
  3208. Based on a patch from metarutaiga (MR !106). The gist of this commit is
  3209. that it doesn't make sense to support WOFF without compression (which would
  3210. be only possible in WOFF 1.0 anyway).
  3211. * src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with
  3212. `FT_CONFIG_OPTION_USE_ZLIB` block.
  3213. Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block.
  3214. * src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with
  3215. `FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code.
  3216. * src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c,
  3217. src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks,
  3218. not parts of the code.
  3219. Fixes #1111.
  3220. 2021-11-08 Werner Lemberg <[email protected]>
  3221. [truetype] Make trickyness checks depend on TT_USE_BYTECODE_INTERPRETER.
  3222. Based on a patch from metarutaiga (MR !106).
  3223. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag,
  3224. tt_check_trickyness_family, tt_synth_sfnt_checksum, tt_get_sfnt_checksum,
  3225. tt_check_trickyness_sfnt_ids, tt_check_trickyness): Put functions into a
  3226. `TT_USE_BYTECODE_INTERPRETER` block.
  3227. (tt_face_init): Put trickyness checks into a `TT_USE_BYTECODE_INTERPRETER`
  3228. block.
  3229. Fixes #1111.
  3230. 2021-11-08 Alexei Podtelezhnikov <[email protected]>
  3231. * src/sfnt/ttload.c (tt_face_load_gasp): Fix a type mismatch warning.
  3232. 2021-11-07 Alexei Podtelezhnikov <[email protected]>
  3233. [dlg] Define DLG_STATIC explicitly.
  3234. DLG_STATIC is intended to disable Windows DLL linking attributes.
  3235. It does not hurt to define it explicitly when we wrap DLG code.
  3236. This fixes tons of LNK4286 and C4273 warnings from MSVC if we
  3237. forget to define DLG_STATIC as a compiler option.
  3238. * builds/windows/vc2010/freetype.vcxproj: Remove DLG_STATIC option.
  3239. * src/dlg/dlgwrap.c [FT_DEBUG_LOGGING]: Define DLG_STATIC.
  3240. * include/freetype/internal/ftdebug.h [FT_DEBUG_LOGGING]: Ditto.
  3241. 2021-11-07 Alexei Podtelezhnikov <[email protected]>
  3242. [dlg] Lighten up the inclusions.
  3243. The DLG wrapper needs to know if FT_DEBUG_LOGGING is defined in
  3244. `ftoption.h`. It does not need entire FreeType.
  3245. * src/dlg/dlgwrap.c: Include FT_CONFIG_OPTIONS_H directly.
  3246. 2021-11-07 Alexei Podtelezhnikov <[email protected]>
  3247. [truetype] Avoid some memory zeroing in variations.
  3248. * src/truetype/ttgxvar.c (ft_var_readpackeddeltas, ft_var_load_avar,
  3249. ft_var_load_item_variation_store, ft_var_load_gvar): Use FT_QNEW_ARRAY
  3250. if memory immediately initialized or discarded otherwise.
  3251. 2021-11-05 Jany Belluz <[email protected]>
  3252. [truetype] Fix handling of packed deltas in Variation Fonts.
  3253. * src/truetype/ttgxvar (ft_var_readpackeddeltas): Don't expect the number of
  3254. bytes used to encode the deltas to be higher than the number of encoded
  3255. values. The specification allows a very compact encoding; for example, a
  3256. list of 200 zeros can be encoded with just a couple of bytes.
  3257. We now count the consumed bytes to make sure to not read more than expected.
  3258. 2021-11-04 Jany Belluz <[email protected]>
  3259. [truetype] Fix CVAR handling of tuples for all points.
  3260. * src/truetype/ttgxvar (tt_face_vary_cvt): Function
  3261. `ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets
  3262. `point_count` to value 0. However, the CVAR code was incorrectly expecting
  3263. that `point_count` would be set to match the length of the CVT table.
  3264. 2021-11-04 Jany Belluz <[email protected]>
  3265. * src/truetype/ttgxvar.c: Fix typos in macros that guard CVAR code.
  3266. 2021-11-04 Alexei Podtelezhnikov <[email protected]>
  3267. * docs/INSTALL: Mention Meson and MSBuild more prominently.
  3268. 2021-11-03 Gabor Kertesz <[email protected]>
  3269. [libpng] Update Meson wrap for win-arm64
  3270. 1.6.37-5 released patches for win-arm64 to successfully build
  3271. libpng with Meson:
  3272. https://github.com/mesonbuild/wrapdb/pull/205
  3273. https://github.com/mesonbuild/wrapdb/pull/216
  3274. Updated by the following command:
  3275. meson wrap update libpng
  3276. Tested on win-arm64 and x64.
  3277. 2021-11-03 Dominik Röttsches <[email protected]>
  3278. [sfnt] Clarify `COLR` v1 FT_Paint* format representations
  3279. * include/freetype/ftcolor.h (FT_PaintLinearGradient,
  3280. FT_PaintRadialGradient, FT_PaintSweepGradient, FT_PaintTransform,
  3281. FT_PaintTranslate, FT_PaintScale, FT_PaintRotate, FT_PaintSkew): Clarify
  3282. 16.16 fixed point representation of struct fields.
  3283. * src/sfnt/ttcolr.c (read_paint): Shift coordinates for
  3284. FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient
  3285. accordingly.
  3286. Fixes: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1110
  3287. 2021-11-03 Alexei Podtelezhnikov <[email protected]>
  3288. [builds/windows] Let MSBuild handle DLG copy.
  3289. * builds/windows/vc2010/freetype.vcxproj: Specify DlgCopy target.
  3290. * builds/windows/vc2010/script.bat: Deleted.
  3291. 2021-10-29 Alexei Podtelezhnikov <[email protected]>
  3292. * src/truetype/ttgload.c (load_truetype_glyph): Fix MSVC warning C4312.
  3293. 2021-10-29 Alexei Podtelezhnikov <[email protected]>
  3294. [builds/windows] Separate MSVC linker and librarian.
  3295. MSVC uses LIB for static and LINK for dynamic libraries. They are
  3296. related but the former has much smaller set of options.
  3297. * builds/windows/vc2010/freetype.vcxproj: Updated.
  3298. 2021-10-29 Alexei Podtelezhnikov <[email protected]>
  3299. [builds/windows] Revise MSVC linking optimizations.
  3300. * builds/windows/vc2010/freetype.vcxproj: Optimize DLL linking only.
  3301. * builds/windows/visualc/freetype.dsp: Ditto.
  3302. * builds/windows/visualc/freetype.vcproj: Ditto.
  3303. 2021-10-28 Alexei Podtelezhnikov <[email protected]>
  3304. [woff] Optimize table tagging.
  3305. * include/freetype/internal/wofftypes.h (WOFF_TableRec): Use
  3306. 32-bit tag.
  3307. * src/sfnt/sfwoff.c (woff_open_font): Use 32-bit tag.
  3308. 2021-10-28 Alexei Podtelezhnikov <[email protected]>
  3309. [woff2] Optimize table tagging.
  3310. Fixes #1107.
  3311. * include/freetype/internal/wofftypes.h (WOFF2_TableRec): Use
  3312. 32-bit tag.
  3313. * src/sfnt/sfwoff2.c (compare_tags, find_table, woff2_open_font):
  3314. Use 32-bit tag.
  3315. * src/sfnt/woff2tags.[ch] (woff2_known_tags): Use static storage and
  3316. return 32-bit tag.
  3317. 2021-10-26 Werner Lemberg <[email protected]>
  3318. Formatting.
  3319. 2021-10-26 Ben Wagner <[email protected]>
  3320. [mm] Tolerate missing Blend dictionary entries
  3321. In a Multiple Master font, the Blend dictionary must contain valid
  3322. Private, FontInfo, and FontBBox. The current code will error if any of
  3323. these are present and invalid, but will not error and will provide
  3324. uninitialized data if the Blend dictionary exists but does not contain
  3325. one of these entries. This change reverts to the older behavior of
  3326. treating any missing entries as containing all zero data and not
  3327. returning an error.
  3328. In the future it may be best to keep track of when these are actually
  3329. initialized and error if they are not.
  3330. * src/type1/t1load.c (t1_allocate_blend): Zero initiailize.
  3331. 2021-10-26 Alexei Podtelezhnikov <[email protected]>
  3332. [builds/windows] Add MSVC linker optimazations.
  3333. We continue to build static libraries with statically linked C run-
  3334. time and add options to optimize references.
  3335. * builds/windows/vc2010/freetype.vcxproj: Sort entries, add options.
  3336. 2021-10-23 Alexei Podtelezhnikov <[email protected]>
  3337. * builds/windows/vc2010/freetype.vcxproj: Use MachineARM64.
  3338. 2021-10-22 Alexei Podtelezhnikov <[email protected]>
  3339. [builds/windows] Prioritize x64.
  3340. * builds/windows/vc2010/freetype.sln: Sort entries.
  3341. 2021-10-22 Gabor Kertesz <[email protected]>
  3342. [builds/windows] Add ARM64 platform.
  3343. * builds/windows/vc2010/freetype.sln: Updated
  3344. * builds/windows/vc2010/freetype.vcxproj: Updated.
  3345. * builds/windows/vc2010/freetype.vcxproj.filters: Minor fix.
  3346. 2021-10-21 Ben Wagner <[email protected]>
  3347. [mm] Delay setting blend weight and design position.
  3348. Previously the `blend->weight_vector`, `blend->default_weight_vector`,
  3349. and `blend->design_pos` were set early to allocated but uninitialized
  3350. memory under the assumption that the memory would eventually be
  3351. initialized. However, it is possible that some of the required
  3352. keywords may not actually be present, leaving the memory uninitialized.
  3353. This is different from a present but invalid table, which would produce
  3354. an error.
  3355. Reported as
  3356. https://bugs.chromium.org/p/chromium/issues/detail?id=1261762
  3357. * src/type1/t1load.c (t1_allocate_blend): Remove early allocation and
  3358. initialization.
  3359. (parse_blend_design_positions, parse_weight_vector): Parse into local
  3360. and assign to blend if valid.
  3361. (T1_Open_Face): Check that if a blend exists that it has the weight
  3362. vector and design positions.
  3363. 2021-10-21 Ben Wagner <[email protected]>
  3364. [cff] Commit vstore data and regions on allocation.
  3365. The vstore->regionCount and vstore->dataCount were read directly
  3366. from the data. However, vstore->varRegionList and vstore->varData
  3367. would still contain uninitialized entries with uninitialized
  3368. pointers in the event of an error, leading to issues when attempting
  3369. to clean up.
  3370. Reportd as
  3371. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40104
  3372. * src/cff/cffload.c (cff_vstore_load): Read the region and data counts
  3373. into locals and update the vstore counts immediately after each entry
  3374. becomes free-able.
  3375. 2021-10-20 Ben Wagner <[email protected]>
  3376. [sfnt] Delay setting gasp ranges and count until computed.
  3377. Previously, the gasp.numRanges was set and gasp.gaspRanges was
  3378. allocated and assigned before a possible early exit if the frame could
  3379. not be entered. It is also possible that the gaspRanges allocation
  3380. could fail but the numRanges still be set to non-zero. In such cases
  3381. an error would be returned, but the face would have a gasp in an
  3382. inconsistent state which may still be accessed.
  3383. Reported as
  3384. https://bugs.chromium.org/p/chromium/issues/detail?id=1261450
  3385. * src/sfnt/ttload.c (tt_face_load_gasp): Delay setting gasp.numRanges
  3386. and gasp.gaspRanges until after the ranges are initialized.
  3387. 2021-10-20 Ben Wagner <[email protected]>
  3388. [sfnt] Delay setting names and langTags until computed.
  3389. Previously, the table->names and table->langTags fields were created
  3390. pointing to uninitialized memory and an early exit could happen if the
  3391. frame could not be entered. The caller would then be unable to properly
  3392. dispose of the memory as the string fields had not been initialized.
  3393. Reported as
  3394. https://bugs.chromium.org/p/chromium/issues/detail?id=1261343
  3395. * src/sfnt/ttload.c (tt_face_load_name): delay setting table->langTags
  3396. and table->names until after the memory they will point to is fully
  3397. initialized.
  3398. 2021-10-20 Alexei Podtelezhnikov <[email protected]>
  3399. * tests/issue-1063/main.c: s/PATH_MAX/FILENAME_MAX/.
  3400. Closes !97 for Windows by using a standard macro.
  3401. 2021-10-19 Werner Lemberg <[email protected]>
  3402. [bdf, cid, pfr, winfonts] Improve rejection of other font formats.
  3403. This is mainly for better diagnostics of malformed fonts.
  3404. * src/bdf/bdflib.c (_bfd_readstream): Stop font format testing if the first
  3405. input line is too long or doesn't end with `\r` or `\n`.
  3406. * src/cid/cidparse.c (cid_parser_new): Don't handle too short input as an
  3407. error but as an unknown format.
  3408. * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
  3409. * src/winfonts/winfnt.c (fnt_font_load, fnt_face_get_dll_font): Ditto.
  3410. 2021-10-19 Alexei Podtelezhnikov <[email protected]>
  3411. [pcf] Zero out the allocated properties.
  3412. Fallout reported as
  3413. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40033
  3414. * src/pcf/pcfread.c (pcf_get_properties): Use FT_NEW_ARRAY and zero
  3415. out `properties` in case of failure.
  3416. 2021-10-18 Werner Lemberg <[email protected]>
  3417. configure: Use string comparison for directory inodes.
  3418. Inode values might be larger than integers supported by the shell.
  3419. Fixes #1105.
  3420. 2021-10-17 Alexei Podtelezhnikov <[email protected]>
  3421. * src/sfnt/ttload.c (tt_face_load_name): NULL-initialize langTag.
  3422. Another attempt to fix fallout reported as
  3423. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40024
  3424. 2021-10-17 Alexei Podtelezhnikov <[email protected]>
  3425. [bdf] Fix up user properties.
  3426. Fallout reported as
  3427. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40027
  3428. * src/bdf/bdflib.c (_bdf_add_property): Cosmetic NULL.
  3429. (bdf_create_property): Limit allocations to customary signed
  3430. FT_Long and NULL-initialize unused storage.
  3431. (bdf_free_font): Do not free unused storage.
  3432. 2021-10-17 Alexei Podtelezhnikov <[email protected]>
  3433. * src/sfnt/ttload.c (tt_face_load_name): Accounting fix.
  3434. Fallout reported as
  3435. https://crbug.com/40024
  3436. 2021-10-16 Ben Wagner <[email protected]>
  3437. Fix typos in memory macros.
  3438. FT_QNEW_ARRAY and FT_QRENEW_ARRAY were using the non-Q
  3439. FT_MEM_NEW_ARRAY and FT_MEM_RENEW_ARRAY. Change these to use the Q
  3440. versions. Also fix the one issue discovered in tt_face_load_name
  3441. where table->names is created with FT_QNEW_ARRAY but the extra
  3442. string member is not initialized to NULL.
  3443. * include/freetype/internal/ftmemory.h (FT_Q(RE)NEW_ARRAY):
  3444. Use FT_MEM_Q(RE)NEW_ARRAY as needed.
  3445. * src/sfnt/ttload.c (tt_face_load_name): Initialize `entry->string`.
  3446. 2021-10-15 Ben Wagner <[email protected]>
  3447. [truetype] Reload context after re-executing `prep`.
  3448. When a different hinting mode from the current is selected, the `prep` table
  3449. must be re-executed with the new mode. After this happens the context must
  3450. be re-loaded in preparation for the glyph program to be run.
  3451. Fixes #1104.
  3452. * truetype/ttgload.c (tt_loader_init): Add call to `TT_Load_Context`.
  3453. 2021-10-15 Werner Lemberg <[email protected]>
  3454. [truetype] Minor documentation improvements.
  3455. 2021-10-14 Anurag Thakur <[email protected]>
  3456. Add clang build to linux CI
  3457. 2021-10-12 Anurag Thakur <[email protected]>
  3458. CI: Add macOS CI, including a clang build
  3459. 2021-10-12 Alexei Podtelezhnikov <[email protected]>
  3460. * src/cid/cidload.c (parse_fd_array): Protect against trancation.
  3461. 2021-10-12 Alexei Podtelezhnikov <[email protected]>
  3462. [type1] Revert to signed size for binary data.
  3463. Recently introduced and reported as
  3464. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39838
  3465. * src/type1/t1load.c (read_binary_data): Reject negative size.
  3466. (parse_subrs, parse_charstrings): Use customary signed size.
  3467. 2021-10-11 Alexei Podtelezhnikov <[email protected]>
  3468. [psaux] Signedness revisions.
  3469. Unsigned indexes are easier to check.
  3470. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Updated.
  3471. * src/psaux/psintrp.c (cf2_interpT2CharString): Ditto.
  3472. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
  3473. * src/type1/t1load.c (read_binary_data): Ditto.
  3474. 2021-10-11 Alexei Podtelezhnikov <[email protected]>
  3475. [cid] Signedness revisions.
  3476. Unsigned checks are simpler.
  3477. * include/freetype/t1tables.h (CID_FaceInfoRec): Change to unsignd
  3478. `num_dicts`.
  3479. * src/cid/cidparse.h (CID_Parser): Change to unsigned `num_dict`.
  3480. * src/cid/cidgload.c (cid_load_glyph): Updated.
  3481. * src/cid/cidload.c (cid_load_keyword, parse_fd_array,
  3482. parse_expansion_factor, parse_font_name, cid_read_subrs,
  3483. cid_face_open): Updated.
  3484. * src/cid/cidobjs.c (cid_face_done): Updated.
  3485. * src/cid/cidparse.c (cid_parser_new): Updated.
  3486. 2021-10-09 Alexei Podtelezhnikov <[email protected]>
  3487. * src/cid/cidload.c (cid_face_open): Streamline CIDCount check.
  3488. 2021-10-08 Alexei Podtelezhnikov <[email protected]>
  3489. * src/cid/cidload.c (cid_face_open): Streamline SubrCount check.
  3490. 2021-10-08 Alexei Podtelezhnikov <[email protected]>
  3491. * src/cid/cidgload.c (cid_load_glyph): Fortify incremental loading.
  3492. 2021-10-08 Alexei Podtelezhnikov <[email protected]>
  3493. Signedness revisions.
  3494. This eliminates explicit casting by switching to unsigned fields.
  3495. The revisions mostly impact the handling of CID fonts.
  3496. * include/freetype/fttypes.h (FT_Data): Change to unsigned `length`.
  3497. * include/freetype/t1tables.h (CID_FaceDictRec): Ditto for `sd_bytes`.
  3498. (CID_FaceInfoRec): Ditto for `gd_bytes` and `gd_bytes`.
  3499. * include/freetype/internal/tttypes.h (TT_LoaderRec): Ditto for
  3500. `byte_len`.
  3501. * src/cid/cidgload.c (cid_load_glyph): Updated.
  3502. * src/cid/cidload.h (cid_get_offset): Update argument.
  3503. * src/cid/cidload.c (cid_get_offset, cid_read_subrs, cid_face_open):
  3504. Updated.
  3505. * src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data):
  3506. Updated.
  3507. * src/psaux/psft.c (cf2_getT1SeacComponent): Updated.
  3508. * src/truetype/ttgload.c (TT_Process_Composite_Glyph,
  3509. load_truetype_glyph): Updated.
  3510. 2021-10-07 Jan Alexander Steffens (heftig) <[email protected]>
  3511. meson.build (gen_docs): Use `current_source_dir` instead of `source_root`.
  3512. These two are not equal when FreeType is used as a subproject, such as in
  3513. `freetype-demos`. In that case, `source_root` points at the root project,
  3514. causing the docs build to fail.
  3515. 2021-10-05 Alexei Podtelezhnikov <[email protected]>
  3516. * src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround.
  3517. 2021-10-05 Alexei Podtelezhnikov <[email protected]>
  3518. [builds/unix, builds/vms] Standardize `mmap` failure.
  3519. * builds/unix/ftsystem.c (FT_Stream_Open): Check for MAP_FAILED.
  3520. * builds/vms/ftsystem.c (FT_Stream_Open): Ditto.
  3521. This should cover https://savannah.nongnu.org/patch/?5909 as well.
  3522. 2021-10-05 Hugh McMaster <[email protected]>
  3523. autogen.sh: Only copy submodules if building from a git branch.
  3524. `autogen.sh` fails if building from a standard source tarball. Firstly, git
  3525. expects to be called in a git repository, then `copy_submodule_files`
  3526. blindly attempts to copy files.
  3527. Debian, Ubuntu, Linux Mint, and other derivatives all run `autogen.sh`
  3528. before compiling to regenerate build files.
  3529. This patch ensures that various git commands are only called and 'dlg' files
  3530. are only copied if `autogen.sh` is called from a git repository.
  3531. 2021-10-05 Alexei Podtelezhnikov <[email protected]>
  3532. * include/freetype/internal/ftgloadr.h: Add missing header.
  3533. Noticed by Jouk Jansen.
  3534. 2021-10-05 Alexei Podtelezhnikov <[email protected]>
  3535. [pshinter] Additional clean-ups.
  3536. * src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code.
  3537. * src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields.
  3538. 2021-10-04 Alexei Podtelezhnikov <[email protected]>
  3539. [pshinter] More convenient direction definition.
  3540. It is easier to check directions using flags than integer values.
  3541. * src/pshinter/pshalgo.h (PSH_Dir): Redefine directions.
  3542. (PSH_PointRec): Use them as an enum type.
  3543. * src/pshinter/pshalgo.c (psh_compute_dir): Modify return type.
  3544. (psh_glyph_init, psh_hint_table_find_strong_points,
  3545. psh_glyph_find_blue_points): Update users.
  3546. 2021-10-04 Alexei Podtelezhnikov <[email protected]>
  3547. [pshinter] Remove unnecessary check.
  3548. * src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not
  3549. check if direction is defined before checking how.
  3550. 2021-10-02 AnuthaDev <[email protected]>
  3551. CI: Hardcode meson version to fix build failure on windows
  3552. 2021-10-01 Alexei Podtelezhnikov <[email protected]>
  3553. Additional `FT_MSB` macro definitions.
  3554. * include/freetype/internal/ftcalc.h [__DECC,_CRAYC]: Use builtins
  3555. and intrinsics.
  3556. 2021-10-01 Alexei Podtelezhnikov <[email protected]>
  3557. * src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
  3558. 2021-09-30 Alexei Podtelezhnikov <[email protected]>
  3559. * src/tools/apinames.c: Facilitate OpenVMS linker options.
  3560. 2021-09-29 Alexei Podtelezhnikov <[email protected]>
  3561. * src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.
  3562. 2021-09-25 Alexei Podtelezhnikov <[email protected]>
  3563. [builds/unix] Do not use autoconf SIZEOF.
  3564. * builds/unix/ftconfig.h.in [FT_USE_AUTOCONF_SIZEOF_TYPES]: Removed.
  3565. * builds/unix/configure.raw: Remove AC_CHECK_SIZEOF and update.
  3566. After this commit, autoconf builds will fully rely on <limits.h>
  3567. rather than falling back on it if AC_CHECK_SIZEOF failed for some
  3568. reason. There is a risk that misconfigured cross-compilation might
  3569. have wrong headers. Note that Meson and CMake builds always relied on
  3570. <limits.h> for sizes and availability of integer types.
  3571. 2021-09-25 Alexei Podtelezhnikov <[email protected]>
  3572. Propagate sign when reading OFF3.
  3573. Signed 24-bit values are extremely rare. FreeType only reads them in
  3574. PFR fonts with bitmap strikes conditionally. They have not been seen
  3575. in the known fonts. That is why this bug could never be discovered.
  3576. `FT_FRAME_OFF3` propagates sign correctly.
  3577. * include/freetype/internal/ftstream.h (FT_PEEK_OFF3, FT_PEEK_OFF3_LE):
  3578. Propagate sign into 32-bit value.
  3579. (FT_GET_OFF3, FT_READ_OFF3): Needed fixing but removed as unused.
  3580. 2021-09-25 Alexei Podtelezhnikov <[email protected]>
  3581. [bdf] Simplify comment collection or lack thereof.
  3582. BDF comments are neither actually collected nor retrieved. There is
  3583. no need to be fancy with delimiters.
  3584. * src/bdf/bdflib.c (_add_bdf_comment): Delimit comments with zeros...
  3585. (bdf_load_font): ...and do not null-terminate comments additionally.
  3586. (_bdf_parse_glyphs): Check if comments are kept, which they are not.
  3587. (_bdf_parse_start): Minor clean up.
  3588. 2021-09-24 Alexei Podtelezhnikov <[email protected]>
  3589. Use NULL for pointers only.
  3590. * src/bdf/bdflib.c (*): Code changes.
  3591. * include/freetype/freetype.h: Comments only.
  3592. * src/cff/cffload.c, src/cff/cffobjs.c: Ditto.
  3593. * src/winfonts/winfnt.c: Ditto.
  3594. 2021-09-23 Werner Lemberg <[email protected]>
  3595. Minor documentation fixes and improvements.
  3596. 2021-09-23 Alexei Podtelezhnikov <[email protected]>
  3597. Reference `fopen` in the docs.
  3598. 2021-09-23 Alexei Podtelezhnikov <[email protected]>
  3599. [bdf, pcf] Minor optimization.
  3600. * src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a
  3601. small job.
  3602. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto.
  3603. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment.
  3604. 2021-09-22 Alexei Podtelezhnikov <[email protected]>
  3605. [base] Initialize stream memory earlier.
  3606. With Windows memory management tracking heap, it is important to use
  3607. it during the stream opening fallback. In Unix, the argument is
  3608. unused, but it is better to set it correctly.
  3609. * src/base/ftobjs.c (FT_Stream_New): Set memory before calling
  3610. `FT_Stream_Open`.
  3611. * builds/windows/ftsystem.c, builds/unix/ftsystem.c (FT_Stream_Open,
  3612. ft_close_stream_by_free): Call `ft_alloc` and `ft_free` with proper
  3613. memory argumment.
  3614. 2021-09-22 Alexei Podtelezhnikov <[email protected]>
  3615. [builds/windows] Revert back to `CreateFileA` only.
  3616. Calling `CreateFileW` without making sure that the patname is really
  3617. `wchar_t` is a bad idea and can lead to unpredictable overreads. For
  3618. Windows CE, we impelemnt the missing API.
  3619. Fixes #1098 and !76 again.
  3620. * builds/windows/ftsystem.c (FT_Stream_Open): Call `CreateFileA`.
  3621. [_WIN32_WCE] (CreateFileA, FileSizeEx): Implement missing interfaces.
  3622. 2021-09-21 Alexei Podtelezhnikov <[email protected]>
  3623. * src/bdf/bdflib.c (_bdf_parse_{start,glyphs}): Use appropriate scanner.
  3624. 2021-09-21 Alexei Podtelezhnikov <[email protected]>
  3625. Minor.
  3626. 2021-09-20 Alexei Podtelezhnikov <[email protected]>
  3627. * src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW.
  3628. 2021-09-18 Alexei Podtelezhnikov <[email protected]>
  3629. [cache] Minor clean-ups.
  3630. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Remove parantheses.
  3631. * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
  3632. (FTC_Cache_RemoveFaceID): Remove unnecessary variable.
  3633. 2021-09-17 Alexei Podtelezhnikov <[email protected]>
  3634. [builds/windows] Try both wide and narrow `CreateFile`
  3635. Windows handles wchar_t* UTF-16 and char* ANSI (presently UTF-8)
  3636. filenames using alternative -A and -W API. We'll try them both
  3637. when opening a file. This means that you should not worry about
  3638. about conversions.
  3639. Fixes #1098 and !76.
  3640. * builds/windows/ftsystem.c (FT_Stream_Open): Call alternative
  3641. `CreateFile` in the case of failure.
  3642. 2021-09-17 Edwin Steiner <[email protected]>
  3643. [cff] Explicitly set StandardEncoding or ExpertEncoding offsets.
  3644. Fixes #1097.
  3645. * src/cff/cffload.c (cff_encoding_load): Set special offset values.
  3646. 2021-09-16 Alexei Podtelezhnikov <[email protected]>
  3647. [cache] Miscellaneous clean-ups.
  3648. * src/cache/ftccache.c (ftc_get_top_node_for_hash, FTC_Cache_Clear):
  3649. Remove barely used variables.
  3650. (ftc_cache_add): Adjust casting.
  3651. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove casting.
  3652. * src/cache/ftcsbits.c (ftc_snode_load): Remove casting.
  3653. 2021-09-16 Alexei Podtelezhnikov <[email protected]>
  3654. * src/cff/cffload.c (cff_fd_select_get): Remove casting.
  3655. 2021-09-16 Alexei Podtelezhnikov <[email protected]>
  3656. * src/pcf/pcfread.c (pcf_read_TOC): Remove casting.
  3657. 2021-09-15 Alexei Podtelezhnikov <[email protected]>
  3658. Minor type adjustments.
  3659. * src/cff/cffobjs.c (cff_face_init): Reduce casting.
  3660. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto.
  3661. * src/type1/t1load.c (T1_Set_MM_Design): Ditto.
  3662. 2021-09-15 Alexei Podtelezhnikov <[email protected]>
  3663. Replace boolean allocation macros with MEM ones.
  3664. * src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro.
  3665. * src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto.
  3666. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto.
  3667. * src/cache/ftccache.c (ftc_cache_init): Ditto
  3668. * src/gzip/ftgzip.c (ft_gzip_alloc): Ditto.
  3669. * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
  3670. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
  3671. * src/sfnt/ttload.c (tt_face_load_name): Ditto.
  3672. 2021-09-15 Alexei Podtelezhnikov <[email protected]>
  3673. [cache] Revert to some zeroing.
  3674. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Zero
  3675. `buckets` again to fix some crashes.
  3676. 2021-09-14 Alexei Podtelezhnikov <[email protected]>
  3677. * src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops.
  3678. Fixes fallout from 731d0b685685 reported as
  3679. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685
  3680. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3681. [cff, pshinter] Clean up unsigned counters.
  3682. Loops with unsigned decrement can be reliably stopped when the counter
  3683. wraps around after reaching zero.
  3684. * src/cff/cffload.c (cff_charset_compute_cids): Use unsigned counter.
  3685. * src/pshinter/pshalgo.c (psh_hint_table_activate_mask): Ditto.
  3686. * src/pshinter/pshrec.c (ps_mask_table_merge): Ditto.
  3687. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3688. [bdf, psnames, sfnt] Avoid some memory zeroing.
  3689. * src/bdf/bdfdrivr.c (BDF_Face_Init): Use Q-macro.
  3690. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
  3691. * src/psnames/psmodule.c (src/psnames/psmodule.c): Remove zero.
  3692. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3693. * src/base/ftobjs.c (FT_CMap_New): Revert to zeroing.
  3694. Fixes fallout from c1fa7aa2bc96, reported as
  3695. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38641
  3696. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3697. [truetype] Clean up `exec` initialization.
  3698. * src/truetype/ttinterp.c (Init_Context): Absorbed into...
  3699. (TT_New_Context): ... this function.
  3700. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3701. [truetype] Avoid some memory zeroing.
  3702. * src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro.
  3703. * src/truetype/ttinterp.c (Update_Max): Ditto.
  3704. * src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto.
  3705. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3706. [base] Avoid some memory zeroing.
  3707. * src/base/ftobjs.c (FT_New_Size, FT_CMap_New, FT_CMap_Done,
  3708. ft_open_face_internal, ft_open_face_internal): Use Q-macros.
  3709. 2021-09-13 Alexei Podtelezhnikov <[email protected]>
  3710. [cache, psaux] Remove zeros.
  3711. * src/cache/ftcmru.c (FTC_MruList_New): Remove initialization.
  3712. * src/psaux/psstack.c (cf2_stack_init): Ditto.
  3713. 2021-09-12 Alexei Podtelezhnikov <[email protected]>
  3714. [cache] Avoid some memory zeroing.
  3715. * src/cache/ftcmru.c (FTC_MruList_New): Use Q-macro.
  3716. * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Ditto.
  3717. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Ditto.
  3718. 2021-09-11 Alexei Podtelezhnikov <[email protected]>
  3719. * src/cache/ftcmanag.c (FTC_Manager_New): Add missing zero.
  3720. Fixes fall out from a7b199d081e7.
  3721. 2021-09-10 Alexei Podtelezhnikov <[email protected]>
  3722. [truetype] Tweak `hdmx` checking.
  3723. Fixes #1096.
  3724. * src/truetype/ttpload.c (tt_face_load_hdmx): Account for padding.
  3725. 2021-09-10 Alexei Podtelezhnikov <[email protected]>
  3726. [truetype] Tweak `loca` clamping.
  3727. Fixes #1095.
  3728. * src/truetype/ttpload.c (tt_face_load_loca): Fix up clamping.
  3729. * include/freetype/internal/tttypes.h (TT_Face): Correct docs.
  3730. 2021-09-08 Alexei Podtelezhnikov <[email protected]>
  3731. Fortify memory debugging (cont'd).
  3732. * src/base/ftdbgmem.c (FT_DumpMemory): Check for active debugger.
  3733. (ft_mem_table_destroy): Move `FT_DumpMemory` call from here...
  3734. (ft_mem_debug_done): ... to here.
  3735. 2021-09-08 Alexei Podtelezhnikov <[email protected]>
  3736. Fortify memory debugging.
  3737. These changes are neccessary to properly recover `memory->user` that
  3738. holds the Windows heap handle now.
  3739. * src/base/ftdbgmem.c (ft_mem_debug_init): Handle all table allocations,
  3740. initializations, and sizing instead of...
  3741. (ft_mem_table_new): ... this function removed.
  3742. (ft_mem_debug_done): Better check for the active debugger and free the
  3743. debugger table here instead of...
  3744. (ft_mem_table_destroy): ... here.
  3745. 2021-09-08 Werner Lemberg <[email protected]>
  3746. src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): Set to 600.
  3747. This allows C99 compilation on Solaris.
  3748. Problem reported by Mojca Miklavec.
  3749. 2021-09-07 Alexei Podtelezhnikov <[email protected]>
  3750. [builds/windows] Use native memory allocation API.
  3751. * builds/windows/ftsystem.c (ft_alloc, ft_realloc, ft_free):
  3752. Wrap HeapAlloc, HeapReAlloc, and HeapFree.
  3753. (FT_New_Memory): Set the heap handle.
  3754. 2021-09-07 Werner Lemberg <[email protected]>
  3755. [dlg] Synchronize with upstream.
  3756. * src/dlg/dlgwrap.c (_XOPEN_SOURCE): Set to 600.
  3757. Fixes #1093.
  3758. 2021-09-04 Alexei Podtelezhnikov <[email protected]>
  3759. Cosmetic zeros.
  3760. 2021-09-03 Alexei Podtelezhnikov <[email protected]>
  3761. * src/bdf/bdflib.c (_bdf_parse_start): Keep parser memory.
  3762. 2021-09-03 Werner Lemberg <[email protected]>
  3763. autogen.sh: Make it work with old Solaris 10 shell.
  3764. 2021-09-03 Alexei Podtelezhnikov <[email protected]>
  3765. [smooth, raster, sdf] Clean up initialization calls.
  3766. * src/raster/ftraster.c (ft_black_init): Removed.
  3767. (ft_black_new): Clean up.
  3768. * src/sdf/ftbsdf.c (bsdf_raster_new): Ditto.
  3769. * src/sdf/ftsdf.c (sdf_raster_new): Ditto.
  3770. * src/smooth/ftgrays.c (gray_raster_new): Ditto.
  3771. 2021-09-03 Alexei Podtelezhnikov <[email protected]>
  3772. * src/cache/ftcmanag.c (FTC_Manager_New): Avoid some zeroing.
  3773. 2021-09-03 Alexei Podtelezhnikov <[email protected]>
  3774. * src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling.
  3775. 2021-09-03 Alexei Podtelezhnikov <[email protected]>
  3776. Cosmetic zeros.
  3777. 2021-09-02 Alexei Podtelezhnikov <[email protected]>
  3778. [base] Clean up stream reading.
  3779. * src/base/ftstream.c (FT_Stream_ReadUShort, FT_Stream_ReadUOffset,
  3780. FT_Stream_ReadULong and their LE variants): Remove unnecessary
  3781. initialization and slightly refactor.
  3782. (FT_Stream_GetByte, FT_Stream_ReadByte): Rename to return unsigned
  3783. value and align with sister functions.
  3784. * include/freetype/internal/ftstream.h (FT_Stream_GetByte,
  3785. FT_Stream_ReadByte): Update prototypes and caller macros.
  3786. 2021-09-02 Alexei Podtelezhnikov <[email protected]>
  3787. s/0/NULL/ where appropriate.
  3788. 2021-08-30 Alexei Podtelezhnikov <[email protected]>
  3789. * builds/windows/ftsystem.c (FT_Stream_Open): Fix double-close.
  3790. 2021-08-30 Alexei Podtelezhnikov <[email protected]>
  3791. [smooth] Reduce shift in multiply-shift optimization.
  3792. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift.
  3793. Smaller shifts that keep the division operands of FT_UDIVPREP within
  3794. 32 bits result in slightly faster divisions, which is noticeable in
  3795. the overall performance. The loss of precision is tolerable until the
  3796. divisors (the components dx and dy) approach 32 - PIXEL_BITS. With
  3797. PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size
  3798. that we refuse to render anyway.
  3799. Using `ftbench -p -s60 -t5 -bc timesi.ttf`,
  3800. Before: 8.52 us/op
  3801. After: 8.32 us/op
  3802. 2021-08-28 Werner Lemberg <[email protected]>
  3803. [truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
  3804. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function
  3805. conditionally.
  3806. (tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code.
  3807. Fixes #1091.
  3808. 2021-08-27 Alexei Podtelezhnikov <[email protected]>
  3809. [builds/windows] Revise SSE2 settings.
  3810. * builds/windows/vc2010/freetype.vcxproj [x64]: Remove explicit SSE2.
  3811. * builds/windows/visualc/freetype.vcproj [Win32]: Add explicit SSE2.
  3812. 2021-08-27 Ben Wagner <[email protected]>
  3813. [smooth] Detect SSE2 with MSVC for x86
  3814. MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is
  3815. defined and greater than or equal to 2.
  3816. * src/smooth/ftgrays.c (FT_SSE2): New macro.
  3817. Use it where appropriate.
  3818. 2021-08-26 Alexei Podtelezhnikov <[email protected]>
  3819. Expand comment (cont'd).
  3820. 2021-08-26 Alexei Podtelezhnikov <[email protected]>
  3821. Expand comment.
  3822. 2021-08-24 Alexei Podtelezhnikov <[email protected]>
  3823. * src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy.
  3824. 2021-08-24 suzuki toshiya <[email protected]>
  3825. [truetype] Fix for the family name shorter than 8 characters.
  3826. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
  3827. If the family name to be checked is shorter than 8 characters,
  3828. do not check its syntax.
  3829. 2021-08-24 suzuki toshiya <[email protected]>
  3830. [truetype] Simplify `trick_names'.
  3831. * src/truetype/ttobjs.c (tt_check_trickyness_family): For the case
  3832. that the beginning part of a long tricky family name is already
  3833. registered as another tricky family name, no need to double-check
  3834. the longer one. Such long tricky family names are removed from
  3835. the `trick_names'.
  3836. 2021-08-24 suzuki toshiya <[email protected]>
  3837. [truetype] Add 2 tricky font names.
  3838. Additional fix for the issue #1087.
  3839. * src/truetype/ttobjs.c (tt_check_trickyness_family): Add 2 tricky
  3840. font names reported in #1087.
  3841. 2021-08-24 suzuki toshiya <[email protected]>
  3842. [truetype] New function to skip the randomization tag.
  3843. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
  3844. New function to skip the randomization tag in the names of the
  3845. fonts embedded in a PDF. It is used by tt_check_trickyness_family(),
  3846. to keep from mistaking "DLC" in the randomization tag as a
  3847. tricky font name. See discussion in:
  3848. https://lists.nongnu.org/archive/html/freetype-devel/2021-02/msg00002.html
  3849. For technical detail about the randomization tag, please find
  3850. PDF Reference 5.5.3 "Font Subsets". Thanks to Justyna Wawrzynska
  3851. for pointing out the issue caused by the randomization tag.
  3852. 2021-08-24 suzuki toshiya <[email protected]>
  3853. [truetype] Add checksums for 2 tricky fonts.
  3854. Thanks to Ting717 for providing sample PDF. Fixes #1087.
  3855. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add
  3856. checksums for 2 tricky fonts `DFHei-Bd-WIN-HK-BF' and
  3857. `DFMing-Md-WIN-HK-BF'.
  3858. 2021-08-23 Alexei Podtelezhnikov <[email protected]>
  3859. Whitespace formatting.
  3860. 2021-08-22 Alexei Podtelezhnikov <[email protected]>
  3861. Decorate const arguments.
  3862. * src/base/ftglyph.c (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it.
  3863. * include/freetype/ftglyph.h (FT_Glyph_Transform, FT_Glyph_To_Bitmap):
  3864. Do it.
  3865. 2021-08-21 Alexei Podtelezhnikov <[email protected]>
  3866. [smooth] Clean up the null cell usage.
  3867. Put the null cell at the end of the pool and store it explicitly so that
  3868. we can use it as both the limit and the dumpster.
  3869. * src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and
  3870. remove unnecesary fields.
  3871. (NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`.
  3872. (gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers.
  3873. (gray_convert_glyph_inner): Trace remaining cells (oh well).
  3874. (gray_convert_glyph): Set up `cell_null` and slightly improve the pool
  3875. management.
  3876. 2021-08-20 Alexei Podtelezhnikov <[email protected]>
  3877. [base] Restore quiet no-op rendering of bitmap glyphs.
  3878. Fixes #1076.
  3879. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when
  3880. rendering a bitmap glyph.
  3881. 2021-08-20 Alexei Podtelezhnikov <[email protected]>
  3882. [smooth] Fortify 64-bit algorithm.
  3883. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and
  3884. s/unsigned long/FT_UInt64/.
  3885. (gray_render_line): Adjust a critical variable type.
  3886. 2021-08-20 Carlo Bramini <[email protected]>
  3887. * builds/windows/ftsystem.c (FT_Stream_Open): Support legacy Windows.
  3888. 2021-08-20 Alexei Podtelezhnikov <[email protected]>
  3889. Determine `long long` availability based on its size.
  3890. MSVC, for example, used `long long` even without full C99 support.
  3891. * include/freetype/config/ftstdlib.h: Check if `long long` limits are
  3892. defined in <limits.h>.
  3893. * include/freetype/config/integer-types.h: Check `long long` size and
  3894. use it to typedef FT_Int64.
  3895. 2021-08-19 Dominik Röttsches <[email protected]>
  3896. [sfnt] Fix format expectation for `COLR` v1 ClipList
  3897. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Change ClipList
  3898. format expectation to 1 instead of 0 to make it compliant with the
  3899. latest spec.
  3900. 2021-08-19 Alexei Podtelezhnikov <[email protected]>
  3901. Readily use `long long` as a 64-bit type in C99 mode.
  3902. * include/freetype/config/integer-types.h (FT_INT64):
  3903. FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`.
  3904. 2021-08-19 Alexei Podtelezhnikov <[email protected]>
  3905. Use FT_INT64 instead of FT_LONG64.
  3906. * include/freetype/config/integer-types.h: Remove synonymous FT_LONG64.
  3907. * include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/.
  3908. * src/base/ftcalc.c: Ditto.
  3909. * src/base/fttrigon.c: Ditto.
  3910. * src/smooth/ftgrays.c: Ditto.
  3911. 2021-08-18 Alexei Podtelezhnikov <[email protected]>
  3912. [builds/windows] Do not set CharacterSet for VC++.
  3913. * builds/windows/vc2010/freetype.vcxproj: s/Unicode/NotSet/.
  3914. * builds/windows/visualc/freetype.vcproj: s/"1"/"0"/.
  3915. 2021-08-18 Werner Lemberg <[email protected]>
  3916. * src/sdf/ftsdf.c (get_control_box): Fix compiler warning.
  3917. 2021-08-18 Werner Lemberg <[email protected]>
  3918. [base] Fix ppem size overflow.
  3919. Fixes #1086.
  3920. * src/base/ftobjs.c (FT_Request_Metrics): Add return value.
  3921. Check whether ppem values fit into unsigned short values.
  3922. (FT_Request_Size): Updated.
  3923. * include/freetype/internal/ftobjs.h: Updated.
  3924. * src/cff/cffobjs.c (cff_size_request), src/cid/cidobjs.c
  3925. (cid_size_request), src/truetype/ttdriver.c (tt_size_request),
  3926. src/type1/t1objs.c (T1_Size_Request): Updated.
  3927. 2021-08-18 Alexei Podtelezhnikov <[email protected]>
  3928. * builds/windows/ftsystem.c (FT_Stream_Open): Cast to remove warning.
  3929. 2021-08-18 Alexei Podtelezhnikov <[email protected]>
  3930. * builds/windows/ftsystem.c (FT_Stream_Open): Support UNICODE compilation.
  3931. 2021-08-09 Werner Lemberg <[email protected]>
  3932. * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor fix.
  3933. 2021-08-09 Dominik Röttsches <[email protected]>
  3934. [sfnt] Add missing blend mode 'plus' to 'COLR' v1.
  3935. * include/freetype/ftcolor.h (FT_Composite_Mode): Add missing blend mode
  3936. 'plus' after it was added to the spec.
  3937. 2021-08-08 Werner Lemberg <[email protected]>
  3938. include/freetype/freetype.h (FT_Encoding): Improve documentation.
  3939. Based on a suggestion by Antony Lee <[email protected]>.
  3940. 2021-08-07 Werner Lemberg <[email protected]>
  3941. [smooth] Avoid integer overflow.
  3942. Reported as
  3943. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36243
  3944. * src/smooth/ftgrays.c(ADD_LONG, SUB_LONG, MUL_LONG, NEG_LONG)
  3945. [STANDALONE_]: Removed, unused.
  3946. (ADD_INT) [STANDALONE_]: New macro.
  3947. (FT_INTEGRATE): Use ADD_INT.
  3948. 2021-08-07 Dominik Röttsches <[email protected]>
  3949. [sfnt] Add API for retrieving a 'COLR' v1 'ClipBox' table.
  3950. The optional 'COLR' v1 glyph-specific clip box helps upstream graphics
  3951. libraries allocate a sufficiently large bitmap for a glyph without having to
  3952. traverse the glyph graph for that. See
  3953. https://github.com/googlefonts/colr-gradients-spec/issues/251
  3954. for background on the introduction of this specification change.
  3955. * include/freetype/ftcolor.h (FT_ClipBox): New structure.
  3956. (FT_Get_Color_Glyph_ClipBox): New function declaration.
  3957. * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_ClipBox_Func):
  3958. New function type.
  3959. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Use it.
  3960. * src/base/ftobjs.c (FT_Get_Color_Glyph_ClipBox): New function to link API
  3961. with SFNT implementation.
  3962. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  3963. * src/sfnt/ttcolr.c (Colr): New field `clip_list`.
  3964. (tt_face_load_colr): Parse global clip list offset.
  3965. (tt_face_get_color_glyph_clipbox): New function to find the clip box for a
  3966. glyph id from the clip list array.
  3967. * src/sfnt/ttcolr.h: Updated.
  3968. 2021-08-06 Werner Lemberg <[email protected]>
  3969. [smooth] Fix left shifts of negative numbers.
  3970. Reported as
  3971. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36241
  3972. * src/smooth/ftgrays.c (LEFT_SHIFT): New macro.
  3973. (gray_render_conic) [BEZIER_USE_DDA]: Use it.
  3974. 2021-08-02 Werner Lemberg <[email protected]>
  3975. * meson.build: Fix zlib support.
  3976. This commit synchronizes zlib support with both autotools and cmake: If no
  3977. external zlib is found (or intentionally disabled on the command line), use
  3978. the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without
  3979. modifying `FT_CONFIG_OPTION_USE_ZLIB`.
  3980. Also improve summary output.
  3981. Problem reported by Moazin.
  3982. 2021-08-02 Anuj Verma <[email protected]>
  3983. [sdf] Fix out-of-range-access.
  3984. * src/sdf/ftbsdf.c (first_pass, second_pass): Fix range during forward pass.
  3985. Otherwise the index goes out of range for the last column.
  3986. Fixes issue #1077.
  3987. 2021-08-02 Anuj Verma <[email protected]>
  3988. Fix invalid memory access in `bsdf` rasterizer.
  3989. Do not generate SDF from bitmap if the `FT_GLYPH_OWN_BITMAP` flag is not
  3990. set. In some cases the bitmap buffer is freed but still points to a valid
  3991. address; to handle those cases check the flag before accessing the memory.
  3992. * src/sdf/ftsdfrend.c (ft_bsdf_render): Handle the above case.
  3993. Also, return an error message if the bitmap's rows/pitch is invalid,
  3994. otherwise `slot->buffer` might be assigned to some invalid memory location.
  3995. (ft_sdf_render): Same as above.
  3996. Plus, move the outline back to original state after rasterization and not if
  3997. any error occurs.
  3998. 2021-07-29 Heiko Becker <[email protected]>
  3999. * meson.build: Honor `--includedir` instead of hard-coding 'include'.
  4000. 2021-07-29 Werner Lemberg <[email protected]>
  4001. src/sfnt/ttcolr.c: Minor formatting.
  4002. 2021-07-29 Dominik Röttsches <[email protected]>
  4003. [sfnt] 'COLR' v1 PaintSweepGradient spec update
  4004. * src/sfnt/ttcolr.c (read_paint): PaintSweepGradient follows other
  4005. spec changes and now has the angles specified as F2DOT14, reflect
  4006. that in the implementation.
  4007. * include/freetype/ftcolor.h (FT_PaintSweepGradient): Update
  4008. documentation.
  4009. 2021-07-29 Dominik Röttsches <[email protected]>
  4010. [sfnt] Retrieve affine matrix from offset in 'COLR' v1 parsing.
  4011. * src/sfnt/ttcolr.c (read_paint): Implement spec change where
  4012. affine transform matrix is now referenced by offset instead of
  4013. being placed inline in the PaintTransform table.
  4014. 2021-07-29 Dominik Röttsches <[email protected]>
  4015. [sfnt] 'COLR' v1 PaintSkew related spec updates
  4016. * src/sfnt/ttcolr.c (read_paint): Implement spec changes around
  4017. PaintSkew, PaintSkewAroundCenter. Update parsing to read shorter
  4018. values as changed in the spec.
  4019. * include/freetype/ftcolor.h (FT_PaintSkew): Update documentation.
  4020. 2021-07-29 Dominik Röttsches <[email protected]>
  4021. [sfnt] PaintRotate/PaintRotateAroundCenter spec updates
  4022. * src/sfnt/ttcolr.c (read_paint): Implement spec change where
  4023. PaintRotate and PaintRotateAroundCenter were split for a more
  4024. compact format definition. Update parsing to read shorter values
  4025. as changed in the spec.
  4026. * include/freetype/ftcolor.h (FT_PaintRotate): Update documentation.
  4027. 2021-07-29 Dominik Röttsches <[email protected]>
  4028. [sfnt] 'COLR' v1 PaintTranslate and PaintScale precision
  4029. * src/sfnt/ttcolr.c (read_paint): Implement spec changes in
  4030. PaintTranslate and PaintScale and friends. Update parsing to read
  4031. new shorter values.
  4032. 2021-07-29 AnuthaDev <[email protected]>
  4033. README.git: Add Code of Conduct.
  4034. 2021-07-25 Werner Lemberg <[email protected]>
  4035. ChangeLog housekeeping.
  4036. Archive old `ChangeLog` file.
  4037. We no longer write ChangeLog entries manually; instead, the file will be
  4038. created from commit messages (which should be formatted in GNU's ChangeLog
  4039. style) by a call to
  4040. gitlog-to-changelog --format='%B%n'
  4041. or something similar (this script is part of the 'gnulib' repository).
  4042. 2021-07-24 Werner Lemberg <[email protected]>
  4043. Fix some `cppcheck` warnings.
  4044. * src/bzip2/ftbzip2.c (ft_bzip2_file_skip_output), src/gzip/ftgzip.c
  4045. (ft_gzip_file_skip_output): Reduce scope of `delta`.
  4046. * src/psaux/psintrp.c, src/psaux/psintrp.h (cf2_interpT2CharString): Add
  4047. `const` to `buf` parameter.
  4048. * src/raster/ftraster.c (DelOld): Add `const` to `profile` parameter.
  4049. (Vertical_Sweep_Span): Reduce scope of `target`.
  4050. (FT_Outline_Get_CBox): Reduce scope of `xMin`, `xMax`, `yMin`, `yMax`.
  4051. * src/smooth/ftgrays.c (gray_render_conic): Reduce scope of `split`.
  4052. (gray_sweep, gray_sweep_direct): Reduce scope of `area`.
  4053. * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Reduce scope of
  4054. `temp`.
  4055. 2021-07-24 AnuthaDev <[email protected]>
  4056. * .gitlab-ci.yml: Fixed cmake build, using correct options.
  4057. 2021-07-24 AnuthaDev <[email protected]>
  4058. * CMakeLists.txt: Make `cmake` handle disabled dependencies correctly.
  4059. Include 'CMakeDependentOption'.
  4060. Replace `FT_WITH_XXX` options with `FT_DISABLE_XXX` and `FT_REQUIRE_XXX`
  4061. pairs. Update option logic accordingly.
  4062. Fixes #1066.
  4063. 2021-07-24 Ben Wagner <[email protected]>
  4064. [autofit] Split `afwrtsys.h`.
  4065. The header file `afwrtsys.h` has two distinct functions: to include the
  4066. required writing system headers and also to generate code for each writing
  4067. system. At each current use site only one or the other is used, with
  4068. various macro trickery selecting one or the other. Split this header into
  4069. `afws-decl.h` for the required writing system declarations and `afws-iter.h`
  4070. for iterating over the writing systems to generate code.
  4071. The motivation for this change is that the Visual C++ compiler treats the
  4072. standard include guard idiom like `#pragma once` 'if no non-comment code or
  4073. preprocessor directive comes before or after the standard form of the
  4074. idiom'. It appears to check this after macro expansion, so if
  4075. `WRITING_SYSTEM` expands to empty the bottom of `afwrtsys.h` is empty and
  4076. looks like the standard include guard idiom which is treated like `#pragma
  4077. once`, so subsequent inclusion of `afwrtsys.h` is elided.
  4078. Fixes #1075.
  4079. * src/autofit/afglobal.c (af_writing_system_classes), src/autofit/aftypes.h
  4080. (AF_WritingSystem), src/autofit/rules.mk (AUTOF_DRV_H): Updated.
  4081. * src/autofit/afwrtsys.h: Split into...
  4082. * src/autofit/afws-decl.h, src/autofit/afws-iter.h: New files.