@hxa-rn/react-native-gcanvas 6.0.24-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1280) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +207 -0
  4. package/harmony/gcanvas/LICENSE +21 -0
  5. package/harmony/gcanvas/NOTICE +33 -0
  6. package/harmony/gcanvas/OAT.xml +38 -0
  7. package/harmony/gcanvas/build-profile.json5 +16 -0
  8. package/harmony/gcanvas/consumer-rules.txt +0 -0
  9. package/harmony/gcanvas/hvigorfile.ts +2 -0
  10. package/harmony/gcanvas/index.ets +1 -0
  11. package/harmony/gcanvas/oh-package.json5 +14 -0
  12. package/harmony/gcanvas/src/main/cpp/CMakeLists.txt +126 -0
  13. package/harmony/gcanvas/src/main/cpp/GCanvasEngine.cpp +665 -0
  14. package/harmony/gcanvas/src/main/cpp/GCanvasEngine.h +123 -0
  15. package/harmony/gcanvas/src/main/cpp/GCanvasNapi.cpp +485 -0
  16. package/harmony/gcanvas/src/main/cpp/GCanvasXComponent.cpp +166 -0
  17. package/harmony/gcanvas/src/main/cpp/GcanvasPackage.h +24 -0
  18. package/harmony/gcanvas/src/main/cpp/core/CMakeLists.txt +221 -0
  19. package/harmony/gcanvas/src/main/cpp/core/README.md +1 -0
  20. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/gmanager.cpp +69 -0
  21. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/gmanager.h +34 -0
  22. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/jsc/weexjsc.h +14 -0
  23. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/auto_ptr.h +110 -0
  24. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/i_delete.h +23 -0
  25. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/util/ref_count.h +34 -0
  26. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/GcanvasWeexOhos.cpp +28 -0
  27. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/GcanvasWeexOhos.h +27 -0
  28. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/grenderer.cpp +677 -0
  29. package/harmony/gcanvas/src/main/cpp/core/harmony/3d/view/grenderer.h +127 -0
  30. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/LICENSE.TXT +46 -0
  31. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/README +107 -0
  32. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftconfig.h +51 -0
  33. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftheader.h +836 -0
  34. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftmodule.h +33 -0
  35. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftoption.h +1030 -0
  36. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/ftstdlib.h +185 -0
  37. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/integer-types.h +250 -0
  38. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/mac-support.h +49 -0
  39. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/config/public-macros.h +138 -0
  40. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/freetype.h +5289 -0
  41. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftadvanc.h +188 -0
  42. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbbox.h +101 -0
  43. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbdf.h +212 -0
  44. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbitmap.h +329 -0
  45. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftbzip2.h +102 -0
  46. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcache.h +1087 -0
  47. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftchapters.h +168 -0
  48. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcid.h +167 -0
  49. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftcolor.h +1667 -0
  50. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftdriver.h +1320 -0
  51. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fterrdef.h +283 -0
  52. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fterrors.h +296 -0
  53. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftfntfmt.h +93 -0
  54. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgasp.h +143 -0
  55. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftglyph.h +750 -0
  56. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgxval.h +354 -0
  57. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftgzip.h +151 -0
  58. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftimage.h +1289 -0
  59. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftincrem.h +348 -0
  60. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlcdfil.h +323 -0
  61. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlist.h +296 -0
  62. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlogging.h +184 -0
  63. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftlzw.h +100 -0
  64. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmac.h +289 -0
  65. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmm.h +834 -0
  66. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmodapi.h +807 -0
  67. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftmoderr.h +204 -0
  68. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftotval.h +206 -0
  69. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftoutln.h +588 -0
  70. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftparams.h +218 -0
  71. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftpfr.h +179 -0
  72. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftrender.h +244 -0
  73. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsizes.h +159 -0
  74. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsnames.h +272 -0
  75. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftstroke.h +773 -0
  76. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsynth.h +104 -0
  77. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftsystem.h +350 -0
  78. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fttrigon.h +350 -0
  79. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/fttypes.h +617 -0
  80. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ftwinfnt.h +276 -0
  81. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/autohint.h +234 -0
  82. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/cffotypes.h +107 -0
  83. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/cfftypes.h +416 -0
  84. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/compiler-macros.h +343 -0
  85. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftcalc.h +584 -0
  86. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftdebug.h +442 -0
  87. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftdrv.h +289 -0
  88. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftgloadr.h +147 -0
  89. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/fthash.h +135 -0
  90. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftmemory.h +401 -0
  91. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftmmtypes.h +91 -0
  92. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftobjs.h +1232 -0
  93. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftpsprop.h +47 -0
  94. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftrfork.h +245 -0
  95. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftserv.h +495 -0
  96. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftstream.h +570 -0
  97. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/fttrace.h +173 -0
  98. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/ftvalid.h +160 -0
  99. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/psaux.h +1447 -0
  100. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/pshints.h +699 -0
  101. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svbdf.h +66 -0
  102. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svcfftl.h +90 -0
  103. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svcid.h +69 -0
  104. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svfntfmt.h +55 -0
  105. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svgldict.h +72 -0
  106. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svgxval.h +72 -0
  107. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svkern.h +51 -0
  108. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svmetric.h +131 -0
  109. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svmm.h +214 -0
  110. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svotval.h +55 -0
  111. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpfr.h +65 -0
  112. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpostnm.h +65 -0
  113. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svprop.h +66 -0
  114. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpscmap.h +145 -0
  115. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svpsinfo.h +86 -0
  116. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svsfnt.h +88 -0
  117. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svttcmap.h +90 -0
  118. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svtteng.h +53 -0
  119. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svttglyf.h +56 -0
  120. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/services/svwinfnt.h +50 -0
  121. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/sfnt.h +1099 -0
  122. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/svginterface.h +46 -0
  123. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/t1types.h +307 -0
  124. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/tttypes.h +1747 -0
  125. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/internal/wofftypes.h +312 -0
  126. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/otsvg.h +336 -0
  127. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/t1tables.h +735 -0
  128. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/ttnameid.h +1235 -0
  129. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/tttables.h +856 -0
  130. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/freetype/tttags.h +124 -0
  131. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/include/ft2build.h +42 -0
  132. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.c +779 -0
  133. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.cin +39 -0
  134. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.dat +1121 -0
  135. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.h +429 -0
  136. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afblue.hin +146 -0
  137. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcjk.c +2383 -0
  138. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcjk.h +141 -0
  139. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afcover.h +105 -0
  140. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afdummy.c +77 -0
  141. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afdummy.h +40 -0
  142. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aferrors.h +42 -0
  143. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afglobal.c +513 -0
  144. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afglobal.h +173 -0
  145. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afhints.c +1796 -0
  146. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afhints.h +467 -0
  147. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afindic.c +157 -0
  148. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afindic.h +41 -0
  149. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aflatin.c +3643 -0
  150. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aflatin.h +194 -0
  151. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afloader.c +706 -0
  152. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afloader.h +91 -0
  153. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afmodule.c +527 -0
  154. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afmodule.h +55 -0
  155. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afranges.c +1072 -0
  156. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afranges.h +47 -0
  157. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afscript.h +408 -0
  158. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afshaper.c +690 -0
  159. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afshaper.h +71 -0
  160. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afstyles.h +487 -0
  161. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/aftypes.h +511 -0
  162. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afws-decl.h +33 -0
  163. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/afws-iter.h +31 -0
  164. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/autofit.c +35 -0
  165. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/ft-hb.c +115 -0
  166. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/ft-hb.h +48 -0
  167. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/module.mk +23 -0
  168. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/autofit/rules.mk +88 -0
  169. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftadvanc.c +174 -0
  170. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbase.c +41 -0
  171. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbase.h +82 -0
  172. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbbox.c +542 -0
  173. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbdf.c +90 -0
  174. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftbitmap.c +1144 -0
  175. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcalc.c +1126 -0
  176. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcid.c +117 -0
  177. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftcolor.c +156 -0
  178. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftdbgmem.c +971 -0
  179. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftdebug.c +644 -0
  180. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fterrors.c +45 -0
  181. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftfntfmt.c +54 -0
  182. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftfstype.c +61 -0
  183. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgasp.c +60 -0
  184. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgloadr.c +383 -0
  185. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftglyph.c +911 -0
  186. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftgxval.c +141 -0
  187. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fthash.c +338 -0
  188. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftinit.c +263 -0
  189. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftlcdfil.c +437 -0
  190. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftmac.c +1099 -0
  191. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftmm.c +704 -0
  192. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftobjs.c +5917 -0
  193. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftotval.c +90 -0
  194. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftoutln.c +1120 -0
  195. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpatent.c +50 -0
  196. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpfr.c +152 -0
  197. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftpsprop.c +284 -0
  198. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftrfork.c +934 -0
  199. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsnames.c +185 -0
  200. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftstream.c +872 -0
  201. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftstroke.c +2403 -0
  202. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsynth.c +180 -0
  203. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftsystem.c +338 -0
  204. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fttrigon.c +517 -0
  205. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/fttype1.c +126 -0
  206. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftutil.c +442 -0
  207. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftver.rc +61 -0
  208. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/ftwinfnt.c +52 -0
  209. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/md5.c +291 -0
  210. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/md5.h +45 -0
  211. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/base/rules.mk +108 -0
  212. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/README +152 -0
  213. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdf.c +34 -0
  214. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdf.h +253 -0
  215. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdfdrivr.c +1013 -0
  216. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdfdrivr.h +72 -0
  217. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdferror.h +45 -0
  218. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/bdflib.c +2378 -0
  219. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/module.mk +34 -0
  220. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bdf/rules.mk +84 -0
  221. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bzip2/ftbzip2.c +535 -0
  222. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/bzip2/rules.mk +64 -0
  223. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcache.c +31 -0
  224. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcbasic.c +598 -0
  225. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccache.c +584 -0
  226. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccache.h +359 -0
  227. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccback.h +85 -0
  228. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftccmap.c +323 -0
  229. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcerror.h +42 -0
  230. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcglyph.c +204 -0
  231. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcglyph.h +314 -0
  232. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcimage.c +158 -0
  233. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcimage.h +106 -0
  234. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmanag.c +677 -0
  235. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmanag.h +175 -0
  236. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmru.c +341 -0
  237. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcmru.h +242 -0
  238. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcsbits.c +413 -0
  239. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/ftcsbits.h +91 -0
  240. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cache/rules.mk +85 -0
  241. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cff.c +28 -0
  242. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffcmap.c +230 -0
  243. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffcmap.h +67 -0
  244. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffdrivr.c +1263 -0
  245. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffdrivr.h +35 -0
  246. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cfferrs.h +42 -0
  247. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffgload.c +762 -0
  248. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffgload.h +62 -0
  249. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffload.c +2570 -0
  250. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffload.h +124 -0
  251. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffobjs.c +1175 -0
  252. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffobjs.h +84 -0
  253. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffparse.c +1550 -0
  254. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cffparse.h +144 -0
  255. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/cfftoken.h +150 -0
  256. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/module.mk +23 -0
  257. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cff/rules.mk +75 -0
  258. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/ciderrs.h +41 -0
  259. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidgload.c +618 -0
  260. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidgload.h +58 -0
  261. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidload.c +937 -0
  262. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidload.h +52 -0
  263. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidobjs.c +543 -0
  264. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidobjs.h +154 -0
  265. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidparse.c +311 -0
  266. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidparse.h +130 -0
  267. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidriver.c +274 -0
  268. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidriver.h +36 -0
  269. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/cidtoken.h +115 -0
  270. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/module.mk +23 -0
  271. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/rules.mk +73 -0
  272. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/cid/type1cid.c +28 -0
  273. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/dlg/dlgwrap.c +32 -0
  274. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/dlg/rules.mk +70 -0
  275. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/README +532 -0
  276. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvalid.c +46 -0
  277. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvalid.h +107 -0
  278. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvbsln.c +334 -0
  279. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvcommn.c +1747 -0
  280. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvcommn.h +581 -0
  281. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxverror.h +51 -0
  282. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfeat.c +339 -0
  283. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfeat.h +173 -0
  284. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvfgen.c +484 -0
  285. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvjust.c +721 -0
  286. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvkern.c +920 -0
  287. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvlcar.c +224 -0
  288. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmod.c +288 -0
  289. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmod.h +46 -0
  290. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort.c +301 -0
  291. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort.h +99 -0
  292. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort0.c +152 -0
  293. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort1.c +260 -0
  294. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort2.c +312 -0
  295. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort4.c +126 -0
  296. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmort5.c +234 -0
  297. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx.c +199 -0
  298. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx.h +73 -0
  299. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx0.c +112 -0
  300. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx1.c +278 -0
  301. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx2.c +331 -0
  302. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx4.c +56 -0
  303. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvmorx5.c +226 -0
  304. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvopbd.c +218 -0
  305. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvprop.c +330 -0
  306. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/gxvtrak.c +288 -0
  307. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/module.mk +23 -0
  308. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gxvalid/rules.mk +98 -0
  309. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/README.freetype +22 -0
  310. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/adler32.c +168 -0
  311. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/crc32.c +1061 -0
  312. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/crc32.h +9446 -0
  313. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/ftgzip.c +805 -0
  314. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/ftzconf.h +551 -0
  315. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/gzguts.h +218 -0
  316. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffast.c +320 -0
  317. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffast.h +11 -0
  318. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inffixed.h +94 -0
  319. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inflate.c +1534 -0
  320. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inflate.h +131 -0
  321. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inftrees.c +299 -0
  322. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/inftrees.h +67 -0
  323. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/patches/freetype-zlib.diff +451 -0
  324. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/rules.mk +81 -0
  325. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zlib.h +1972 -0
  326. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zutil.c +305 -0
  327. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/gzip/zutil.h +281 -0
  328. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftlzw.c +415 -0
  329. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftzopen.c +429 -0
  330. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/ftzopen.h +174 -0
  331. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/lzw/rules.mk +72 -0
  332. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/module.mk +23 -0
  333. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvalid.c +31 -0
  334. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvalid.h +77 -0
  335. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvbase.c +345 -0
  336. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvcommn.c +1099 -0
  337. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvcommn.h +468 -0
  338. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otverror.h +42 -0
  339. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgdef.c +303 -0
  340. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgpos.c +1051 -0
  341. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgpos.h +36 -0
  342. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvgsub.c +627 -0
  343. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvjstf.c +259 -0
  344. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmath.c +453 -0
  345. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmod.c +281 -0
  346. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/otvmod.h +38 -0
  347. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/otvalid/rules.mk +81 -0
  348. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/README +96 -0
  349. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/module.mk +34 -0
  350. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcf.c +35 -0
  351. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcf.h +251 -0
  352. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfdrivr.c +836 -0
  353. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfdrivr.h +44 -0
  354. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcferror.h +41 -0
  355. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfread.c +1731 -0
  356. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfread.h +44 -0
  357. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfutil.c +119 -0
  358. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/pcfutil.h +55 -0
  359. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pcf/rules.mk +82 -0
  360. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/module.mk +23 -0
  361. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfr.c +29 -0
  362. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrcmap.c +188 -0
  363. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrcmap.h +45 -0
  364. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrdrivr.c +212 -0
  365. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrdrivr.h +36 -0
  366. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrerror.h +41 -0
  367. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrgload.c +849 -0
  368. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrgload.h +49 -0
  369. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrload.c +1062 -0
  370. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrload.h +123 -0
  371. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrobjs.c +603 -0
  372. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrobjs.h +96 -0
  373. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrsbit.c +813 -0
  374. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrsbit.h +37 -0
  375. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/pfrtypes.h +331 -0
  376. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pfr/rules.mk +76 -0
  377. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/afmparse.c +1094 -0
  378. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/afmparse.h +88 -0
  379. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/cffdecode.c +2411 -0
  380. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/cffdecode.h +63 -0
  381. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/module.mk +23 -0
  382. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psarrst.c +240 -0
  383. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psarrst.h +99 -0
  384. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psaux.c +40 -0
  385. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxerr.h +42 -0
  386. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxmod.c +190 -0
  387. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psauxmod.h +60 -0
  388. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psblues.c +571 -0
  389. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psblues.h +185 -0
  390. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psconv.c +610 -0
  391. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psconv.h +70 -0
  392. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pserror.c +52 -0
  393. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pserror.h +120 -0
  394. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfixed.h +94 -0
  395. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfont.c +566 -0
  396. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psfont.h +134 -0
  397. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psft.c +895 -0
  398. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psft.h +167 -0
  399. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psglue.h +144 -0
  400. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pshints.c +1952 -0
  401. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pshints.h +288 -0
  402. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psintrp.c +3050 -0
  403. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psintrp.h +83 -0
  404. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psobjs.c +2560 -0
  405. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psobjs.h +312 -0
  406. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psread.c +112 -0
  407. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psread.h +68 -0
  408. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psstack.c +329 -0
  409. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/psstack.h +122 -0
  410. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/pstypes.h +77 -0
  411. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/rules.mk +89 -0
  412. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1cmap.c +393 -0
  413. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1cmap.h +104 -0
  414. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1decode.c +2159 -0
  415. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psaux/t1decode.h +73 -0
  416. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/module.mk +23 -0
  417. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshalgo.c +2191 -0
  418. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshalgo.h +233 -0
  419. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshglob.c +795 -0
  420. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshglob.h +196 -0
  421. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshinter.c +27 -0
  422. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshmod.c +125 -0
  423. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshmod.h +38 -0
  424. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshnterr.h +41 -0
  425. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshrec.c +1224 -0
  426. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/pshrec.h +171 -0
  427. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/pshinter/rules.mk +75 -0
  428. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/module.mk +23 -0
  429. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psmodule.c +621 -0
  430. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psmodule.h +37 -0
  431. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psnamerr.h +42 -0
  432. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/psnames.c +24 -0
  433. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/pstables.h +4238 -0
  434. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/psnames/rules.mk +73 -0
  435. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftmisc.h +118 -0
  436. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftraster.c +2738 -0
  437. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftraster.h +47 -0
  438. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftrend1.c +209 -0
  439. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/ftrend1.h +37 -0
  440. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/module.mk +23 -0
  441. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/raster.c +25 -0
  442. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/rasterrs.h +42 -0
  443. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/raster/rules.mk +72 -0
  444. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftbsdf.c +1350 -0
  445. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdf.c +3932 -0
  446. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdf.h +97 -0
  447. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfcommon.c +104 -0
  448. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfcommon.h +140 -0
  449. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdferrs.h +37 -0
  450. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfrend.c +603 -0
  451. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/ftsdfrend.h +118 -0
  452. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/module.mk +29 -0
  453. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/rules.mk +78 -0
  454. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sdf/sdf.c +29 -0
  455. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/module.mk +23 -0
  456. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/pngshim.c +474 -0
  457. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/pngshim.h +50 -0
  458. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/rules.mk +87 -0
  459. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfdriver.c +1384 -0
  460. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfdriver.h +35 -0
  461. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sferrors.h +41 -0
  462. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfnt.c +41 -0
  463. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfobjs.c +1552 -0
  464. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfobjs.h +58 -0
  465. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff.c +426 -0
  466. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff.h +43 -0
  467. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff2.c +2380 -0
  468. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/sfwoff2.h +78 -0
  469. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttbdf.c +257 -0
  470. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttbdf.h +49 -0
  471. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmap.c +3902 -0
  472. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmap.h +126 -0
  473. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcmapc.h +56 -0
  474. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcolr.c +1923 -0
  475. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcolr.h +83 -0
  476. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcpal.c +310 -0
  477. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttcpal.h +48 -0
  478. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttgpos.c +598 -0
  479. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttgpos.h +53 -0
  480. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttkern.c +317 -0
  481. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttkern.h +51 -0
  482. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttload.c +1496 -0
  483. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttload.h +111 -0
  484. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttmtx.c +338 -0
  485. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttmtx.h +54 -0
  486. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttpost.c +484 -0
  487. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttpost.h +46 -0
  488. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsbit.c +1685 -0
  489. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsbit.h +62 -0
  490. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsvg.c +413 -0
  491. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/ttsvg.h +43 -0
  492. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/woff2tags.c +119 -0
  493. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/sfnt/woff2tags.h +41 -0
  494. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftgrays.c +2149 -0
  495. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftgrays.h +57 -0
  496. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmerrs.h +42 -0
  497. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmooth.c +605 -0
  498. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/ftsmooth.h +37 -0
  499. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/module.mk +23 -0
  500. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/rules.mk +73 -0
  501. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/smooth/smooth.c +25 -0
  502. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/ftsvg.c +355 -0
  503. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/ftsvg.h +35 -0
  504. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/module.mk +23 -0
  505. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/rules.mk +70 -0
  506. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/svg.c +24 -0
  507. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/svg/svgtypes.h +42 -0
  508. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/afblue.pl +551 -0
  509. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/apinames.c +556 -0
  510. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/chktrcmp.py +119 -0
  511. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/cordic.py +32 -0
  512. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/Makefile +45 -0
  513. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/README +69 -0
  514. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/ftrandom/ftrandom.c +720 -0
  515. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/glnames.py +5533 -0
  516. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/make_distribution_archives.py +208 -0
  517. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/no-copyright +66 -0
  518. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_afm.c +156 -0
  519. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_bbox.c +187 -0
  520. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/test_trig.c +257 -0
  521. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/update-copyright +14 -0
  522. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/update-copyright-year +157 -0
  523. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/tools/vms_shorten_symbol.c +250 -0
  524. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/module.mk +23 -0
  525. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/rules.mk +75 -0
  526. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/truetype.c +29 -0
  527. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttdriver.c +704 -0
  528. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttdriver.h +35 -0
  529. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/tterrors.h +42 -0
  530. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgload.c +2740 -0
  531. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgload.h +61 -0
  532. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgxvar.c +4594 -0
  533. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttgxvar.h +453 -0
  534. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttinterp.c +7751 -0
  535. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttinterp.h +465 -0
  536. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttobjs.c +1543 -0
  537. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttobjs.h +426 -0
  538. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttpload.c +665 -0
  539. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/truetype/ttpload.h +74 -0
  540. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/module.mk +23 -0
  541. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/rules.mk +76 -0
  542. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1afm.c +413 -0
  543. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1afm.h +53 -0
  544. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1driver.c +807 -0
  545. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1driver.h +35 -0
  546. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1errors.h +41 -0
  547. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1gload.c +606 -0
  548. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1gload.h +52 -0
  549. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1load.c +2755 -0
  550. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1load.h +126 -0
  551. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1objs.c +655 -0
  552. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1objs.h +160 -0
  553. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1parse.c +487 -0
  554. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1parse.h +137 -0
  555. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/t1tokens.h +143 -0
  556. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type1/type1.c +29 -0
  557. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/module.mk +23 -0
  558. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/rules.mk +73 -0
  559. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42drivr.c +248 -0
  560. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42drivr.h +36 -0
  561. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42error.h +41 -0
  562. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42objs.c +698 -0
  563. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42objs.h +123 -0
  564. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42parse.c +1351 -0
  565. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42parse.h +91 -0
  566. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/t42types.h +56 -0
  567. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/type42/type42.c +26 -0
  568. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/fnterrs.h +42 -0
  569. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/module.mk +23 -0
  570. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/rules.mk +68 -0
  571. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/winfnt.c +1219 -0
  572. package/harmony/gcanvas/src/main/cpp/core/harmony/freetype/src/winfonts/winfnt.h +164 -0
  573. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/.appveyor.yml +69 -0
  574. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/.travis.yml +41 -0
  575. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ANNOUNCE +55 -0
  576. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/AUTHORS +46 -0
  577. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/CHANGES +6111 -0
  578. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/CMakeLists.txt +1042 -0
  579. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/INSTALL +465 -0
  580. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/LICENSE +134 -0
  581. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/Makefile.am +392 -0
  582. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/Makefile.in +2420 -0
  583. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/README +183 -0
  584. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/TODO +23 -0
  585. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/TRADEMARK +8 -0
  586. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/aclocal.m4 +1196 -0
  587. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/arm_init.c +136 -0
  588. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/filter_neon.S +253 -0
  589. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/filter_neon_intrinsics.c +402 -0
  590. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/arm/palette_neon_intrinsics.c +149 -0
  591. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/autogen.sh +225 -0
  592. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_autotools.sh +95 -0
  593. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_cmake.sh +127 -0
  594. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ci/ci_legacy.sh +116 -0
  595. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/compile +348 -0
  596. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.guess +1476 -0
  597. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.h.in +126 -0
  598. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/config.sub +1801 -0
  599. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/configure +16116 -0
  600. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/configure.ac +532 -0
  601. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/README.txt +5 -0
  602. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/README +83 -0
  603. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/android-ndk.c +39 -0
  604. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/linux-auxv.c +120 -0
  605. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/arm-neon/linux.c +161 -0
  606. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/README +49 -0
  607. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/pngcp.dfa +57 -0
  608. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/read.dfa +58 -0
  609. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/s_read.dfa +35 -0
  610. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/s_write.dfa +33 -0
  611. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/simple.dfa +36 -0
  612. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/conftest/write.dfa +45 -0
  613. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/README.txt +24 -0
  614. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/iccfrompng.c +185 -0
  615. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/pngpixel.c +371 -0
  616. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/pngtopng.c +98 -0
  617. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/examples/simpleover.c +648 -0
  618. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/COPYING +340 -0
  619. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/LICENSE +50 -0
  620. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.mingw32 +131 -0
  621. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.sgi +105 -0
  622. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.unx +134 -0
  623. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/Makefile.w32 +114 -0
  624. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/README +186 -0
  625. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/makevms.com +132 -0
  626. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng.c +323 -0
  627. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng.h +88 -0
  628. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng2.c +521 -0
  629. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readpng2.h +116 -0
  630. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/readppm.c +188 -0
  631. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng-win.c +735 -0
  632. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng-x.c +911 -0
  633. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng2-win.c +1261 -0
  634. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/rpng2-x.c +2143 -0
  635. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/toucan.png +0 -0
  636. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/wpng.c +865 -0
  637. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/writepng.c +401 -0
  638. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/gregbook/writepng.h +133 -0
  639. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/fakepng.c +65 -0
  640. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/gentests.sh +100 -0
  641. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/makepng.c +1948 -0
  642. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngimage.c +1722 -0
  643. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngstest-errors.h +165 -0
  644. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngstest.c +3832 -0
  645. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngunknown.c +1305 -0
  646. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/pngvalid.c +12279 -0
  647. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/readpng.c +114 -0
  648. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/tarith.c +1011 -0
  649. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/libtests/timepng.c +607 -0
  650. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/mips-msa/README +83 -0
  651. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/mips-msa/linux.c +67 -0
  652. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/Dockerfile +25 -0
  653. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/README.txt +37 -0
  654. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/build.sh +51 -0
  655. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc +209 -0
  656. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/libpng_read_fuzzer.options +2 -0
  657. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/oss-fuzz/png.dict +39 -0
  658. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/README +5 -0
  659. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/README +10 -0
  660. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/pngusr.dfa +40 -0
  661. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/decoder/pngusr.h +23 -0
  662. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/README +10 -0
  663. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/pngusr.dfa +39 -0
  664. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/encoder/pngusr.h +23 -0
  665. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/README +15 -0
  666. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/pngusr.dfa +40 -0
  667. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminim/preader/pngusr.h +23 -0
  668. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/CHANGES.txt +13 -0
  669. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/CMakeLists.txt +34 -0
  670. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/LICENSE.txt +22 -0
  671. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/README.txt +120 -0
  672. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/makevms.com +92 -0
  673. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.bat +41 -0
  674. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.c +427 -0
  675. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/png2pnm.sh +42 -0
  676. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pngminus.bat +4 -0
  677. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pngminus.sh +5 -0
  678. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.bat +41 -0
  679. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.c +620 -0
  680. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngminus/pnm2png.sh +42 -0
  681. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/README +107 -0
  682. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/bad_interlace_conversions.txt +9 -0
  683. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g01.png +0 -0
  684. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g02.png +0 -0
  685. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g04.png +0 -0
  686. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g08.png +0 -0
  687. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn0g16.png +0 -0
  688. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn2c08.png +0 -0
  689. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn2c16.png +0 -0
  690. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p01.png +0 -0
  691. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p02.png +0 -0
  692. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p04.png +0 -0
  693. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn3p08.png +0 -0
  694. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn4a08.png +0 -0
  695. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn4a16.png +0 -0
  696. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn6a08.png +0 -0
  697. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/basn6a16.png +0 -0
  698. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g01.png +0 -0
  699. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g02.png +0 -0
  700. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn0g04.png +0 -0
  701. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn2c16.png +0 -0
  702. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbbn3p08.png +0 -0
  703. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbgn2c16.png +0 -0
  704. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbgn3p08.png +0 -0
  705. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbrn2c08.png +0 -0
  706. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbwn0g16.png +0 -0
  707. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbwn3p08.png +0 -0
  708. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftbyn3p08.png +0 -0
  709. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n0g08.png +0 -0
  710. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n2c08.png +0 -0
  711. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp0n3p08.png +0 -0
  712. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ftp1n3p08.png +0 -0
  713. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn0g08.png +0 -0
  714. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn0g16.png +0 -0
  715. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn2c08.png +0 -0
  716. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn2c16.png +0 -0
  717. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn3p08.png +0 -0
  718. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn4a08.png +0 -0
  719. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn4a16.png +0 -0
  720. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn6a08.png +0 -0
  721. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/ibasn6a16.png +0 -0
  722. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbbn2c16.png +0 -0
  723. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbbn3p08.png +0 -0
  724. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbgn2c16.png +0 -0
  725. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbgn3p08.png +0 -0
  726. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbrn2c08.png +0 -0
  727. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbwn0g16.png +0 -0
  728. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbwn3p08.png +0 -0
  729. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftbyn3p08.png +0 -0
  730. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n0g08.png +0 -0
  731. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n2c08.png +0 -0
  732. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp0n3p08.png +0 -0
  733. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/iftp1n3p08.png +0 -0
  734. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/README +2 -0
  735. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g01.png +0 -0
  736. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g02.png +0 -0
  737. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn0g04.png +0 -0
  738. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p01.png +0 -0
  739. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p02.png +0 -0
  740. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/ibasn3p04.png +0 -0
  741. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g01.png +0 -0
  742. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g02.png +0 -0
  743. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/pngsuite/interlaced/iftbbn0g04.png +0 -0
  744. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/README +81 -0
  745. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/linux.c +57 -0
  746. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/powerpc-vsx/linux_aux.c +34 -0
  747. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/bad_iCCP.png +0 -0
  748. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/badadler.png +0 -0
  749. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/badcrc.png +0 -0
  750. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/empty_ancillary_chunks.png +0 -0
  751. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_IDAT.png +0 -0
  752. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_bKGD_chunk.png +0 -0
  753. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_cHRM_chunk.png +0 -0
  754. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_eXIf_chunk.png +0 -0
  755. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_gAMA_chunk.png +0 -0
  756. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_hIST_chunk.png +0 -0
  757. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_iCCP_chunk.png +0 -0
  758. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_iTXt_chunk.png +0 -0
  759. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_juNK_unsafe_to_copy.png +0 -0
  760. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_juNk_safe_to_copy.png +0 -0
  761. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_pCAL_chunk.png +0 -0
  762. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_pHYs_chunk.png +0 -0
  763. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sCAL_chunk.png +0 -0
  764. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sPLT_chunk.png +0 -0
  765. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sRGB_chunk.png +0 -0
  766. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_sTER_chunk.png +0 -0
  767. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_tEXt_chunk.png +0 -0
  768. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_tIME_chunk.png +0 -0
  769. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/crashers/huge_zTXt_chunk.png +0 -0
  770. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-1.8-tRNS.png +0 -0
  771. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-1.8.png +0 -0
  772. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-linear-tRNS.png +0 -0
  773. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-linear.png +0 -0
  774. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-sRGB-tRNS.png +0 -0
  775. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-sRGB.png +0 -0
  776. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1-tRNS.png +0 -0
  777. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-1.png +0 -0
  778. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-1.8-tRNS.png +0 -0
  779. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-1.8.png +0 -0
  780. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-linear-tRNS.png +0 -0
  781. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-linear.png +0 -0
  782. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-sRGB-tRNS.png +0 -0
  783. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-sRGB.png +0 -0
  784. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16-tRNS.png +0 -0
  785. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-16.png +0 -0
  786. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-1.8-tRNS.png +0 -0
  787. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-1.8.png +0 -0
  788. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-linear-tRNS.png +0 -0
  789. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-linear.png +0 -0
  790. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-sRGB-tRNS.png +0 -0
  791. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-sRGB.png +0 -0
  792. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2-tRNS.png +0 -0
  793. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-2.png +0 -0
  794. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-1.8-tRNS.png +0 -0
  795. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-1.8.png +0 -0
  796. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-linear-tRNS.png +0 -0
  797. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-linear.png +0 -0
  798. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-sRGB-tRNS.png +0 -0
  799. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-sRGB.png +0 -0
  800. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4-tRNS.png +0 -0
  801. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-4.png +0 -0
  802. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-1.8-tRNS.png +0 -0
  803. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-1.8.png +0 -0
  804. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-linear-tRNS.png +0 -0
  805. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-linear.png +0 -0
  806. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-sRGB-tRNS.png +0 -0
  807. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-sRGB.png +0 -0
  808. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8-tRNS.png +0 -0
  809. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-8.png +0 -0
  810. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-1.8.png +0 -0
  811. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-linear.png +0 -0
  812. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16-sRGB.png +0 -0
  813. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-16.png +0 -0
  814. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-1.8.png +0 -0
  815. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-linear.png +0 -0
  816. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8-sRGB.png +0 -0
  817. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/gray-alpha-8.png +0 -0
  818. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/makepngs.sh +94 -0
  819. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-1.8-tRNS.png +0 -0
  820. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-1.8.png +0 -0
  821. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-linear-tRNS.png +0 -0
  822. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-linear.png +0 -0
  823. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-sRGB-tRNS.png +0 -0
  824. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-sRGB.png +0 -0
  825. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1-tRNS.png +0 -0
  826. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-1.png +0 -0
  827. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-1.8-tRNS.png +0 -0
  828. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-1.8.png +0 -0
  829. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-linear-tRNS.png +0 -0
  830. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-linear.png +0 -0
  831. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-sRGB-tRNS.png +0 -0
  832. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-sRGB.png +0 -0
  833. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2-tRNS.png +0 -0
  834. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-2.png +0 -0
  835. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-1.8-tRNS.png +0 -0
  836. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-1.8.png +0 -0
  837. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-linear-tRNS.png +0 -0
  838. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-linear.png +0 -0
  839. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-sRGB-tRNS.png +0 -0
  840. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-sRGB.png +0 -0
  841. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4-tRNS.png +0 -0
  842. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-4.png +0 -0
  843. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-1.8-tRNS.png +0 -0
  844. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-1.8.png +0 -0
  845. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-linear-tRNS.png +0 -0
  846. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-linear.png +0 -0
  847. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-sRGB-tRNS.png +0 -0
  848. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-sRGB.png +0 -0
  849. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8-tRNS.png +0 -0
  850. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/palette-8.png +0 -0
  851. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-1.8-tRNS.png +0 -0
  852. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-1.8.png +0 -0
  853. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-linear-tRNS.png +0 -0
  854. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-linear.png +0 -0
  855. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-sRGB-tRNS.png +0 -0
  856. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-sRGB.png +0 -0
  857. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16-tRNS.png +0 -0
  858. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-16.png +0 -0
  859. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-1.8-tRNS.png +0 -0
  860. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-1.8.png +0 -0
  861. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-linear-tRNS.png +0 -0
  862. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-linear.png +0 -0
  863. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-sRGB-tRNS.png +0 -0
  864. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-sRGB.png +0 -0
  865. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8-tRNS.png +0 -0
  866. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-8.png +0 -0
  867. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-1.8.png +0 -0
  868. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-linear.png +0 -0
  869. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16-sRGB.png +0 -0
  870. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-16.png +0 -0
  871. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-1.8.png +0 -0
  872. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-linear.png +0 -0
  873. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8-sRGB.png +0 -0
  874. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/testpngs/rgb-alpha-8.png +0 -0
  875. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/README.txt +27 -0
  876. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/checksum-icc.c +102 -0
  877. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/chkfmt +144 -0
  878. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/cvtcolor.c +188 -0
  879. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/genpng.c +881 -0
  880. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/intgamma.sh +110 -0
  881. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/makesRGB.c +430 -0
  882. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/png-fix-itxt.c +164 -0
  883. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/pngcp.c +2453 -0
  884. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/pngfix.c +4049 -0
  885. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/reindent +25 -0
  886. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/tools/sRGB.h +48 -0
  887. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/PngFile.c +454 -0
  888. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/PngFile.h +30 -0
  889. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/README.txt +61 -0
  890. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.c +978 -0
  891. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.dsp +147 -0
  892. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.dsw +29 -0
  893. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.ico +0 -0
  894. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.png +0 -0
  895. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/VisualPng.rc +152 -0
  896. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/cexcept.h +248 -0
  897. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/contrib/visupng/resource.h +23 -0
  898. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/depcomp +791 -0
  899. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/example.c +1041 -0
  900. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/install-sh +518 -0
  901. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/intel/filter_sse2_intrinsics.c +391 -0
  902. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/intel/intel_init.c +52 -0
  903. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng-config.in +127 -0
  904. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng-manual.txt +5409 -0
  905. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng.3 +6052 -0
  906. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpng.pc.in +12 -0
  907. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/libpngpf.3 +24 -0
  908. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/ltmain.sh +11147 -0
  909. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/mips/filter_msa_intrinsics.c +808 -0
  910. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/mips/mips_init.c +130 -0
  911. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/missing +215 -0
  912. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.5 +84 -0
  913. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.c +4607 -0
  914. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/png.h +3247 -0
  915. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngbar.jpg +0 -0
  916. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngbar.png +0 -0
  917. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngconf.h +623 -0
  918. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngdebug.h +153 -0
  919. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngerror.c +963 -0
  920. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngget.c +1249 -0
  921. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pnginfo.h +267 -0
  922. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pnglibconf.h +219 -0
  923. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngmem.c +284 -0
  924. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngnow.png +0 -0
  925. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngpread.c +1096 -0
  926. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngpriv.h +2152 -0
  927. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngread.c +4225 -0
  928. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrio.c +120 -0
  929. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrtran.c +5044 -0
  930. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngrutil.c +4678 -0
  931. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngset.c +1802 -0
  932. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngstruct.h +489 -0
  933. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtest.c +2158 -0
  934. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtest.png +0 -0
  935. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngtrans.c +864 -0
  936. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngusr.dfa +14 -0
  937. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwio.c +168 -0
  938. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwrite.c +2390 -0
  939. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwtran.c +575 -0
  940. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/pngwutil.c +2781 -0
  941. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/powerpc/filter_vsx_intrinsics.c +768 -0
  942. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/powerpc/powerpc_init.c +126 -0
  943. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/libpng.tgt +383 -0
  944. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/libpng.wpj +112 -0
  945. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngconfig.mak +160 -0
  946. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngstest.tgt +219 -0
  947. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngtest.tgt +179 -0
  948. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/owatcom/pngvalid.tgt +210 -0
  949. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/PRJ0041.mak +21 -0
  950. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/README.txt +58 -0
  951. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/README_zlib.txt +44 -0
  952. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/libpng.sln +60 -0
  953. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/libpng.vcproj +419 -0
  954. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/pngtest.vcproj +267 -0
  955. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/visualc71/zlib.vcproj +391 -0
  956. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/README.txt +87 -0
  957. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/libpng/libpng.vcxproj +234 -0
  958. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/pnglibconf/pnglibconf.vcxproj +61 -0
  959. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/vstudio.sln +109 -0
  960. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/zlib/zlib.vcxproj +175 -0
  961. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/projects/vstudio/zlib.props +57 -0
  962. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/README.txt +83 -0
  963. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/SCOPTIONS.ppc +7 -0
  964. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/checksym.awk +173 -0
  965. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/descrip.mms +47 -0
  966. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/dfn.awk +203 -0
  967. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/genchk.cmake.in +37 -0
  968. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/genout.cmake.in +105 -0
  969. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/gensrc.cmake.in +138 -0
  970. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/intprefix.c +22 -0
  971. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng-config-body.in +96 -0
  972. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng-config-head.in +24 -0
  973. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libpng.pc.in +10 -0
  974. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/libtool.m4 +8369 -0
  975. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltoptions.m4 +437 -0
  976. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltsugar.m4 +124 -0
  977. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/ltversion.m4 +23 -0
  978. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/lt~obsolete.m4 +99 -0
  979. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/macro.lst +3 -0
  980. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.32sunu +241 -0
  981. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.64sunu +241 -0
  982. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.acorn +57 -0
  983. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.aix +116 -0
  984. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.amiga +58 -0
  985. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.atari +71 -0
  986. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.bc32 +158 -0
  987. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.beos +222 -0
  988. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.cegcc +116 -0
  989. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.clang +87 -0
  990. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.darwin +222 -0
  991. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.dec +210 -0
  992. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.dj2 +72 -0
  993. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.freebsd +66 -0
  994. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.gcc +87 -0
  995. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hp64 +228 -0
  996. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hpgcc +225 -0
  997. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.hpux +226 -0
  998. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.ibmc +90 -0
  999. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.intel +118 -0
  1000. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.linux +240 -0
  1001. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.linux-opt +258 -0
  1002. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.mips +100 -0
  1003. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.msys +199 -0
  1004. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.netbsd +55 -0
  1005. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.openbsd +86 -0
  1006. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sco +223 -0
  1007. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sggcc +233 -0
  1008. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sgi +234 -0
  1009. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.so9 +244 -0
  1010. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.solaris +240 -0
  1011. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.std +133 -0
  1012. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.sunos +112 -0
  1013. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makefile.vcwin32 +112 -0
  1014. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/makevms.com +142 -0
  1015. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/options.awk +898 -0
  1016. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.dfa +920 -0
  1017. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.h.prebuilt +219 -0
  1018. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pnglibconf.mak +55 -0
  1019. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/pngwin.rc +112 -0
  1020. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/prefix.c +24 -0
  1021. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/smakefile.ppc +34 -0
  1022. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/sym.c +15 -0
  1023. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/symbols.c +58 -0
  1024. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/symbols.def +255 -0
  1025. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/test.cmake.in +31 -0
  1026. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/scripts/vers.c +19 -0
  1027. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/test-driver +148 -0
  1028. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngimage-full +2 -0
  1029. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngimage-quick +2 -0
  1030. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-1.8 +2 -0
  1031. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-1.8-alpha +2 -0
  1032. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-linear +2 -0
  1033. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-linear-alpha +2 -0
  1034. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-none +2 -0
  1035. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-none-alpha +2 -0
  1036. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-sRGB +2 -0
  1037. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngstest-sRGB-alpha +2 -0
  1038. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngtest-all +16 -0
  1039. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-IDAT +2 -0
  1040. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-discard +2 -0
  1041. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-if-safe +2 -0
  1042. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-sAPI +2 -0
  1043. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-sTER +2 -0
  1044. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-save +2 -0
  1045. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngunknown-vpAg +2 -0
  1046. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-16-to-8 +2 -0
  1047. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-alpha-mode +2 -0
  1048. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-background +2 -0
  1049. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-alpha-mode +2 -0
  1050. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-background +2 -0
  1051. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-expand16-transform +2 -0
  1052. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-sbit +2 -0
  1053. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-threshold +2 -0
  1054. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-gamma-transform +2 -0
  1055. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-interlace-standard +2 -0
  1056. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-size +2 -0
  1057. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-progressive-standard +2 -0
  1058. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-standard +2 -0
  1059. package/harmony/gcanvas/src/main/cpp/core/harmony/libpng/tests/pngvalid-transform +2 -0
  1060. package/harmony/gcanvas/src/main/cpp/core/harmony/manager/GCanvasManagerOhos.cpp +50 -0
  1061. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/AutoPtr.h +99 -0
  1062. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/IDelete.h +25 -0
  1063. package/harmony/gcanvas/src/main/cpp/core/harmony/memory/RefCount.h +55 -0
  1064. package/harmony/gcanvas/src/main/cpp/core/harmony/png/IPngCoder.h +38 -0
  1065. package/harmony/gcanvas/src/main/cpp/core/harmony/png/LodePngCoder.cpp +101 -0
  1066. package/harmony/gcanvas/src/main/cpp/core/harmony/png/LodePngCoder.h +40 -0
  1067. package/harmony/gcanvas/src/main/cpp/core/harmony/png/PngLoader.cpp +114 -0
  1068. package/harmony/gcanvas/src/main/cpp/core/harmony/png/PngLoader.h +53 -0
  1069. package/harmony/gcanvas/src/main/cpp/core/harmony/png/thirdparty/lodepng.c +6292 -0
  1070. package/harmony/gcanvas/src/main/cpp/core/harmony/png/thirdparty/lodepng.h +1890 -0
  1071. package/harmony/gcanvas/src/main/cpp/core/src/GCanvas.cpp +89 -0
  1072. package/harmony/gcanvas/src/main/cpp/core/src/GCanvas.hpp +45 -0
  1073. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasManager.cpp +158 -0
  1074. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasManager.h +56 -0
  1075. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasWeex.cpp +1925 -0
  1076. package/harmony/gcanvas/src/main/cpp/core/src/GCanvasWeex.hpp +335 -0
  1077. package/harmony/gcanvas/src/main/cpp/core/src/RNCGCanvasBridge.h +225 -0
  1078. package/harmony/gcanvas/src/main/cpp/core/src/export.h +29 -0
  1079. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvas2dContext.cpp +2366 -0
  1080. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvas2dContext.h +449 -0
  1081. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvasState.cpp +189 -0
  1082. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GCanvasState.h +83 -0
  1083. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GContext2dType.h +68 -0
  1084. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GConvert.cpp +476 -0
  1085. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GConvert.h +25 -0
  1086. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFillStyle.h +191 -0
  1087. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontManager.h +110 -0
  1088. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontStyle.cpp +149 -0
  1089. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFontStyle.h +94 -0
  1090. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFrameBufferObject.cpp +226 -0
  1091. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GFrameBufferObject.h +116 -0
  1092. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGL.h +45 -0
  1093. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGlyphCache.cpp +106 -0
  1094. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GGlyphCache.h +159 -0
  1095. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPath.cpp +1213 -0
  1096. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPath.h +115 -0
  1097. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GPoint.h +117 -0
  1098. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShader.cpp +346 -0
  1099. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShader.h +360 -0
  1100. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShaderManager.cpp +140 -0
  1101. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GShaderManager.h +38 -0
  1102. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GStrSeparator.cpp +84 -0
  1103. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GStrSeparator.h +31 -0
  1104. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTextDefine.h +34 -0
  1105. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTexture.cpp +327 -0
  1106. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTexture.h +133 -0
  1107. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTransform.h +163 -0
  1108. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTreemap.cpp +61 -0
  1109. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GTreemap.h +88 -0
  1110. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GWebglContext.cpp +3259 -0
  1111. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/GWebglContext.h +13 -0
  1112. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/default.glsl +39 -0
  1113. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/grad.glsl +101 -0
  1114. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/pattern.glsl +45 -0
  1115. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/radiation.glsl +110 -0
  1116. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/shadow.glsl +39 -0
  1117. package/harmony/gcanvas/src/main/cpp/core/src/gcanvas/shaders/texture.glsl +34 -0
  1118. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextAndroid.cpp +386 -0
  1119. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextAndroid.h +113 -0
  1120. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvas2DContextImpl.cpp +67 -0
  1121. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvasAndroid.cpp +41 -0
  1122. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GCanvasAndroid.h +36 -0
  1123. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFont.cpp +806 -0
  1124. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFont.h +164 -0
  1125. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontCache.cpp +467 -0
  1126. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontCache.h +93 -0
  1127. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontFamily.cpp +187 -0
  1128. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontFamily.h +68 -0
  1129. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManager.cpp +205 -0
  1130. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerAndroid.cpp +328 -0
  1131. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerAndroid.h +63 -0
  1132. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFontManagerImpl.cpp +22 -0
  1133. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GFrameBufferObjectImpl.cpp +180 -0
  1134. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GPreCompiledShaders.cpp +175 -0
  1135. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GPreCompiledShaders.h +75 -0
  1136. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GSystemFontInformation.cpp +231 -0
  1137. package/harmony/gcanvas/src/main/cpp/core/src/platform/Android/GSystemFontInformation.h +69 -0
  1138. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/FontTool.hpp +892 -0
  1139. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFont.cpp +742 -0
  1140. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontCache.cpp +296 -0
  1141. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontFamily.cpp +162 -0
  1142. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GFontManager.cpp +230 -0
  1143. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/GSystemFontInformation.cpp +232 -0
  1144. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/PortableMap.hpp +621 -0
  1145. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/argh.h +434 -0
  1146. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/fonttool.cpp +109 -0
  1147. package/harmony/gcanvas/src/main/cpp/core/src/platform/Linux/utils.hpp +229 -0
  1148. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GCVFont.h +126 -0
  1149. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GCVFont.mm +573 -0
  1150. package/harmony/gcanvas/src/main/cpp/core/src/platform/iOS/GFontManager.mm +185 -0
  1151. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextHarmony.cpp +391 -0
  1152. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextHarmony.h +114 -0
  1153. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvas2DContextOHOS.cpp +49 -0
  1154. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvasHarmony.cpp +42 -0
  1155. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GCanvasHarmony.h +37 -0
  1156. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFont.cpp +806 -0
  1157. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFont.h +164 -0
  1158. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontCache.cpp +466 -0
  1159. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontCache.h +94 -0
  1160. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontFamily.cpp +188 -0
  1161. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontFamily.h +69 -0
  1162. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerHarmony.cpp +329 -0
  1163. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerHarmony.h +64 -0
  1164. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFontManagerImpl.cpp +23 -0
  1165. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GFrameBufferObjectImpl.cpp +221 -0
  1166. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GPreCompiledShaders.cpp +176 -0
  1167. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GPreCompiledShaders.h +76 -0
  1168. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GSystemFontInformation.cpp +232 -0
  1169. package/harmony/gcanvas/src/main/cpp/core/src/platform/ohos/GSystemFontInformation.h +70 -0
  1170. package/harmony/gcanvas/src/main/cpp/core/src/support/CharacterSet.cpp +126 -0
  1171. package/harmony/gcanvas/src/main/cpp/core/src/support/CharacterSet.h +30 -0
  1172. package/harmony/gcanvas/src/main/cpp/core/src/support/ConcurrenceQueue.h +128 -0
  1173. package/harmony/gcanvas/src/main/cpp/core/src/support/DynArray.h +157 -0
  1174. package/harmony/gcanvas/src/main/cpp/core/src/support/Encode.cpp +116 -0
  1175. package/harmony/gcanvas/src/main/cpp/core/src/support/Encode.h +20 -0
  1176. package/harmony/gcanvas/src/main/cpp/core/src/support/FileUtils.cpp +153 -0
  1177. package/harmony/gcanvas/src/main/cpp/core/src/support/FileUtils.h +56 -0
  1178. package/harmony/gcanvas/src/main/cpp/core/src/support/GLUtil.cpp +174 -0
  1179. package/harmony/gcanvas/src/main/cpp/core/src/support/GLUtil.h +25 -0
  1180. package/harmony/gcanvas/src/main/cpp/core/src/support/Lesser.h +27 -0
  1181. package/harmony/gcanvas/src/main/cpp/core/src/support/Log.cpp +158 -0
  1182. package/harmony/gcanvas/src/main/cpp/core/src/support/Log.h +100 -0
  1183. package/harmony/gcanvas/src/main/cpp/core/src/support/Util.cpp +118 -0
  1184. package/harmony/gcanvas/src/main/cpp/core/src/support/Util.h +38 -0
  1185. package/harmony/gcanvas/src/main/cpp/core/src/support/Value.cpp +180 -0
  1186. package/harmony/gcanvas/src/main/cpp/core/src/support/Value.h +76 -0
  1187. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/BaseGcanvasPackage.h +79 -0
  1188. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/components/GCanvasViewJSIBinder.h +37 -0
  1189. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/turbo_modules/GCanvasModule.cpp +35 -0
  1190. package/harmony/gcanvas/src/main/cpp/generated/RNOH/generated/turbo_modules/GCanvasModule.h +16 -0
  1191. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ComponentDescriptors.h +24 -0
  1192. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/EventEmitters.cpp +33 -0
  1193. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/EventEmitters.h +31 -0
  1194. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/Props.cpp +28 -0
  1195. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/Props.h +30 -0
  1196. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ShadowNodes.cpp +17 -0
  1197. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/ShadowNodes.h +32 -0
  1198. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/States.cpp +16 -0
  1199. package/harmony/gcanvas/src/main/cpp/generated/react/renderer/components/gcanvas/States.h +29 -0
  1200. package/harmony/gcanvas/src/main/ets/GCanvasModuleTurboModule.ts +448 -0
  1201. package/harmony/gcanvas/src/main/ets/GCanvasNativeEngine.ts +206 -0
  1202. package/harmony/gcanvas/src/main/ets/GcanvasTurboModulesFactory.ets +42 -0
  1203. package/harmony/gcanvas/src/main/ets/components/GCanvasView.ets +109 -0
  1204. package/harmony/gcanvas/src/main/ets/generated/components/GCanvasView.ts +126 -0
  1205. package/harmony/gcanvas/src/main/ets/generated/components/ts.ts +5 -0
  1206. package/harmony/gcanvas/src/main/ets/generated/index.ets +5 -0
  1207. package/harmony/gcanvas/src/main/ets/generated/ts.ts +6 -0
  1208. package/harmony/gcanvas/src/main/ets/generated/turboModules/GCanvasModule.ts +52 -0
  1209. package/harmony/gcanvas/src/main/ets/generated/turboModules/ts.ts +5 -0
  1210. package/harmony/gcanvas/src/main/module.json5 +21 -0
  1211. package/harmony/gcanvas/src/main/resources/base/element/string.json +12 -0
  1212. package/harmony/gcanvas/src/main/resources/en_US/element/string.json +8 -0
  1213. package/harmony/gcanvas/src/main/resources/zh_CN/element/string.json +12 -0
  1214. package/harmony/gcanvas.har +0 -0
  1215. package/package.json +69 -0
  1216. package/packages/gcanvas/.babelrc +5 -0
  1217. package/packages/gcanvas/.eslintrc.js +133 -0
  1218. package/packages/gcanvas/package.json +19 -0
  1219. package/packages/gcanvas/rollup.config.js +14 -0
  1220. package/packages/gcanvas/src/bridge/react-native.js +286 -0
  1221. package/packages/gcanvas/src/bridge/weex.js +210 -0
  1222. package/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +17 -0
  1223. package/packages/gcanvas/src/context/2d/FillStylePattern.js +8 -0
  1224. package/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +17 -0
  1225. package/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +49 -0
  1226. package/packages/gcanvas/src/context/2d/RenderingContext.js +787 -0
  1227. package/packages/gcanvas/src/context/webgl/ActiveInfo.js +11 -0
  1228. package/packages/gcanvas/src/context/webgl/Buffer.js +21 -0
  1229. package/packages/gcanvas/src/context/webgl/Framebuffer.js +21 -0
  1230. package/packages/gcanvas/src/context/webgl/GLenum.js +300 -0
  1231. package/packages/gcanvas/src/context/webgl/GLmethod.js +142 -0
  1232. package/packages/gcanvas/src/context/webgl/GLtype.js +22 -0
  1233. package/packages/gcanvas/src/context/webgl/Program.js +21 -0
  1234. package/packages/gcanvas/src/context/webgl/Renderbuffer.js +21 -0
  1235. package/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -0
  1236. package/packages/gcanvas/src/context/webgl/Shader.js +22 -0
  1237. package/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +11 -0
  1238. package/packages/gcanvas/src/context/webgl/Texture.js +22 -0
  1239. package/packages/gcanvas/src/context/webgl/UniformLocation.js +22 -0
  1240. package/packages/gcanvas/src/context/webgl/classUtils.js +3 -0
  1241. package/packages/gcanvas/src/env/canvas.js +210 -0
  1242. package/packages/gcanvas/src/env/image.js +76 -0
  1243. package/packages/gcanvas/src/env/off-screen-canvas.js +74 -0
  1244. package/packages/gcanvas/src/index.js +65 -0
  1245. package/src/components/CanvasView.js +20 -0
  1246. package/src/components/GCanvasComponent.js +408 -0
  1247. package/src/index.js +69 -0
  1248. package/src/packages/gcanvas/.babelrc +5 -0
  1249. package/src/packages/gcanvas/.eslintrc.js +133 -0
  1250. package/src/packages/gcanvas/package.json +19 -0
  1251. package/src/packages/gcanvas/rollup.config.js +14 -0
  1252. package/src/packages/gcanvas/src/bridge/react-native.js +288 -0
  1253. package/src/packages/gcanvas/src/bridge/weex.js +210 -0
  1254. package/src/packages/gcanvas/src/context/2d/FillStyleLinearGradient.js +17 -0
  1255. package/src/packages/gcanvas/src/context/2d/FillStylePattern.js +8 -0
  1256. package/src/packages/gcanvas/src/context/2d/FillStyleRadialGradient.js +17 -0
  1257. package/src/packages/gcanvas/src/context/2d/OffScreenRenderingContext.js +49 -0
  1258. package/src/packages/gcanvas/src/context/2d/RenderingContext.js +801 -0
  1259. package/src/packages/gcanvas/src/context/webgl/ActiveInfo.js +11 -0
  1260. package/src/packages/gcanvas/src/context/webgl/Buffer.js +21 -0
  1261. package/src/packages/gcanvas/src/context/webgl/Framebuffer.js +21 -0
  1262. package/src/packages/gcanvas/src/context/webgl/GLenum.js +300 -0
  1263. package/src/packages/gcanvas/src/context/webgl/GLmethod.js +142 -0
  1264. package/src/packages/gcanvas/src/context/webgl/GLtype.js +22 -0
  1265. package/src/packages/gcanvas/src/context/webgl/Program.js +21 -0
  1266. package/src/packages/gcanvas/src/context/webgl/Renderbuffer.js +21 -0
  1267. package/src/packages/gcanvas/src/context/webgl/RenderingContext.js +1479 -0
  1268. package/src/packages/gcanvas/src/context/webgl/Shader.js +22 -0
  1269. package/src/packages/gcanvas/src/context/webgl/ShaderPrecisionFormat.js +11 -0
  1270. package/src/packages/gcanvas/src/context/webgl/Texture.js +22 -0
  1271. package/src/packages/gcanvas/src/context/webgl/UniformLocation.js +22 -0
  1272. package/src/packages/gcanvas/src/context/webgl/classUtils.js +3 -0
  1273. package/src/packages/gcanvas/src/env/canvas.js +210 -0
  1274. package/src/packages/gcanvas/src/env/image.js +76 -0
  1275. package/src/packages/gcanvas/src/env/off-screen-canvas.js +74 -0
  1276. package/src/packages/gcanvas/src/index.js +65 -0
  1277. package/src/specs/v1/.gitkeep +1 -0
  1278. package/src/specs/v1/GCanvasViewNativeComponent.ts +47 -0
  1279. package/src/specs/v1/NativeGCanvasModule.ts +140 -0
  1280. package/src/specs/v2/.gitkeep +1 -0
@@ -0,0 +1,3643 @@
1
+ /****************************************************************************
2
+ *
3
+ * aflatin.c
4
+ *
5
+ * Auto-fitter hinting routines for latin writing system (body).
6
+ *
7
+ * Copyright (C) 2003-2024 by
8
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
9
+ *
10
+ * This file is part of the FreeType project, and may only be used,
11
+ * modified, and distributed under the terms of the FreeType project
12
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
13
+ * this file you indicate that you have read the license and
14
+ * understand and accept it fully.
15
+ *
16
+ */
17
+
18
+
19
+ #include <freetype/ftadvanc.h>
20
+ #include <freetype/internal/ftdebug.h>
21
+
22
+ #include "afglobal.h"
23
+ #include "aflatin.h"
24
+ #include "aferrors.h"
25
+
26
+
27
+ /**************************************************************************
28
+ *
29
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
30
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
31
+ * messages during execution.
32
+ */
33
+ #undef FT_COMPONENT
34
+ #define FT_COMPONENT aflatin
35
+
36
+
37
+ /* needed for computation of round vs. flat segments */
38
+ #define FLAT_THRESHOLD( x ) ( x / 14 )
39
+
40
+
41
+ /*************************************************************************/
42
+ /*************************************************************************/
43
+ /***** *****/
44
+ /***** L A T I N G L O B A L M E T R I C S *****/
45
+ /***** *****/
46
+ /*************************************************************************/
47
+ /*************************************************************************/
48
+
49
+
50
+ /* Find segments and links, compute all stem widths, and initialize */
51
+ /* standard width and height for the glyph with given charcode. */
52
+
53
+ FT_LOCAL_DEF( void )
54
+ af_latin_metrics_init_widths( AF_LatinMetrics metrics,
55
+ FT_Face face )
56
+ {
57
+ /* scan the array of segments in each direction */
58
+ AF_GlyphHintsRec hints[1];
59
+
60
+
61
+ FT_TRACE5(( "\n" ));
62
+ FT_TRACE5(( "latin standard widths computation (style `%s')\n",
63
+ af_style_names[metrics->root.style_class->style] ));
64
+ FT_TRACE5(( "=====================================================\n" ));
65
+ FT_TRACE5(( "\n" ));
66
+
67
+ af_glyph_hints_init( hints, face->memory );
68
+
69
+ metrics->axis[AF_DIMENSION_HORZ].width_count = 0;
70
+ metrics->axis[AF_DIMENSION_VERT].width_count = 0;
71
+
72
+ {
73
+ FT_Error error;
74
+ FT_ULong glyph_index;
75
+ int dim;
76
+ AF_LatinMetricsRec dummy[1];
77
+ AF_Scaler scaler = &dummy->root.scaler;
78
+
79
+ AF_StyleClass style_class = metrics->root.style_class;
80
+ AF_ScriptClass script_class = af_script_classes[style_class->script];
81
+
82
+ /* If HarfBuzz is not available, we need a pointer to a single */
83
+ /* unsigned long value. */
84
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
85
+ void* shaper_buf;
86
+ #else
87
+ FT_ULong shaper_buf_;
88
+ void* shaper_buf = &shaper_buf_;
89
+ #endif
90
+
91
+ const char* p;
92
+
93
+ #ifdef FT_DEBUG_LEVEL_TRACE
94
+ FT_ULong ch = 0;
95
+ #endif
96
+
97
+
98
+ p = script_class->standard_charstring;
99
+
100
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
101
+ shaper_buf = af_shaper_buf_create( face );
102
+ #endif
103
+ /*
104
+ * We check a list of standard characters to catch features like
105
+ * `c2sc' (small caps from caps) that don't contain lowercase letters
106
+ * by definition, or other features that mainly operate on numerals.
107
+ * The first match wins.
108
+ */
109
+
110
+ glyph_index = 0;
111
+ while ( *p )
112
+ {
113
+ unsigned int num_idx;
114
+
115
+ #ifdef FT_DEBUG_LEVEL_TRACE
116
+ const char* p_old;
117
+ #endif
118
+
119
+
120
+ while ( *p == ' ' )
121
+ p++;
122
+
123
+ #ifdef FT_DEBUG_LEVEL_TRACE
124
+ p_old = p;
125
+ GET_UTF8_CHAR( ch, p_old );
126
+ #endif
127
+
128
+ /* reject input that maps to more than a single glyph */
129
+ p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
130
+ if ( num_idx > 1 )
131
+ continue;
132
+
133
+ /* otherwise exit loop if we have a result */
134
+ glyph_index = af_shaper_get_elem( &metrics->root,
135
+ shaper_buf,
136
+ 0,
137
+ NULL,
138
+ NULL );
139
+ if ( glyph_index )
140
+ break;
141
+ }
142
+
143
+ af_shaper_buf_destroy( face, shaper_buf );
144
+
145
+ if ( !glyph_index )
146
+ {
147
+ FT_TRACE5(( "standard character missing;"
148
+ " using fallback stem widths\n" ));
149
+ goto Exit;
150
+ }
151
+
152
+ FT_TRACE5(( "standard character: U+%04lX (glyph index %ld)\n",
153
+ ch, glyph_index ));
154
+
155
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
156
+ if ( error || face->glyph->outline.n_points <= 0 )
157
+ goto Exit;
158
+
159
+ FT_ZERO( dummy );
160
+
161
+ dummy->units_per_em = metrics->units_per_em;
162
+
163
+ scaler->x_scale = 0x10000L;
164
+ scaler->y_scale = 0x10000L;
165
+ scaler->x_delta = 0;
166
+ scaler->y_delta = 0;
167
+
168
+ scaler->face = face;
169
+ scaler->render_mode = FT_RENDER_MODE_NORMAL;
170
+ scaler->flags = 0;
171
+
172
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );
173
+
174
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
175
+ if ( error )
176
+ goto Exit;
177
+
178
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
179
+ {
180
+ AF_LatinAxis axis = &metrics->axis[dim];
181
+ AF_AxisHints axhints = &hints->axis[dim];
182
+ AF_Segment seg, limit, link;
183
+ FT_UInt num_widths = 0;
184
+
185
+
186
+ error = af_latin_hints_compute_segments( hints,
187
+ (AF_Dimension)dim );
188
+ if ( error )
189
+ goto Exit;
190
+
191
+ /*
192
+ * We assume that the glyphs selected for the stem width
193
+ * computation are `featureless' enough so that the linking
194
+ * algorithm works fine without adjustments of its scoring
195
+ * function.
196
+ */
197
+ af_latin_hints_link_segments( hints,
198
+ 0,
199
+ NULL,
200
+ (AF_Dimension)dim );
201
+
202
+ seg = axhints->segments;
203
+ limit = FT_OFFSET( seg, axhints->num_segments );
204
+
205
+ for ( ; seg < limit; seg++ )
206
+ {
207
+ link = seg->link;
208
+
209
+ /* we only consider stem segments there! */
210
+ if ( link && link->link == seg && link > seg )
211
+ {
212
+ FT_Pos dist;
213
+
214
+
215
+ dist = seg->pos - link->pos;
216
+ if ( dist < 0 )
217
+ dist = -dist;
218
+
219
+ if ( num_widths < AF_LATIN_MAX_WIDTHS )
220
+ axis->widths[num_widths++].org = dist;
221
+ }
222
+ }
223
+
224
+ /* this also replaces multiple almost identical stem widths */
225
+ /* with a single one (the value 100 is heuristic) */
226
+ af_sort_and_quantize_widths( &num_widths, axis->widths,
227
+ dummy->units_per_em / 100 );
228
+ axis->width_count = num_widths;
229
+ }
230
+
231
+ Exit:
232
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
233
+ {
234
+ AF_LatinAxis axis = &metrics->axis[dim];
235
+ FT_Pos stdw;
236
+
237
+
238
+ stdw = ( axis->width_count > 0 ) ? axis->widths[0].org
239
+ : AF_LATIN_CONSTANT( metrics, 50 );
240
+
241
+ /* let's try 20% of the smallest width */
242
+ axis->edge_distance_threshold = stdw / 5;
243
+ axis->standard_width = stdw;
244
+ axis->extra_light = 0;
245
+
246
+ #ifdef FT_DEBUG_LEVEL_TRACE
247
+ {
248
+ FT_UInt i;
249
+
250
+
251
+ FT_TRACE5(( "%s widths:\n",
252
+ dim == AF_DIMENSION_VERT ? "horizontal"
253
+ : "vertical" ));
254
+
255
+ FT_TRACE5(( " %ld (standard)", axis->standard_width ));
256
+ for ( i = 1; i < axis->width_count; i++ )
257
+ FT_TRACE5(( " %ld", axis->widths[i].org ));
258
+
259
+ FT_TRACE5(( "\n" ));
260
+ }
261
+ #endif
262
+ }
263
+ }
264
+
265
+ FT_TRACE5(( "\n" ));
266
+
267
+ af_glyph_hints_done( hints );
268
+ }
269
+
270
+
271
+ static void
272
+ af_latin_sort_blue( FT_UInt count,
273
+ AF_LatinBlue* table )
274
+ {
275
+ FT_UInt i, j;
276
+ AF_LatinBlue swap;
277
+
278
+
279
+ /* we sort from bottom to top */
280
+ for ( i = 1; i < count; i++ )
281
+ {
282
+ for ( j = i; j > 0; j-- )
283
+ {
284
+ FT_Pos a, b;
285
+
286
+
287
+ if ( table[j - 1]->flags & ( AF_LATIN_BLUE_TOP |
288
+ AF_LATIN_BLUE_SUB_TOP ) )
289
+ a = table[j - 1]->ref.org;
290
+ else
291
+ a = table[j - 1]->shoot.org;
292
+
293
+ if ( table[j]->flags & ( AF_LATIN_BLUE_TOP |
294
+ AF_LATIN_BLUE_SUB_TOP ) )
295
+ b = table[j]->ref.org;
296
+ else
297
+ b = table[j]->shoot.org;
298
+
299
+ if ( b >= a )
300
+ break;
301
+
302
+ swap = table[j];
303
+ table[j] = table[j - 1];
304
+ table[j - 1] = swap;
305
+ }
306
+ }
307
+ }
308
+
309
+
310
+ /* Find all blue zones. Flat segments give the reference points, */
311
+ /* round segments the overshoot positions. */
312
+
313
+ static int
314
+ af_latin_metrics_init_blues( AF_LatinMetrics metrics,
315
+ FT_Face face )
316
+ {
317
+ FT_Pos flats [AF_BLUE_STRING_MAX_LEN];
318
+ FT_Pos rounds[AF_BLUE_STRING_MAX_LEN];
319
+
320
+ FT_UInt num_flats;
321
+ FT_UInt num_rounds;
322
+
323
+ AF_LatinBlue blue;
324
+ FT_Error error;
325
+ AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT];
326
+ FT_Outline outline;
327
+
328
+ AF_StyleClass sc = metrics->root.style_class;
329
+
330
+ AF_Blue_Stringset bss = sc->blue_stringset;
331
+ const AF_Blue_StringRec* bs = &af_blue_stringsets[bss];
332
+
333
+ FT_Pos flat_threshold = FLAT_THRESHOLD( metrics->units_per_em );
334
+
335
+ /* If HarfBuzz is not available, we need a pointer to a single */
336
+ /* unsigned long value. */
337
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
338
+ void* shaper_buf;
339
+ #else
340
+ FT_ULong shaper_buf_;
341
+ void* shaper_buf = &shaper_buf_;
342
+ #endif
343
+
344
+
345
+ /* we walk over the blue character strings as specified in the */
346
+ /* style's entry in the `af_blue_stringset' array */
347
+
348
+ FT_TRACE5(( "latin blue zones computation\n" ));
349
+ FT_TRACE5(( "============================\n" ));
350
+ FT_TRACE5(( "\n" ));
351
+
352
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
353
+ shaper_buf = af_shaper_buf_create( face );
354
+ #endif
355
+
356
+ for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )
357
+ {
358
+ const char* p = &af_blue_strings[bs->string];
359
+ FT_Pos* blue_ref;
360
+ FT_Pos* blue_shoot;
361
+ FT_Pos ascender;
362
+ FT_Pos descender;
363
+
364
+
365
+ #ifdef FT_DEBUG_LEVEL_TRACE
366
+ {
367
+ FT_Bool have_flag = 0;
368
+
369
+
370
+ FT_TRACE5(( "blue zone %d", axis->blue_count ));
371
+
372
+ if ( bs->properties )
373
+ {
374
+ FT_TRACE5(( " (" ));
375
+
376
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
377
+ {
378
+ FT_TRACE5(( "top" ));
379
+ have_flag = 1;
380
+ }
381
+ else if ( AF_LATIN_IS_SUB_TOP_BLUE( bs ) )
382
+ {
383
+ FT_TRACE5(( "sub top" ));
384
+ have_flag = 1;
385
+ }
386
+
387
+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
388
+ {
389
+ if ( have_flag )
390
+ FT_TRACE5(( ", " ));
391
+ FT_TRACE5(( "neutral" ));
392
+ have_flag = 1;
393
+ }
394
+
395
+ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
396
+ {
397
+ if ( have_flag )
398
+ FT_TRACE5(( ", " ));
399
+ FT_TRACE5(( "small top" ));
400
+ have_flag = 1;
401
+ }
402
+
403
+ if ( AF_LATIN_IS_LONG_BLUE( bs ) )
404
+ {
405
+ if ( have_flag )
406
+ FT_TRACE5(( ", " ));
407
+ FT_TRACE5(( "long" ));
408
+ }
409
+
410
+ FT_TRACE5(( ")" ));
411
+ }
412
+
413
+ FT_TRACE5(( ":\n" ));
414
+ }
415
+ #endif /* FT_DEBUG_LEVEL_TRACE */
416
+
417
+ num_flats = 0;
418
+ num_rounds = 0;
419
+ ascender = 0;
420
+ descender = 0;
421
+
422
+ while ( *p )
423
+ {
424
+ FT_ULong glyph_index;
425
+ FT_Long y_offset;
426
+ FT_Int best_point, best_contour_first, best_contour_last;
427
+ FT_Vector* points;
428
+
429
+ FT_Pos best_y_extremum; /* same as points.y */
430
+ FT_Bool best_round = 0;
431
+
432
+ unsigned int i, num_idx;
433
+
434
+ #ifdef FT_DEBUG_LEVEL_TRACE
435
+ const char* p_old;
436
+ FT_ULong ch;
437
+ #endif
438
+
439
+
440
+ while ( *p == ' ' )
441
+ p++;
442
+
443
+ #ifdef FT_DEBUG_LEVEL_TRACE
444
+ p_old = p;
445
+ GET_UTF8_CHAR( ch, p_old );
446
+ #endif
447
+
448
+ p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
449
+
450
+ if ( !num_idx )
451
+ {
452
+ FT_TRACE5(( " U+%04lX unavailable\n", ch ));
453
+ continue;
454
+ }
455
+
456
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
457
+ best_y_extremum = FT_INT_MIN;
458
+ else
459
+ best_y_extremum = FT_INT_MAX;
460
+
461
+ /* iterate over all glyph elements of the character cluster */
462
+ /* and get the data of the `biggest' one */
463
+ for ( i = 0; i < num_idx; i++ )
464
+ {
465
+ FT_Pos best_y;
466
+ FT_Bool round = 0;
467
+
468
+
469
+ /* load the character in the face -- skip unknown or empty ones */
470
+ glyph_index = af_shaper_get_elem( &metrics->root,
471
+ shaper_buf,
472
+ i,
473
+ NULL,
474
+ &y_offset );
475
+ if ( glyph_index == 0 )
476
+ {
477
+ FT_TRACE5(( " U+%04lX unavailable\n", ch ));
478
+ continue;
479
+ }
480
+
481
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
482
+ outline = face->glyph->outline;
483
+ /* reject glyphs that don't produce any rendering */
484
+ if ( error || outline.n_points <= 2 )
485
+ {
486
+ #ifdef FT_DEBUG_LEVEL_TRACE
487
+ if ( num_idx == 1 )
488
+ FT_TRACE5(( " U+%04lX contains no (usable) outlines\n", ch ));
489
+ else
490
+ FT_TRACE5(( " component %d of cluster starting with U+%04lX"
491
+ " contains no (usable) outlines\n", i, ch ));
492
+ #endif
493
+ continue;
494
+ }
495
+
496
+ /* now compute min or max point indices and coordinates */
497
+ points = outline.points;
498
+ best_point = -1;
499
+ best_contour_first = -1;
500
+ best_contour_last = -1;
501
+ best_y = 0; /* make compiler happy */
502
+
503
+ {
504
+ FT_Int nn;
505
+ FT_Int pp, first, last;
506
+
507
+
508
+ last = -1;
509
+ for ( nn = 0; nn < outline.n_contours; nn++ )
510
+ {
511
+ first = last + 1;
512
+ last = outline.contours[nn];
513
+
514
+ /* Avoid single-point contours since they are never */
515
+ /* rasterized. In some fonts, they correspond to mark */
516
+ /* attachment points that are way outside of the glyph's */
517
+ /* real outline. */
518
+ if ( last <= first )
519
+ continue;
520
+
521
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) ||
522
+ AF_LATIN_IS_SUB_TOP_BLUE( bs ) )
523
+ {
524
+ for ( pp = first; pp <= last; pp++ )
525
+ {
526
+ if ( best_point < 0 || points[pp].y > best_y )
527
+ {
528
+ best_point = pp;
529
+ best_y = points[pp].y;
530
+ ascender = FT_MAX( ascender, best_y + y_offset );
531
+ }
532
+ else
533
+ descender = FT_MIN( descender, points[pp].y + y_offset );
534
+ }
535
+ }
536
+ else
537
+ {
538
+ for ( pp = first; pp <= last; pp++ )
539
+ {
540
+ if ( best_point < 0 || points[pp].y < best_y )
541
+ {
542
+ best_point = pp;
543
+ best_y = points[pp].y;
544
+ descender = FT_MIN( descender, best_y + y_offset );
545
+ }
546
+ else
547
+ ascender = FT_MAX( ascender, points[pp].y + y_offset );
548
+ }
549
+ }
550
+
551
+ if ( best_point > best_contour_last )
552
+ {
553
+ best_contour_first = first;
554
+ best_contour_last = last;
555
+ }
556
+ }
557
+ }
558
+
559
+ /* now check whether the point belongs to a straight or round */
560
+ /* segment; we first need to find in which contour the extremum */
561
+ /* lies, then inspect its previous and next points */
562
+ if ( best_point >= 0 )
563
+ {
564
+ FT_Pos best_x = points[best_point].x;
565
+ FT_Int prev, next;
566
+ FT_Int best_segment_first, best_segment_last;
567
+ FT_Int best_on_point_first, best_on_point_last;
568
+ FT_Pos dist;
569
+
570
+
571
+ best_segment_first = best_point;
572
+ best_segment_last = best_point;
573
+
574
+ if ( FT_CURVE_TAG( outline.tags[best_point] ) == FT_CURVE_TAG_ON )
575
+ {
576
+ best_on_point_first = best_point;
577
+ best_on_point_last = best_point;
578
+ }
579
+ else
580
+ {
581
+ best_on_point_first = -1;
582
+ best_on_point_last = -1;
583
+ }
584
+
585
+ /* look for the previous and next points on the contour */
586
+ /* that are not on the same Y coordinate, then threshold */
587
+ /* the `closeness'... */
588
+ prev = best_point;
589
+ next = prev;
590
+
591
+ do
592
+ {
593
+ if ( prev > best_contour_first )
594
+ prev--;
595
+ else
596
+ prev = best_contour_last;
597
+
598
+ dist = FT_ABS( points[prev].y - best_y );
599
+ /* accept a small distance or a small angle (both values are */
600
+ /* heuristic; value 20 corresponds to approx. 2.9 degrees) */
601
+ if ( dist > 5 )
602
+ if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )
603
+ break;
604
+
605
+ best_segment_first = prev;
606
+
607
+ if ( FT_CURVE_TAG( outline.tags[prev] ) == FT_CURVE_TAG_ON )
608
+ {
609
+ best_on_point_first = prev;
610
+ if ( best_on_point_last < 0 )
611
+ best_on_point_last = prev;
612
+ }
613
+
614
+ } while ( prev != best_point );
615
+
616
+ do
617
+ {
618
+ if ( next < best_contour_last )
619
+ next++;
620
+ else
621
+ next = best_contour_first;
622
+
623
+ dist = FT_ABS( points[next].y - best_y );
624
+ if ( dist > 5 )
625
+ if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )
626
+ break;
627
+
628
+ best_segment_last = next;
629
+
630
+ if ( FT_CURVE_TAG( outline.tags[next] ) == FT_CURVE_TAG_ON )
631
+ {
632
+ best_on_point_last = next;
633
+ if ( best_on_point_first < 0 )
634
+ best_on_point_first = next;
635
+ }
636
+
637
+ } while ( next != best_point );
638
+
639
+ if ( AF_LATIN_IS_LONG_BLUE( bs ) )
640
+ {
641
+ /* If this flag is set, we have an additional constraint to */
642
+ /* get the blue zone distance: Find a segment of the topmost */
643
+ /* (or bottommost) contour that is longer than a heuristic */
644
+ /* threshold. This ensures that small bumps in the outline */
645
+ /* are ignored (for example, the `vertical serifs' found in */
646
+ /* many Hebrew glyph designs). */
647
+
648
+ /* If this segment is long enough, we are done. Otherwise, */
649
+ /* search the segment next to the extremum that is long */
650
+ /* enough, has the same direction, and a not too large */
651
+ /* vertical distance from the extremum. Note that the */
652
+ /* algorithm doesn't check whether the found segment is */
653
+ /* actually the one (vertically) nearest to the extremum. */
654
+
655
+ /* heuristic threshold value */
656
+ FT_Pos length_threshold = metrics->units_per_em / 25;
657
+
658
+
659
+ dist = FT_ABS( points[best_segment_last].x -
660
+ points[best_segment_first].x );
661
+
662
+ if ( dist < length_threshold &&
663
+ best_segment_last - best_segment_first + 2 <=
664
+ best_contour_last - best_contour_first )
665
+ {
666
+ /* heuristic threshold value */
667
+ FT_Pos height_threshold = metrics->units_per_em / 4;
668
+
669
+ FT_Int first;
670
+ FT_Int last;
671
+ FT_Bool hit;
672
+
673
+ /* we intentionally declare these two variables */
674
+ /* outside of the loop since various compilers emit */
675
+ /* incorrect warning messages otherwise, talking about */
676
+ /* `possibly uninitialized variables' */
677
+ FT_Int p_first = 0; /* make compiler happy */
678
+ FT_Int p_last = 0;
679
+
680
+ FT_Bool left2right;
681
+
682
+
683
+ /* compute direction */
684
+ prev = best_point;
685
+
686
+ do
687
+ {
688
+ if ( prev > best_contour_first )
689
+ prev--;
690
+ else
691
+ prev = best_contour_last;
692
+
693
+ if ( points[prev].x != best_x )
694
+ break;
695
+
696
+ } while ( prev != best_point );
697
+
698
+ /* skip glyph for the degenerate case */
699
+ if ( prev == best_point )
700
+ continue;
701
+
702
+ left2right = FT_BOOL( points[prev].x < points[best_point].x );
703
+
704
+ first = best_segment_last;
705
+ last = first;
706
+ hit = 0;
707
+
708
+ do
709
+ {
710
+ FT_Bool l2r;
711
+ FT_Pos d;
712
+
713
+
714
+ if ( !hit )
715
+ {
716
+ /* no hit; adjust first point */
717
+ first = last;
718
+
719
+ /* also adjust first and last on point */
720
+ if ( FT_CURVE_TAG( outline.tags[first] ) ==
721
+ FT_CURVE_TAG_ON )
722
+ {
723
+ p_first = first;
724
+ p_last = first;
725
+ }
726
+ else
727
+ {
728
+ p_first = -1;
729
+ p_last = -1;
730
+ }
731
+
732
+ hit = 1;
733
+ }
734
+
735
+ if ( last < best_contour_last )
736
+ last++;
737
+ else
738
+ last = best_contour_first;
739
+
740
+ if ( FT_ABS( best_y - points[first].y ) > height_threshold )
741
+ {
742
+ /* vertical distance too large */
743
+ hit = 0;
744
+ continue;
745
+ }
746
+
747
+ /* same test as above */
748
+ dist = FT_ABS( points[last].y - points[first].y );
749
+ if ( dist > 5 )
750
+ if ( FT_ABS( points[last].x - points[first].x ) <=
751
+ 20 * dist )
752
+ {
753
+ hit = 0;
754
+ continue;
755
+ }
756
+
757
+ if ( FT_CURVE_TAG( outline.tags[last] ) == FT_CURVE_TAG_ON )
758
+ {
759
+ p_last = last;
760
+ if ( p_first < 0 )
761
+ p_first = last;
762
+ }
763
+
764
+ l2r = FT_BOOL( points[first].x < points[last].x );
765
+ d = FT_ABS( points[last].x - points[first].x );
766
+
767
+ if ( l2r == left2right &&
768
+ d >= length_threshold )
769
+ {
770
+ /* all constraints are met; update segment after */
771
+ /* finding its end */
772
+ do
773
+ {
774
+ if ( last < best_contour_last )
775
+ last++;
776
+ else
777
+ last = best_contour_first;
778
+
779
+ d = FT_ABS( points[last].y - points[first].y );
780
+ if ( d > 5 )
781
+ if ( FT_ABS( points[next].x - points[first].x ) <=
782
+ 20 * dist )
783
+ {
784
+ if ( last > best_contour_first )
785
+ last--;
786
+ else
787
+ last = best_contour_last;
788
+ break;
789
+ }
790
+
791
+ p_last = last;
792
+
793
+ if ( FT_CURVE_TAG( outline.tags[last] ) ==
794
+ FT_CURVE_TAG_ON )
795
+ {
796
+ p_last = last;
797
+ if ( p_first < 0 )
798
+ p_first = last;
799
+ }
800
+
801
+ } while ( last != best_segment_first );
802
+
803
+ best_y = points[first].y;
804
+
805
+ best_segment_first = first;
806
+ best_segment_last = last;
807
+
808
+ best_on_point_first = p_first;
809
+ best_on_point_last = p_last;
810
+
811
+ break;
812
+ }
813
+
814
+ } while ( last != best_segment_first );
815
+ }
816
+ }
817
+
818
+ /* for computing blue zones, we add the y offset as returned */
819
+ /* by the currently used OpenType feature -- for example, */
820
+ /* superscript glyphs might be identical to subscript glyphs */
821
+ /* with a vertical shift */
822
+ best_y += y_offset;
823
+
824
+ #ifdef FT_DEBUG_LEVEL_TRACE
825
+ if ( num_idx == 1 )
826
+ FT_TRACE5(( " U+%04lX: best_y = %5ld", ch, best_y ));
827
+ else
828
+ FT_TRACE5(( " component %d of cluster starting with U+%04lX:"
829
+ " best_y = %5ld", i, ch, best_y ));
830
+ #endif
831
+
832
+ /* now set the `round' flag depending on the segment's kind: */
833
+ /* */
834
+ /* - if the horizontal distance between the first and last */
835
+ /* `on' point is larger than a heuristic threshold */
836
+ /* we have a flat segment */
837
+ /* - if either the first or the last point of the segment is */
838
+ /* an `off' point, the segment is round, otherwise it is */
839
+ /* flat */
840
+ if ( best_on_point_first >= 0 &&
841
+ best_on_point_last >= 0 &&
842
+ ( FT_ABS( points[best_on_point_last].x -
843
+ points[best_on_point_first].x ) ) >
844
+ flat_threshold )
845
+ round = 0;
846
+ else
847
+ round = FT_BOOL(
848
+ FT_CURVE_TAG( outline.tags[best_segment_first] ) !=
849
+ FT_CURVE_TAG_ON ||
850
+ FT_CURVE_TAG( outline.tags[best_segment_last] ) !=
851
+ FT_CURVE_TAG_ON );
852
+
853
+ if ( round && AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
854
+ {
855
+ /* only use flat segments for a neutral blue zone */
856
+ FT_TRACE5(( " (round, skipped)\n" ));
857
+ continue;
858
+ }
859
+
860
+ FT_TRACE5(( " (%s)\n", round ? "round" : "flat" ));
861
+ }
862
+
863
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
864
+ {
865
+ if ( best_y > best_y_extremum )
866
+ {
867
+ best_y_extremum = best_y;
868
+ best_round = round;
869
+ }
870
+ }
871
+ else
872
+ {
873
+ if ( best_y < best_y_extremum )
874
+ {
875
+ best_y_extremum = best_y;
876
+ best_round = round;
877
+ }
878
+ }
879
+
880
+ } /* end for loop */
881
+
882
+ if ( !( best_y_extremum == FT_INT_MIN ||
883
+ best_y_extremum == FT_INT_MAX ) )
884
+ {
885
+ if ( best_round )
886
+ rounds[num_rounds++] = best_y_extremum;
887
+ else
888
+ flats[num_flats++] = best_y_extremum;
889
+ }
890
+
891
+ } /* end while loop */
892
+
893
+ if ( num_flats == 0 && num_rounds == 0 )
894
+ {
895
+ /*
896
+ * we couldn't find a single glyph to compute this blue zone,
897
+ * we will simply ignore it then
898
+ */
899
+ FT_TRACE5(( " empty\n" ));
900
+ continue;
901
+ }
902
+
903
+ /* we have computed the contents of the `rounds' and `flats' tables, */
904
+ /* now determine the reference and overshoot position of the blue -- */
905
+ /* we simply take the median value after a simple sort */
906
+ af_sort_pos( num_rounds, rounds );
907
+ af_sort_pos( num_flats, flats );
908
+
909
+ blue = &axis->blues[axis->blue_count];
910
+ blue_ref = &blue->ref.org;
911
+ blue_shoot = &blue->shoot.org;
912
+
913
+ axis->blue_count++;
914
+
915
+ if ( num_flats == 0 )
916
+ {
917
+ *blue_ref =
918
+ *blue_shoot = rounds[num_rounds / 2];
919
+ }
920
+ else if ( num_rounds == 0 )
921
+ {
922
+ *blue_ref =
923
+ *blue_shoot = flats[num_flats / 2];
924
+ }
925
+ else
926
+ {
927
+ *blue_ref = flats [num_flats / 2];
928
+ *blue_shoot = rounds[num_rounds / 2];
929
+ }
930
+
931
+ /* there are sometimes problems: if the overshoot position of top */
932
+ /* zones is under its reference position, or the opposite for bottom */
933
+ /* zones. We must thus check everything there and correct the errors */
934
+ if ( *blue_shoot != *blue_ref )
935
+ {
936
+ FT_Pos ref = *blue_ref;
937
+ FT_Pos shoot = *blue_shoot;
938
+ FT_Bool over_ref = FT_BOOL( shoot > ref );
939
+
940
+
941
+ if ( ( AF_LATIN_IS_TOP_BLUE( bs ) ||
942
+ AF_LATIN_IS_SUB_TOP_BLUE( bs) ) ^ over_ref )
943
+ {
944
+ *blue_ref =
945
+ *blue_shoot = ( shoot + ref ) / 2;
946
+
947
+ FT_TRACE5(( " [overshoot smaller than reference,"
948
+ " taking mean value]\n" ));
949
+ }
950
+ }
951
+
952
+ blue->ascender = ascender;
953
+ blue->descender = descender;
954
+
955
+ blue->flags = 0;
956
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
957
+ blue->flags |= AF_LATIN_BLUE_TOP;
958
+ if ( AF_LATIN_IS_SUB_TOP_BLUE( bs ) )
959
+ blue->flags |= AF_LATIN_BLUE_SUB_TOP;
960
+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
961
+ blue->flags |= AF_LATIN_BLUE_NEUTRAL;
962
+
963
+ /*
964
+ * The following flag is used later to adjust the y and x scales
965
+ * in order to optimize the pixel grid alignment of the top of small
966
+ * letters.
967
+ */
968
+ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
969
+ blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
970
+
971
+ FT_TRACE5(( " -> reference = %ld\n", *blue_ref ));
972
+ FT_TRACE5(( " overshoot = %ld\n", *blue_shoot ));
973
+
974
+ } /* end for loop */
975
+
976
+ af_shaper_buf_destroy( face, shaper_buf );
977
+
978
+ if ( axis->blue_count )
979
+ {
980
+ /* we finally check whether blue zones are ordered; */
981
+ /* `ref' and `shoot' values of two blue zones must not overlap */
982
+
983
+ FT_UInt i;
984
+ AF_LatinBlue blue_sorted[AF_BLUE_STRINGSET_MAX_LEN];
985
+
986
+
987
+ for ( i = 0; i < axis->blue_count; i++ )
988
+ blue_sorted[i] = &axis->blues[i];
989
+
990
+ /* sort bottoms of blue zones... */
991
+ af_latin_sort_blue( axis->blue_count, blue_sorted );
992
+
993
+ /* ...and adjust top values if necessary */
994
+ for ( i = 0; i < axis->blue_count - 1; i++ )
995
+ {
996
+ FT_Pos* a;
997
+ FT_Pos* b;
998
+
999
+ #ifdef FT_DEBUG_LEVEL_TRACE
1000
+ FT_Bool a_is_top = 0;
1001
+ #endif
1002
+
1003
+
1004
+ if ( blue_sorted[i]->flags & ( AF_LATIN_BLUE_TOP |
1005
+ AF_LATIN_BLUE_SUB_TOP ) )
1006
+ {
1007
+ a = &blue_sorted[i]->shoot.org;
1008
+ #ifdef FT_DEBUG_LEVEL_TRACE
1009
+ a_is_top = 1;
1010
+ #endif
1011
+ }
1012
+ else
1013
+ a = &blue_sorted[i]->ref.org;
1014
+
1015
+ if ( blue_sorted[i + 1]->flags & ( AF_LATIN_BLUE_TOP |
1016
+ AF_LATIN_BLUE_SUB_TOP ) )
1017
+ b = &blue_sorted[i + 1]->shoot.org;
1018
+ else
1019
+ b = &blue_sorted[i + 1]->ref.org;
1020
+
1021
+ if ( *a > *b )
1022
+ {
1023
+ *a = *b;
1024
+ FT_TRACE5(( "blue zone overlap:"
1025
+ " adjusting %s %td to %ld\n",
1026
+ a_is_top ? "overshoot" : "reference",
1027
+ blue_sorted[i] - axis->blues,
1028
+ *a ));
1029
+ }
1030
+ }
1031
+
1032
+ FT_TRACE5(( "\n" ));
1033
+
1034
+ return 0;
1035
+ }
1036
+ else
1037
+ {
1038
+ /* disable hinting for the current style if there are no blue zones */
1039
+
1040
+ AF_FaceGlobals globals = metrics->root.globals;
1041
+ FT_UShort* gstyles = globals->glyph_styles;
1042
+
1043
+ FT_UInt i;
1044
+
1045
+
1046
+ FT_TRACE5(( "no blue zones found:"
1047
+ " hinting disabled for this style\n" ));
1048
+
1049
+ for ( i = 0; i < globals->glyph_count; i++ )
1050
+ {
1051
+ if ( ( gstyles[i] & AF_STYLE_MASK ) == sc->style )
1052
+ gstyles[i] = AF_STYLE_NONE_DFLT;
1053
+ }
1054
+
1055
+ FT_TRACE5(( "\n" ));
1056
+
1057
+ return 1;
1058
+ }
1059
+ }
1060
+
1061
+
1062
+ /* Check whether all ASCII digits have the same advance width. */
1063
+
1064
+ FT_LOCAL_DEF( void )
1065
+ af_latin_metrics_check_digits( AF_LatinMetrics metrics,
1066
+ FT_Face face )
1067
+ {
1068
+ FT_Bool started = 0, same_width = 1;
1069
+ FT_Long advance = 0, old_advance = 0;
1070
+
1071
+ /* If HarfBuzz is not available, we need a pointer to a single */
1072
+ /* unsigned long value. */
1073
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
1074
+ void* shaper_buf;
1075
+ #else
1076
+ FT_ULong shaper_buf_;
1077
+ void* shaper_buf = &shaper_buf_;
1078
+ #endif
1079
+
1080
+ /* in all supported charmaps, digits have character codes 0x30-0x39 */
1081
+ const char digits[] = "0 1 2 3 4 5 6 7 8 9";
1082
+ const char* p;
1083
+
1084
+
1085
+ p = digits;
1086
+
1087
+ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
1088
+ shaper_buf = af_shaper_buf_create( face );
1089
+ #endif
1090
+
1091
+ while ( *p )
1092
+ {
1093
+ FT_ULong glyph_index;
1094
+ unsigned int num_idx;
1095
+
1096
+
1097
+ /* reject input that maps to more than a single glyph */
1098
+ p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
1099
+ if ( num_idx > 1 )
1100
+ continue;
1101
+
1102
+ glyph_index = af_shaper_get_elem( &metrics->root,
1103
+ shaper_buf,
1104
+ 0,
1105
+ &advance,
1106
+ NULL );
1107
+ if ( !glyph_index )
1108
+ continue;
1109
+
1110
+ if ( started )
1111
+ {
1112
+ if ( advance != old_advance )
1113
+ {
1114
+ same_width = 0;
1115
+ break;
1116
+ }
1117
+ }
1118
+ else
1119
+ {
1120
+ old_advance = advance;
1121
+ started = 1;
1122
+ }
1123
+ }
1124
+
1125
+ af_shaper_buf_destroy( face, shaper_buf );
1126
+
1127
+ metrics->root.digits_have_same_width = same_width;
1128
+ }
1129
+
1130
+
1131
+ /* Initialize global metrics. */
1132
+
1133
+ FT_LOCAL_DEF( FT_Error )
1134
+ af_latin_metrics_init( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
1135
+ FT_Face face )
1136
+ {
1137
+ AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
1138
+
1139
+ FT_Error error = FT_Err_Ok;
1140
+
1141
+ FT_CharMap oldmap = face->charmap;
1142
+
1143
+
1144
+ metrics->units_per_em = face->units_per_EM;
1145
+
1146
+ if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
1147
+ {
1148
+ af_latin_metrics_init_widths( metrics, face );
1149
+ if ( af_latin_metrics_init_blues( metrics, face ) )
1150
+ {
1151
+ /* use internal error code to indicate missing blue zones */
1152
+ error = -1;
1153
+ goto Exit;
1154
+ }
1155
+ af_latin_metrics_check_digits( metrics, face );
1156
+ }
1157
+
1158
+ Exit:
1159
+ face->charmap = oldmap;
1160
+ return error;
1161
+ }
1162
+
1163
+
1164
+ /* Adjust scaling value, then scale and shift widths */
1165
+ /* and blue zones (if applicable) for given dimension. */
1166
+
1167
+ static void
1168
+ af_latin_metrics_scale_dim( AF_LatinMetrics metrics,
1169
+ AF_Scaler scaler,
1170
+ AF_Dimension dim )
1171
+ {
1172
+ FT_Fixed scale;
1173
+ FT_Pos delta;
1174
+ AF_LatinAxis axis;
1175
+ FT_UInt nn;
1176
+
1177
+
1178
+ if ( dim == AF_DIMENSION_HORZ )
1179
+ {
1180
+ scale = scaler->x_scale;
1181
+ delta = scaler->x_delta;
1182
+ }
1183
+ else
1184
+ {
1185
+ scale = scaler->y_scale;
1186
+ delta = scaler->y_delta;
1187
+ }
1188
+
1189
+ axis = &metrics->axis[dim];
1190
+
1191
+ if ( axis->org_scale == scale && axis->org_delta == delta )
1192
+ return;
1193
+
1194
+ axis->org_scale = scale;
1195
+ axis->org_delta = delta;
1196
+
1197
+ /*
1198
+ * correct X and Y scale to optimize the alignment of the top of small
1199
+ * letters to the pixel grid
1200
+ */
1201
+ {
1202
+ AF_LatinAxis Axis = &metrics->axis[AF_DIMENSION_VERT];
1203
+ AF_LatinBlue blue = NULL;
1204
+
1205
+
1206
+ for ( nn = 0; nn < Axis->blue_count; nn++ )
1207
+ {
1208
+ if ( Axis->blues[nn].flags & AF_LATIN_BLUE_ADJUSTMENT )
1209
+ {
1210
+ blue = &Axis->blues[nn];
1211
+ break;
1212
+ }
1213
+ }
1214
+
1215
+ if ( blue )
1216
+ {
1217
+ FT_Pos scaled;
1218
+ FT_Pos threshold;
1219
+ FT_Pos fitted;
1220
+ FT_UInt limit;
1221
+ FT_UInt ppem;
1222
+
1223
+
1224
+ scaled = FT_MulFix( blue->shoot.org, scale );
1225
+ ppem = metrics->root.scaler.face->size->metrics.x_ppem;
1226
+ limit = metrics->root.globals->increase_x_height;
1227
+ threshold = 40;
1228
+
1229
+ /* if the `increase-x-height' property is active, */
1230
+ /* we round up much more often */
1231
+ if ( limit &&
1232
+ ppem <= limit &&
1233
+ ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN )
1234
+ threshold = 52;
1235
+
1236
+ fitted = ( scaled + threshold ) & ~63;
1237
+
1238
+ if ( scaled != fitted )
1239
+ {
1240
+ #if 0
1241
+ if ( dim == AF_DIMENSION_HORZ )
1242
+ {
1243
+ if ( fitted < scaled )
1244
+ scale -= scale / 50; /* scale *= 0.98 */
1245
+ }
1246
+ else
1247
+ #endif
1248
+ if ( dim == AF_DIMENSION_VERT )
1249
+ {
1250
+ FT_Pos max_height;
1251
+ FT_Pos dist;
1252
+ FT_Fixed new_scale;
1253
+
1254
+
1255
+ new_scale = FT_MulDiv( scale, fitted, scaled );
1256
+
1257
+ /* the scaling should not change the result by more than two pixels */
1258
+ max_height = metrics->units_per_em;
1259
+
1260
+ for ( nn = 0; nn < Axis->blue_count; nn++ )
1261
+ {
1262
+ max_height = FT_MAX( max_height, Axis->blues[nn].ascender );
1263
+ max_height = FT_MAX( max_height, -Axis->blues[nn].descender );
1264
+ }
1265
+
1266
+ dist = FT_MulFix( max_height, new_scale - scale );
1267
+
1268
+ if ( -128 < dist && dist < 128 )
1269
+ {
1270
+ FT_TRACE5(( "af_latin_metrics_scale_dim:"
1271
+ " x height alignment (style `%s'):\n",
1272
+ af_style_names[metrics->root.style_class->style] ));
1273
+ FT_TRACE5(( " "
1274
+ " vertical scaling changed"
1275
+ " from %.5f to %.5f (by %ld%%)\n",
1276
+ (double)scale / 65536,
1277
+ (double)new_scale / 65536,
1278
+ ( fitted - scaled ) * 100 / scaled ));
1279
+ FT_TRACE5(( "\n" ));
1280
+
1281
+ scale = new_scale;
1282
+ }
1283
+ #ifdef FT_DEBUG_LEVEL_TRACE
1284
+ else
1285
+ {
1286
+ FT_TRACE5(( "af_latin_metrics_scale_dim:"
1287
+ " x height alignment (style `%s'):\n",
1288
+ af_style_names[metrics->root.style_class->style] ));
1289
+ FT_TRACE5(( " "
1290
+ " excessive vertical scaling abandoned\n" ));
1291
+ FT_TRACE5(( "\n" ));
1292
+ }
1293
+ #endif
1294
+ }
1295
+ }
1296
+ }
1297
+ }
1298
+
1299
+ axis->scale = scale;
1300
+ axis->delta = delta;
1301
+
1302
+ if ( dim == AF_DIMENSION_HORZ )
1303
+ {
1304
+ metrics->root.scaler.x_scale = scale;
1305
+ metrics->root.scaler.x_delta = delta;
1306
+ }
1307
+ else
1308
+ {
1309
+ metrics->root.scaler.y_scale = scale;
1310
+ metrics->root.scaler.y_delta = delta;
1311
+ }
1312
+
1313
+ FT_TRACE5(( "%s widths (style `%s')\n",
1314
+ dim == AF_DIMENSION_HORZ ? "horizontal" : "vertical",
1315
+ af_style_names[metrics->root.style_class->style] ));
1316
+
1317
+ /* scale the widths */
1318
+ for ( nn = 0; nn < axis->width_count; nn++ )
1319
+ {
1320
+ AF_Width width = axis->widths + nn;
1321
+
1322
+
1323
+ width->cur = FT_MulFix( width->org, scale );
1324
+ width->fit = width->cur;
1325
+
1326
+ FT_TRACE5(( " %ld scaled to %.2f\n",
1327
+ width->org,
1328
+ (double)width->cur / 64 ));
1329
+ }
1330
+
1331
+ FT_TRACE5(( "\n" ));
1332
+
1333
+ /* an extra-light axis corresponds to a standard width that is */
1334
+ /* smaller than 5/8 pixels */
1335
+ axis->extra_light =
1336
+ FT_BOOL( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );
1337
+
1338
+ #ifdef FT_DEBUG_LEVEL_TRACE
1339
+ if ( axis->extra_light )
1340
+ {
1341
+ FT_TRACE5(( "`%s' style is extra light (at current resolution)\n",
1342
+ af_style_names[metrics->root.style_class->style] ));
1343
+ FT_TRACE5(( "\n" ));
1344
+ }
1345
+ #endif
1346
+
1347
+ if ( dim == AF_DIMENSION_VERT )
1348
+ {
1349
+ #ifdef FT_DEBUG_LEVEL_TRACE
1350
+ if ( axis->blue_count )
1351
+ FT_TRACE5(( "blue zones (style `%s')\n",
1352
+ af_style_names[metrics->root.style_class->style] ));
1353
+ #endif
1354
+
1355
+ /* scale the blue zones */
1356
+ for ( nn = 0; nn < axis->blue_count; nn++ )
1357
+ {
1358
+ AF_LatinBlue blue = &axis->blues[nn];
1359
+ FT_Pos dist;
1360
+
1361
+
1362
+ blue->ref.cur = FT_MulFix( blue->ref.org, scale ) + delta;
1363
+ blue->ref.fit = blue->ref.cur;
1364
+ blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;
1365
+ blue->shoot.fit = blue->shoot.cur;
1366
+ blue->flags &= ~AF_LATIN_BLUE_ACTIVE;
1367
+
1368
+ /* a blue zone is only active if it is less than 3/4 pixels tall */
1369
+ dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );
1370
+ if ( dist <= 48 && dist >= -48 )
1371
+ {
1372
+ #if 0
1373
+ FT_Pos delta1;
1374
+ #endif
1375
+ FT_Pos delta2;
1376
+
1377
+
1378
+ /* use discrete values for blue zone widths */
1379
+
1380
+ #if 0
1381
+
1382
+ /* generic, original code */
1383
+ delta1 = blue->shoot.org - blue->ref.org;
1384
+ delta2 = delta1;
1385
+ if ( delta1 < 0 )
1386
+ delta2 = -delta2;
1387
+
1388
+ delta2 = FT_MulFix( delta2, scale );
1389
+
1390
+ if ( delta2 < 32 )
1391
+ delta2 = 0;
1392
+ else if ( delta2 < 64 )
1393
+ delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );
1394
+ else
1395
+ delta2 = FT_PIX_ROUND( delta2 );
1396
+
1397
+ if ( delta1 < 0 )
1398
+ delta2 = -delta2;
1399
+
1400
+ blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
1401
+ blue->shoot.fit = blue->ref.fit + delta2;
1402
+
1403
+ #else
1404
+
1405
+ /* simplified version due to abs(dist) <= 48 */
1406
+ delta2 = dist;
1407
+ if ( dist < 0 )
1408
+ delta2 = -delta2;
1409
+
1410
+ if ( delta2 < 32 )
1411
+ delta2 = 0;
1412
+ else if ( delta2 < 48 )
1413
+ delta2 = 32;
1414
+ else
1415
+ delta2 = 64;
1416
+
1417
+ if ( dist < 0 )
1418
+ delta2 = -delta2;
1419
+
1420
+ blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
1421
+ blue->shoot.fit = blue->ref.fit - delta2;
1422
+
1423
+ #endif
1424
+
1425
+ blue->flags |= AF_LATIN_BLUE_ACTIVE;
1426
+ }
1427
+ }
1428
+
1429
+ /* use sub-top blue zone only if it doesn't overlap with */
1430
+ /* another (non-sup-top) blue zone; otherwise, the */
1431
+ /* effect would be similar to a neutral blue zone, which */
1432
+ /* is not desired here */
1433
+ for ( nn = 0; nn < axis->blue_count; nn++ )
1434
+ {
1435
+ AF_LatinBlue blue = &axis->blues[nn];
1436
+ FT_UInt i;
1437
+
1438
+
1439
+ if ( !( blue->flags & AF_LATIN_BLUE_SUB_TOP ) )
1440
+ continue;
1441
+ if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) )
1442
+ continue;
1443
+
1444
+ for ( i = 0; i < axis->blue_count; i++ )
1445
+ {
1446
+ AF_LatinBlue b = &axis->blues[i];
1447
+
1448
+
1449
+ if ( b->flags & AF_LATIN_BLUE_SUB_TOP )
1450
+ continue;
1451
+ if ( !( b->flags & AF_LATIN_BLUE_ACTIVE ) )
1452
+ continue;
1453
+
1454
+ if ( b->ref.fit <= blue->shoot.fit &&
1455
+ b->shoot.fit >= blue->ref.fit )
1456
+ {
1457
+ blue->flags &= ~AF_LATIN_BLUE_ACTIVE;
1458
+ break;
1459
+ }
1460
+ }
1461
+ }
1462
+
1463
+ #ifdef FT_DEBUG_LEVEL_TRACE
1464
+ for ( nn = 0; nn < axis->blue_count; nn++ )
1465
+ {
1466
+ AF_LatinBlue blue = &axis->blues[nn];
1467
+
1468
+
1469
+ FT_TRACE5(( " reference %d: %ld scaled to %.2f%s\n",
1470
+ nn,
1471
+ blue->ref.org,
1472
+ (double)blue->ref.fit / 64,
1473
+ ( blue->flags & AF_LATIN_BLUE_ACTIVE ) ? ""
1474
+ : " (inactive)" ));
1475
+ FT_TRACE5(( " overshoot %d: %ld scaled to %.2f%s\n",
1476
+ nn,
1477
+ blue->shoot.org,
1478
+ (double)blue->shoot.fit / 64,
1479
+ ( blue->flags & AF_LATIN_BLUE_ACTIVE ) ? ""
1480
+ : " (inactive)" ));
1481
+ }
1482
+ #endif
1483
+ }
1484
+ }
1485
+
1486
+
1487
+ /* Scale global values in both directions. */
1488
+
1489
+ FT_LOCAL_DEF( void )
1490
+ af_latin_metrics_scale( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
1491
+ AF_Scaler scaler )
1492
+ {
1493
+ AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
1494
+
1495
+
1496
+ metrics->root.scaler.render_mode = scaler->render_mode;
1497
+ metrics->root.scaler.face = scaler->face;
1498
+ metrics->root.scaler.flags = scaler->flags;
1499
+
1500
+ af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );
1501
+ af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );
1502
+ }
1503
+
1504
+
1505
+ /* Extract standard_width from writing system/script specific */
1506
+ /* metrics class. */
1507
+
1508
+ FT_CALLBACK_DEF( void )
1509
+ af_latin_get_standard_widths( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
1510
+ FT_Pos* stdHW,
1511
+ FT_Pos* stdVW )
1512
+ {
1513
+ AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
1514
+
1515
+
1516
+ if ( stdHW )
1517
+ *stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width;
1518
+
1519
+ if ( stdVW )
1520
+ *stdVW = metrics->axis[AF_DIMENSION_HORZ].standard_width;
1521
+ }
1522
+
1523
+
1524
+ /*************************************************************************/
1525
+ /*************************************************************************/
1526
+ /***** *****/
1527
+ /***** L A T I N G L Y P H A N A L Y S I S *****/
1528
+ /***** *****/
1529
+ /*************************************************************************/
1530
+ /*************************************************************************/
1531
+
1532
+
1533
+ /* Walk over all contours and compute its segments. */
1534
+
1535
+ FT_LOCAL_DEF( FT_Error )
1536
+ af_latin_hints_compute_segments( AF_GlyphHints hints,
1537
+ AF_Dimension dim )
1538
+ {
1539
+ AF_LatinMetrics metrics = (AF_LatinMetrics)hints->metrics;
1540
+ AF_AxisHints axis = &hints->axis[dim];
1541
+ FT_Memory memory = hints->memory;
1542
+ FT_Error error = FT_Err_Ok;
1543
+ AF_Segment segment = NULL;
1544
+ AF_SegmentRec seg0;
1545
+ AF_Point* contour = hints->contours;
1546
+ AF_Point* contour_limit = contour + hints->num_contours;
1547
+ AF_Direction major_dir, segment_dir;
1548
+
1549
+ FT_Pos flat_threshold = FLAT_THRESHOLD( metrics->units_per_em );
1550
+
1551
+
1552
+ FT_ZERO( &seg0 );
1553
+ seg0.score = 32000;
1554
+ seg0.flags = AF_EDGE_NORMAL;
1555
+
1556
+ major_dir = (AF_Direction)FT_ABS( axis->major_dir );
1557
+ segment_dir = major_dir;
1558
+
1559
+ axis->num_segments = 0;
1560
+
1561
+ /* set up (u,v) in each point */
1562
+ if ( dim == AF_DIMENSION_HORZ )
1563
+ {
1564
+ AF_Point point = hints->points;
1565
+ AF_Point limit = point + hints->num_points;
1566
+
1567
+
1568
+ for ( ; point < limit; point++ )
1569
+ {
1570
+ point->u = point->fx;
1571
+ point->v = point->fy;
1572
+ }
1573
+ }
1574
+ else
1575
+ {
1576
+ AF_Point point = hints->points;
1577
+ AF_Point limit = point + hints->num_points;
1578
+
1579
+
1580
+ for ( ; point < limit; point++ )
1581
+ {
1582
+ point->u = point->fy;
1583
+ point->v = point->fx;
1584
+ }
1585
+ }
1586
+
1587
+ /* do each contour separately */
1588
+ for ( ; contour < contour_limit; contour++ )
1589
+ {
1590
+ AF_Point point = contour[0];
1591
+ AF_Point last = point->prev;
1592
+ int on_edge = 0;
1593
+
1594
+ /* we call values measured along a segment (point->v) */
1595
+ /* `coordinates', and values orthogonal to it (point->u) */
1596
+ /* `positions' */
1597
+ FT_Pos min_pos = 32000;
1598
+ FT_Pos max_pos = -32000;
1599
+ FT_Pos min_coord = 32000;
1600
+ FT_Pos max_coord = -32000;
1601
+ FT_UShort min_flags = AF_FLAG_NONE;
1602
+ FT_UShort max_flags = AF_FLAG_NONE;
1603
+ FT_Pos min_on_coord = 32000;
1604
+ FT_Pos max_on_coord = -32000;
1605
+
1606
+ FT_Bool passed;
1607
+
1608
+ AF_Segment prev_segment = NULL;
1609
+
1610
+ FT_Pos prev_min_pos = min_pos;
1611
+ FT_Pos prev_max_pos = max_pos;
1612
+ FT_Pos prev_min_coord = min_coord;
1613
+ FT_Pos prev_max_coord = max_coord;
1614
+ FT_UShort prev_min_flags = min_flags;
1615
+ FT_UShort prev_max_flags = max_flags;
1616
+ FT_Pos prev_min_on_coord = min_on_coord;
1617
+ FT_Pos prev_max_on_coord = max_on_coord;
1618
+
1619
+
1620
+ if ( FT_ABS( last->out_dir ) == major_dir &&
1621
+ FT_ABS( point->out_dir ) == major_dir )
1622
+ {
1623
+ /* we are already on an edge, try to locate its start */
1624
+ last = point;
1625
+
1626
+ for (;;)
1627
+ {
1628
+ point = point->prev;
1629
+ if ( FT_ABS( point->out_dir ) != major_dir )
1630
+ {
1631
+ point = point->next;
1632
+ break;
1633
+ }
1634
+ if ( point == last )
1635
+ break;
1636
+ }
1637
+ }
1638
+
1639
+ last = point;
1640
+ passed = 0;
1641
+
1642
+ for (;;)
1643
+ {
1644
+ FT_Pos u, v;
1645
+
1646
+
1647
+ if ( on_edge )
1648
+ {
1649
+ /* get minimum and maximum position */
1650
+ u = point->u;
1651
+ if ( u < min_pos )
1652
+ min_pos = u;
1653
+ if ( u > max_pos )
1654
+ max_pos = u;
1655
+
1656
+ /* get minimum and maximum coordinate together with flags */
1657
+ v = point->v;
1658
+ if ( v < min_coord )
1659
+ {
1660
+ min_coord = v;
1661
+ min_flags = point->flags;
1662
+ }
1663
+ if ( v > max_coord )
1664
+ {
1665
+ max_coord = v;
1666
+ max_flags = point->flags;
1667
+ }
1668
+
1669
+ /* get minimum and maximum coordinate of `on' points */
1670
+ if ( !( point->flags & AF_FLAG_CONTROL ) )
1671
+ {
1672
+ v = point->v;
1673
+ if ( v < min_on_coord )
1674
+ min_on_coord = v;
1675
+ if ( v > max_on_coord )
1676
+ max_on_coord = v;
1677
+ }
1678
+
1679
+ if ( point->out_dir != segment_dir || point == last )
1680
+ {
1681
+ /* check whether the new segment's start point is identical to */
1682
+ /* the previous segment's end point; for example, this might */
1683
+ /* happen for spikes */
1684
+
1685
+ if ( !prev_segment || segment->first != prev_segment->last )
1686
+ {
1687
+ /* points are different: we are just leaving an edge, thus */
1688
+ /* record a new segment */
1689
+
1690
+ segment->last = point;
1691
+ segment->pos = (FT_Short)( ( min_pos + max_pos ) >> 1 );
1692
+ segment->delta = (FT_Short)( ( max_pos - min_pos ) >> 1 );
1693
+
1694
+ /* a segment is round if either its first or last point */
1695
+ /* is a control point, and the length of the on points */
1696
+ /* inbetween doesn't exceed a heuristic limit */
1697
+ if ( ( min_flags | max_flags ) & AF_FLAG_CONTROL &&
1698
+ ( max_on_coord - min_on_coord ) < flat_threshold )
1699
+ segment->flags |= AF_EDGE_ROUND;
1700
+
1701
+ segment->min_coord = (FT_Short)min_coord;
1702
+ segment->max_coord = (FT_Short)max_coord;
1703
+ segment->height = segment->max_coord - segment->min_coord;
1704
+
1705
+ prev_segment = segment;
1706
+ prev_min_pos = min_pos;
1707
+ prev_max_pos = max_pos;
1708
+ prev_min_coord = min_coord;
1709
+ prev_max_coord = max_coord;
1710
+ prev_min_flags = min_flags;
1711
+ prev_max_flags = max_flags;
1712
+ prev_min_on_coord = min_on_coord;
1713
+ prev_max_on_coord = max_on_coord;
1714
+ }
1715
+ else
1716
+ {
1717
+ /* points are the same: we don't create a new segment but */
1718
+ /* merge the current segment with the previous one */
1719
+
1720
+ if ( prev_segment->last->in_dir == point->in_dir )
1721
+ {
1722
+ /* we have identical directions (this can happen for */
1723
+ /* degenerate outlines that move zig-zag along the main */
1724
+ /* axis without changing the coordinate value of the other */
1725
+ /* axis, and where the segments have just been merged): */
1726
+ /* unify segments */
1727
+
1728
+ /* update constraints */
1729
+
1730
+ if ( prev_min_pos < min_pos )
1731
+ min_pos = prev_min_pos;
1732
+ if ( prev_max_pos > max_pos )
1733
+ max_pos = prev_max_pos;
1734
+
1735
+ if ( prev_min_coord < min_coord )
1736
+ {
1737
+ min_coord = prev_min_coord;
1738
+ min_flags = prev_min_flags;
1739
+ }
1740
+ if ( prev_max_coord > max_coord )
1741
+ {
1742
+ max_coord = prev_max_coord;
1743
+ max_flags = prev_max_flags;
1744
+ }
1745
+
1746
+ if ( prev_min_on_coord < min_on_coord )
1747
+ min_on_coord = prev_min_on_coord;
1748
+ if ( prev_max_on_coord > max_on_coord )
1749
+ max_on_coord = prev_max_on_coord;
1750
+
1751
+ prev_segment->last = point;
1752
+ prev_segment->pos = (FT_Short)( ( min_pos +
1753
+ max_pos ) >> 1 );
1754
+ prev_segment->delta = (FT_Short)( ( max_pos -
1755
+ min_pos ) >> 1 );
1756
+
1757
+ if ( ( min_flags | max_flags ) & AF_FLAG_CONTROL &&
1758
+ ( max_on_coord - min_on_coord ) < flat_threshold )
1759
+ prev_segment->flags |= AF_EDGE_ROUND;
1760
+ else
1761
+ prev_segment->flags &= ~AF_EDGE_ROUND;
1762
+
1763
+ prev_segment->min_coord = (FT_Short)min_coord;
1764
+ prev_segment->max_coord = (FT_Short)max_coord;
1765
+ prev_segment->height = prev_segment->max_coord -
1766
+ prev_segment->min_coord;
1767
+ }
1768
+ else
1769
+ {
1770
+ /* we have different directions; use the properties of the */
1771
+ /* longer segment and discard the other one */
1772
+
1773
+ if ( FT_ABS( prev_max_coord - prev_min_coord ) >
1774
+ FT_ABS( max_coord - min_coord ) )
1775
+ {
1776
+ /* discard current segment */
1777
+
1778
+ if ( min_pos < prev_min_pos )
1779
+ prev_min_pos = min_pos;
1780
+ if ( max_pos > prev_max_pos )
1781
+ prev_max_pos = max_pos;
1782
+
1783
+ prev_segment->last = point;
1784
+ prev_segment->pos = (FT_Short)( ( prev_min_pos +
1785
+ prev_max_pos ) >> 1 );
1786
+ prev_segment->delta = (FT_Short)( ( prev_max_pos -
1787
+ prev_min_pos ) >> 1 );
1788
+ }
1789
+ else
1790
+ {
1791
+ /* discard previous segment */
1792
+
1793
+ if ( prev_min_pos < min_pos )
1794
+ min_pos = prev_min_pos;
1795
+ if ( prev_max_pos > max_pos )
1796
+ max_pos = prev_max_pos;
1797
+
1798
+ segment->last = point;
1799
+ segment->pos = (FT_Short)( ( min_pos + max_pos ) >> 1 );
1800
+ segment->delta = (FT_Short)( ( max_pos - min_pos ) >> 1 );
1801
+
1802
+ if ( ( min_flags | max_flags ) & AF_FLAG_CONTROL &&
1803
+ ( max_on_coord - min_on_coord ) < flat_threshold )
1804
+ segment->flags |= AF_EDGE_ROUND;
1805
+
1806
+ segment->min_coord = (FT_Short)min_coord;
1807
+ segment->max_coord = (FT_Short)max_coord;
1808
+ segment->height = segment->max_coord -
1809
+ segment->min_coord;
1810
+
1811
+ *prev_segment = *segment;
1812
+
1813
+ prev_min_pos = min_pos;
1814
+ prev_max_pos = max_pos;
1815
+ prev_min_coord = min_coord;
1816
+ prev_max_coord = max_coord;
1817
+ prev_min_flags = min_flags;
1818
+ prev_max_flags = max_flags;
1819
+ prev_min_on_coord = min_on_coord;
1820
+ prev_max_on_coord = max_on_coord;
1821
+ }
1822
+ }
1823
+
1824
+ axis->num_segments--;
1825
+ }
1826
+
1827
+ on_edge = 0;
1828
+ segment = NULL;
1829
+
1830
+ /* fall through */
1831
+ }
1832
+ }
1833
+
1834
+ /* now exit if we are at the start/end point */
1835
+ if ( point == last )
1836
+ {
1837
+ if ( passed )
1838
+ break;
1839
+ passed = 1;
1840
+ }
1841
+
1842
+ /* if we are not on an edge, check whether the major direction */
1843
+ /* coincides with the current point's `out' direction, or */
1844
+ /* whether we have a single-point contour */
1845
+ if ( !on_edge &&
1846
+ ( FT_ABS( point->out_dir ) == major_dir ||
1847
+ point == point->prev ) )
1848
+ {
1849
+ /*
1850
+ * For efficiency, we restrict the number of segments to 1000,
1851
+ * which is a heuristic value: it is very unlikely that a glyph
1852
+ * with so many segments can be hinted in a sensible way.
1853
+ * Reasons:
1854
+ *
1855
+ * - The glyph has really 1000 segments; this implies that it has
1856
+ * at least 2000 outline points. Assuming 'normal' fonts that
1857
+ * have superfluous points optimized away, viewing such a glyph
1858
+ * only makes sense at large magnifications where hinting
1859
+ * isn't applied anyway.
1860
+ *
1861
+ * - We have a broken glyph. Hinting doesn't make sense in this
1862
+ * case either.
1863
+ */
1864
+ if ( axis->num_segments > 1000 )
1865
+ {
1866
+ FT_TRACE0(( "af_latin_hints_compute_segments:"
1867
+ " more than 1000 segments in this glyph;\n" ));
1868
+ FT_TRACE0(( " "
1869
+ " hinting is suppressed\n" ));
1870
+ axis->num_segments = 0;
1871
+ return FT_Err_Ok;
1872
+ }
1873
+
1874
+ /* this is the start of a new segment! */
1875
+ segment_dir = (AF_Direction)point->out_dir;
1876
+
1877
+ error = af_axis_hints_new_segment( axis, memory, &segment );
1878
+ if ( error )
1879
+ goto Exit;
1880
+
1881
+ /* clear all segment fields */
1882
+ segment[0] = seg0;
1883
+
1884
+ segment->dir = (FT_Char)segment_dir;
1885
+ segment->first = point;
1886
+ segment->last = point;
1887
+
1888
+ /* `af_axis_hints_new_segment' reallocates memory, */
1889
+ /* thus we have to refresh the `prev_segment' pointer */
1890
+ if ( prev_segment )
1891
+ prev_segment = segment - 1;
1892
+
1893
+ min_pos = max_pos = point->u;
1894
+ min_coord = max_coord = point->v;
1895
+ min_flags = max_flags = point->flags;
1896
+
1897
+ if ( point->flags & AF_FLAG_CONTROL )
1898
+ {
1899
+ min_on_coord = 32000;
1900
+ max_on_coord = -32000;
1901
+ }
1902
+ else
1903
+ min_on_coord = max_on_coord = point->v;
1904
+
1905
+ on_edge = 1;
1906
+
1907
+ if ( point == point->prev )
1908
+ {
1909
+ /* we have a one-point segment: this is a one-point */
1910
+ /* contour with `in' and `out' direction set to */
1911
+ /* AF_DIR_NONE */
1912
+ segment->pos = (FT_Short)min_pos;
1913
+
1914
+ if (point->flags & AF_FLAG_CONTROL)
1915
+ segment->flags |= AF_EDGE_ROUND;
1916
+
1917
+ segment->min_coord = (FT_Short)point->v;
1918
+ segment->max_coord = (FT_Short)point->v;
1919
+ segment->height = 0;
1920
+
1921
+ on_edge = 0;
1922
+ segment = NULL;
1923
+ }
1924
+ }
1925
+
1926
+ point = point->next;
1927
+ }
1928
+
1929
+ } /* contours */
1930
+
1931
+
1932
+ /* now slightly increase the height of segments if this makes */
1933
+ /* sense -- this is used to better detect and ignore serifs */
1934
+ {
1935
+ AF_Segment segments = axis->segments;
1936
+ AF_Segment segments_end = FT_OFFSET( segments, axis->num_segments );
1937
+
1938
+
1939
+ for ( segment = segments; segment < segments_end; segment++ )
1940
+ {
1941
+ AF_Point first = segment->first;
1942
+ AF_Point last = segment->last;
1943
+ FT_Pos first_v = first->v;
1944
+ FT_Pos last_v = last->v;
1945
+
1946
+
1947
+ if ( first_v < last_v )
1948
+ {
1949
+ AF_Point p;
1950
+
1951
+
1952
+ p = first->prev;
1953
+ if ( p->v < first_v )
1954
+ segment->height = (FT_Short)( segment->height +
1955
+ ( ( first_v - p->v ) >> 1 ) );
1956
+
1957
+ p = last->next;
1958
+ if ( p->v > last_v )
1959
+ segment->height = (FT_Short)( segment->height +
1960
+ ( ( p->v - last_v ) >> 1 ) );
1961
+ }
1962
+ else
1963
+ {
1964
+ AF_Point p;
1965
+
1966
+
1967
+ p = first->prev;
1968
+ if ( p->v > first_v )
1969
+ segment->height = (FT_Short)( segment->height +
1970
+ ( ( p->v - first_v ) >> 1 ) );
1971
+
1972
+ p = last->next;
1973
+ if ( p->v < last_v )
1974
+ segment->height = (FT_Short)( segment->height +
1975
+ ( ( last_v - p->v ) >> 1 ) );
1976
+ }
1977
+ }
1978
+ }
1979
+
1980
+ Exit:
1981
+ return error;
1982
+ }
1983
+
1984
+
1985
+ /* Link segments to form stems and serifs. If `width_count' and */
1986
+ /* `widths' are non-zero, use them to fine-tune the scoring function. */
1987
+
1988
+ FT_LOCAL_DEF( void )
1989
+ af_latin_hints_link_segments( AF_GlyphHints hints,
1990
+ FT_UInt width_count,
1991
+ AF_WidthRec* widths,
1992
+ AF_Dimension dim )
1993
+ {
1994
+ AF_AxisHints axis = &hints->axis[dim];
1995
+ AF_Segment segments = axis->segments;
1996
+ AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments );
1997
+ FT_Pos len_threshold, len_score, dist_score, max_width;
1998
+ AF_Segment seg1, seg2;
1999
+
2000
+
2001
+ if ( width_count )
2002
+ max_width = widths[width_count - 1].org;
2003
+ else
2004
+ max_width = 0;
2005
+
2006
+ /* a heuristic value to set up a minimum value for overlapping */
2007
+ len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 );
2008
+ if ( len_threshold == 0 )
2009
+ len_threshold = 1;
2010
+
2011
+ /* a heuristic value to weight lengths */
2012
+ len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 );
2013
+
2014
+ /* a heuristic value to weight distances (no call to */
2015
+ /* AF_LATIN_CONSTANT needed, since we work on multiples */
2016
+ /* of the stem width) */
2017
+ dist_score = 3000;
2018
+
2019
+ /* now compare each segment to the others */
2020
+ for ( seg1 = segments; seg1 < segment_limit; seg1++ )
2021
+ {
2022
+ if ( seg1->dir != axis->major_dir )
2023
+ continue;
2024
+
2025
+ /* search for stems having opposite directions, */
2026
+ /* with seg1 to the `left' of seg2 */
2027
+ for ( seg2 = segments; seg2 < segment_limit; seg2++ )
2028
+ {
2029
+ FT_Pos pos1 = seg1->pos;
2030
+ FT_Pos pos2 = seg2->pos;
2031
+
2032
+
2033
+ if ( seg1->dir + seg2->dir == 0 && pos2 > pos1 )
2034
+ {
2035
+ /* compute distance between the two segments */
2036
+ FT_Pos min = seg1->min_coord;
2037
+ FT_Pos max = seg1->max_coord;
2038
+ FT_Pos len;
2039
+
2040
+
2041
+ if ( min < seg2->min_coord )
2042
+ min = seg2->min_coord;
2043
+
2044
+ if ( max > seg2->max_coord )
2045
+ max = seg2->max_coord;
2046
+
2047
+ /* compute maximum coordinate difference of the two segments */
2048
+ /* (that is, how much they overlap) */
2049
+ len = max - min;
2050
+ if ( len >= len_threshold )
2051
+ {
2052
+ /*
2053
+ * The score is the sum of two demerits indicating the
2054
+ * `badness' of a fit, measured along the segments' main axis
2055
+ * and orthogonal to it, respectively.
2056
+ *
2057
+ * - The less overlapping along the main axis, the worse it
2058
+ * is, causing a larger demerit.
2059
+ *
2060
+ * - The nearer the orthogonal distance to a stem width, the
2061
+ * better it is, causing a smaller demerit. For simplicity,
2062
+ * however, we only increase the demerit for values that
2063
+ * exceed the largest stem width.
2064
+ */
2065
+
2066
+ FT_Pos dist = pos2 - pos1;
2067
+
2068
+ FT_Pos dist_demerit, score;
2069
+
2070
+
2071
+ if ( max_width )
2072
+ {
2073
+ /* distance demerits are based on multiples of `max_width'; */
2074
+ /* we scale by 1024 for getting more precision */
2075
+ FT_Pos delta = ( dist << 10 ) / max_width - ( 1 << 10 );
2076
+
2077
+
2078
+ if ( delta > 10000 )
2079
+ dist_demerit = 32000;
2080
+ else if ( delta > 0 )
2081
+ dist_demerit = delta * delta / dist_score;
2082
+ else
2083
+ dist_demerit = 0;
2084
+ }
2085
+ else
2086
+ dist_demerit = dist; /* default if no widths available */
2087
+
2088
+ score = dist_demerit + len_score / len;
2089
+
2090
+ /* and we search for the smallest score */
2091
+ if ( score < seg1->score )
2092
+ {
2093
+ seg1->score = score;
2094
+ seg1->link = seg2;
2095
+ }
2096
+
2097
+ if ( score < seg2->score )
2098
+ {
2099
+ seg2->score = score;
2100
+ seg2->link = seg1;
2101
+ }
2102
+ }
2103
+ }
2104
+ }
2105
+ }
2106
+
2107
+ /* now compute the `serif' segments, cf. explanations in `afhints.h' */
2108
+ for ( seg1 = segments; seg1 < segment_limit; seg1++ )
2109
+ {
2110
+ seg2 = seg1->link;
2111
+
2112
+ if ( seg2 )
2113
+ {
2114
+ if ( seg2->link != seg1 )
2115
+ {
2116
+ seg1->link = NULL;
2117
+ seg1->serif = seg2->link;
2118
+ }
2119
+ }
2120
+ }
2121
+ }
2122
+
2123
+
2124
+ /* Link segments to edges, using feature analysis for selection. */
2125
+
2126
+ FT_LOCAL_DEF( FT_Error )
2127
+ af_latin_hints_compute_edges( AF_GlyphHints hints,
2128
+ AF_Dimension dim )
2129
+ {
2130
+ AF_AxisHints axis = &hints->axis[dim];
2131
+ FT_Error error = FT_Err_Ok;
2132
+ FT_Memory memory = hints->memory;
2133
+ AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim];
2134
+
2135
+ AF_StyleClass style_class = hints->metrics->style_class;
2136
+ AF_ScriptClass script_class = af_script_classes[style_class->script];
2137
+
2138
+ FT_Bool top_to_bottom_hinting = 0;
2139
+
2140
+ AF_Segment segments = axis->segments;
2141
+ AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments );
2142
+ AF_Segment seg;
2143
+
2144
+ #if 0
2145
+ AF_Direction up_dir;
2146
+ #endif
2147
+ FT_Fixed scale;
2148
+ FT_Pos edge_distance_threshold;
2149
+ FT_Pos segment_length_threshold;
2150
+ FT_Pos segment_width_threshold;
2151
+
2152
+
2153
+ axis->num_edges = 0;
2154
+
2155
+ scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale
2156
+ : hints->y_scale;
2157
+
2158
+ #if 0
2159
+ up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP
2160
+ : AF_DIR_RIGHT;
2161
+ #endif
2162
+
2163
+ if ( dim == AF_DIMENSION_VERT )
2164
+ top_to_bottom_hinting = script_class->top_to_bottom_hinting;
2165
+
2166
+ /*
2167
+ * We ignore all segments that are less than 1 pixel in length
2168
+ * to avoid many problems with serif fonts. We compute the
2169
+ * corresponding threshold in font units.
2170
+ */
2171
+ if ( dim == AF_DIMENSION_HORZ )
2172
+ segment_length_threshold = FT_DivFix( 64, hints->y_scale );
2173
+ else
2174
+ segment_length_threshold = 0;
2175
+
2176
+ /*
2177
+ * Similarly, we ignore segments that have a width delta
2178
+ * larger than 0.5px (i.e., a width larger than 1px).
2179
+ */
2180
+ segment_width_threshold = FT_DivFix( 32, scale );
2181
+
2182
+ /**********************************************************************
2183
+ *
2184
+ * We begin by generating a sorted table of edges for the current
2185
+ * direction. To do so, we simply scan each segment and try to find
2186
+ * an edge in our table that corresponds to its position.
2187
+ *
2188
+ * If no edge is found, we create and insert a new edge in the
2189
+ * sorted table. Otherwise, we simply add the segment to the edge's
2190
+ * list which gets processed in the second step to compute the
2191
+ * edge's properties.
2192
+ *
2193
+ * Note that the table of edges is sorted along the segment/edge
2194
+ * position.
2195
+ *
2196
+ */
2197
+
2198
+ /* assure that edge distance threshold is at most 0.25px */
2199
+ edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,
2200
+ scale );
2201
+ if ( edge_distance_threshold > 64 / 4 )
2202
+ edge_distance_threshold = 64 / 4;
2203
+
2204
+ edge_distance_threshold = FT_DivFix( edge_distance_threshold,
2205
+ scale );
2206
+
2207
+ for ( seg = segments; seg < segment_limit; seg++ )
2208
+ {
2209
+ AF_Edge found = NULL;
2210
+ FT_UInt ee;
2211
+
2212
+
2213
+ /* ignore too short segments, too wide ones, and, in this loop, */
2214
+ /* one-point segments without a direction */
2215
+ if ( seg->height < segment_length_threshold ||
2216
+ seg->delta > segment_width_threshold ||
2217
+ seg->dir == AF_DIR_NONE )
2218
+ continue;
2219
+
2220
+ /* A special case for serif edges: If they are smaller than */
2221
+ /* 1.5 pixels we ignore them. */
2222
+ if ( seg->serif &&
2223
+ 2 * seg->height < 3 * segment_length_threshold )
2224
+ continue;
2225
+
2226
+ /* look for an edge corresponding to the segment */
2227
+ for ( ee = 0; ee < axis->num_edges; ee++ )
2228
+ {
2229
+ AF_Edge edge = axis->edges + ee;
2230
+ FT_Pos dist;
2231
+
2232
+
2233
+ dist = seg->pos - edge->fpos;
2234
+ if ( dist < 0 )
2235
+ dist = -dist;
2236
+
2237
+ if ( dist < edge_distance_threshold && edge->dir == seg->dir )
2238
+ {
2239
+ found = edge;
2240
+ break;
2241
+ }
2242
+ }
2243
+
2244
+ if ( !found )
2245
+ {
2246
+ AF_Edge edge;
2247
+
2248
+
2249
+ /* insert a new edge in the list and */
2250
+ /* sort according to the position */
2251
+ error = af_axis_hints_new_edge( axis, seg->pos,
2252
+ (AF_Direction)seg->dir,
2253
+ top_to_bottom_hinting,
2254
+ memory, &edge );
2255
+ if ( error )
2256
+ goto Exit;
2257
+
2258
+ /* add the segment to the new edge's list */
2259
+ FT_ZERO( edge );
2260
+
2261
+ edge->first = seg;
2262
+ edge->last = seg;
2263
+ edge->dir = seg->dir;
2264
+ edge->fpos = seg->pos;
2265
+ edge->opos = FT_MulFix( seg->pos, scale );
2266
+ edge->pos = edge->opos;
2267
+ seg->edge_next = seg;
2268
+ }
2269
+ else
2270
+ {
2271
+ /* if an edge was found, simply add the segment to the edge's */
2272
+ /* list */
2273
+ seg->edge_next = found->first;
2274
+ found->last->edge_next = seg;
2275
+ found->last = seg;
2276
+ }
2277
+ }
2278
+
2279
+ /* we loop again over all segments to catch one-point segments */
2280
+ /* without a direction: if possible, link them to existing edges */
2281
+ for ( seg = segments; seg < segment_limit; seg++ )
2282
+ {
2283
+ AF_Edge found = NULL;
2284
+ FT_UInt ee;
2285
+
2286
+
2287
+ if ( seg->dir != AF_DIR_NONE )
2288
+ continue;
2289
+
2290
+ /* look for an edge corresponding to the segment */
2291
+ for ( ee = 0; ee < axis->num_edges; ee++ )
2292
+ {
2293
+ AF_Edge edge = axis->edges + ee;
2294
+ FT_Pos dist;
2295
+
2296
+
2297
+ dist = seg->pos - edge->fpos;
2298
+ if ( dist < 0 )
2299
+ dist = -dist;
2300
+
2301
+ if ( dist < edge_distance_threshold )
2302
+ {
2303
+ found = edge;
2304
+ break;
2305
+ }
2306
+ }
2307
+
2308
+ /* one-point segments without a match are ignored */
2309
+ if ( found )
2310
+ {
2311
+ seg->edge_next = found->first;
2312
+ found->last->edge_next = seg;
2313
+ found->last = seg;
2314
+ }
2315
+ }
2316
+
2317
+
2318
+ /*******************************************************************
2319
+ *
2320
+ * Good, we now compute each edge's properties according to the
2321
+ * segments found on its position. Basically, these are
2322
+ *
2323
+ * - the edge's main direction
2324
+ * - stem edge, serif edge or both (which defaults to stem then)
2325
+ * - rounded edge, straight or both (which defaults to straight)
2326
+ * - link for edge
2327
+ *
2328
+ */
2329
+
2330
+ /* first of all, set the `edge' field in each segment -- this is */
2331
+ /* required in order to compute edge links */
2332
+
2333
+ /*
2334
+ * Note that removing this loop and setting the `edge' field of each
2335
+ * segment directly in the code above slows down execution speed for
2336
+ * some reasons on platforms like the Sun.
2337
+ */
2338
+ {
2339
+ AF_Edge edges = axis->edges;
2340
+ AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges );
2341
+ AF_Edge edge;
2342
+
2343
+
2344
+ for ( edge = edges; edge < edge_limit; edge++ )
2345
+ {
2346
+ seg = edge->first;
2347
+ if ( seg )
2348
+ do
2349
+ {
2350
+ seg->edge = edge;
2351
+ seg = seg->edge_next;
2352
+
2353
+ } while ( seg != edge->first );
2354
+ }
2355
+
2356
+ /* now compute each edge properties */
2357
+ for ( edge = edges; edge < edge_limit; edge++ )
2358
+ {
2359
+ FT_Int is_round = 0; /* does it contain round segments? */
2360
+ FT_Int is_straight = 0; /* does it contain straight segments? */
2361
+ #if 0
2362
+ FT_Pos ups = 0; /* number of upwards segments */
2363
+ FT_Pos downs = 0; /* number of downwards segments */
2364
+ #endif
2365
+
2366
+
2367
+ seg = edge->first;
2368
+
2369
+ do
2370
+ {
2371
+ FT_Bool is_serif;
2372
+
2373
+
2374
+ /* check for roundness of segment */
2375
+ if ( seg->flags & AF_EDGE_ROUND )
2376
+ is_round++;
2377
+ else
2378
+ is_straight++;
2379
+
2380
+ #if 0
2381
+ /* check for segment direction */
2382
+ if ( seg->dir == up_dir )
2383
+ ups += seg->max_coord - seg->min_coord;
2384
+ else
2385
+ downs += seg->max_coord - seg->min_coord;
2386
+ #endif
2387
+
2388
+ /* check for links -- if seg->serif is set, then seg->link must */
2389
+ /* be ignored */
2390
+ is_serif = FT_BOOL( seg->serif &&
2391
+ seg->serif->edge &&
2392
+ seg->serif->edge != edge );
2393
+
2394
+ if ( ( seg->link && seg->link->edge ) || is_serif )
2395
+ {
2396
+ AF_Edge edge2;
2397
+ AF_Segment seg2;
2398
+
2399
+
2400
+ edge2 = edge->link;
2401
+ seg2 = seg->link;
2402
+
2403
+ if ( is_serif )
2404
+ {
2405
+ seg2 = seg->serif;
2406
+ edge2 = edge->serif;
2407
+ }
2408
+
2409
+ if ( edge2 )
2410
+ {
2411
+ FT_Pos edge_delta;
2412
+ FT_Pos seg_delta;
2413
+
2414
+
2415
+ edge_delta = edge->fpos - edge2->fpos;
2416
+ if ( edge_delta < 0 )
2417
+ edge_delta = -edge_delta;
2418
+
2419
+ seg_delta = seg->pos - seg2->pos;
2420
+ if ( seg_delta < 0 )
2421
+ seg_delta = -seg_delta;
2422
+
2423
+ if ( seg_delta < edge_delta )
2424
+ edge2 = seg2->edge;
2425
+ }
2426
+ else
2427
+ edge2 = seg2->edge;
2428
+
2429
+ if ( is_serif )
2430
+ {
2431
+ edge->serif = edge2;
2432
+ edge2->flags |= AF_EDGE_SERIF;
2433
+ }
2434
+ else
2435
+ edge->link = edge2;
2436
+ }
2437
+
2438
+ seg = seg->edge_next;
2439
+
2440
+ } while ( seg != edge->first );
2441
+
2442
+ /* set the round/straight flags */
2443
+ edge->flags = AF_EDGE_NORMAL;
2444
+
2445
+ if ( is_round > 0 && is_round >= is_straight )
2446
+ edge->flags |= AF_EDGE_ROUND;
2447
+
2448
+ #if 0
2449
+ /* set the edge's main direction */
2450
+ edge->dir = AF_DIR_NONE;
2451
+
2452
+ if ( ups > downs )
2453
+ edge->dir = (FT_Char)up_dir;
2454
+
2455
+ else if ( ups < downs )
2456
+ edge->dir = (FT_Char)-up_dir;
2457
+
2458
+ else if ( ups == downs )
2459
+ edge->dir = 0; /* both up and down! */
2460
+ #endif
2461
+
2462
+ /* get rid of serifs if link is set */
2463
+ /* XXX: This gets rid of many unpleasant artefacts! */
2464
+ /* Example: the `c' in cour.pfa at size 13 */
2465
+
2466
+ if ( edge->serif && edge->link )
2467
+ edge->serif = NULL;
2468
+ }
2469
+ }
2470
+
2471
+ Exit:
2472
+ return error;
2473
+ }
2474
+
2475
+
2476
+ /* Detect segments and edges for given dimension. */
2477
+
2478
+ FT_LOCAL_DEF( FT_Error )
2479
+ af_latin_hints_detect_features( AF_GlyphHints hints,
2480
+ FT_UInt width_count,
2481
+ AF_WidthRec* widths,
2482
+ AF_Dimension dim )
2483
+ {
2484
+ FT_Error error;
2485
+
2486
+
2487
+ error = af_latin_hints_compute_segments( hints, dim );
2488
+ if ( !error )
2489
+ {
2490
+ af_latin_hints_link_segments( hints, width_count, widths, dim );
2491
+
2492
+ error = af_latin_hints_compute_edges( hints, dim );
2493
+ }
2494
+
2495
+ return error;
2496
+ }
2497
+
2498
+
2499
+ /* Compute all edges which lie within blue zones. */
2500
+
2501
+ static void
2502
+ af_latin_hints_compute_blue_edges( AF_GlyphHints hints,
2503
+ AF_LatinMetrics metrics )
2504
+ {
2505
+ AF_AxisHints axis = &hints->axis[AF_DIMENSION_VERT];
2506
+ AF_Edge edge = axis->edges;
2507
+ AF_Edge edge_limit = FT_OFFSET( edge, axis->num_edges );
2508
+ AF_LatinAxis latin = &metrics->axis[AF_DIMENSION_VERT];
2509
+ FT_Fixed scale = latin->scale;
2510
+
2511
+
2512
+ /* compute which blue zones are active, i.e. have their scaled */
2513
+ /* size < 3/4 pixels */
2514
+
2515
+ /* for each horizontal edge search the blue zone which is closest */
2516
+ for ( ; edge < edge_limit; edge++ )
2517
+ {
2518
+ FT_UInt bb;
2519
+ AF_Width best_blue = NULL;
2520
+ FT_Bool best_blue_is_neutral = 0;
2521
+ FT_Pos best_dist; /* initial threshold */
2522
+
2523
+
2524
+ /* compute the initial threshold as a fraction of the EM size */
2525
+ /* (the value 40 is heuristic) */
2526
+ best_dist = FT_MulFix( metrics->units_per_em / 40, scale );
2527
+
2528
+ /* assure a minimum distance of 0.5px */
2529
+ if ( best_dist > 64 / 2 )
2530
+ best_dist = 64 / 2;
2531
+
2532
+ for ( bb = 0; bb < latin->blue_count; bb++ )
2533
+ {
2534
+ AF_LatinBlue blue = latin->blues + bb;
2535
+ FT_Bool is_top_blue, is_neutral_blue, is_major_dir;
2536
+
2537
+
2538
+ /* skip inactive blue zones (i.e., those that are too large) */
2539
+ if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) )
2540
+ continue;
2541
+
2542
+ /* if it is a top zone, check for right edges (against the major */
2543
+ /* direction); if it is a bottom zone, check for left edges (in */
2544
+ /* the major direction) -- this assumes the TrueType convention */
2545
+ /* for the orientation of contours */
2546
+ is_top_blue =
2547
+ (FT_Byte)( ( blue->flags & ( AF_LATIN_BLUE_TOP |
2548
+ AF_LATIN_BLUE_SUB_TOP ) ) != 0 );
2549
+ is_neutral_blue =
2550
+ (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_NEUTRAL ) != 0);
2551
+ is_major_dir =
2552
+ FT_BOOL( edge->dir == axis->major_dir );
2553
+
2554
+ /* neutral blue zones are handled for both directions */
2555
+ if ( is_top_blue ^ is_major_dir || is_neutral_blue )
2556
+ {
2557
+ FT_Pos dist;
2558
+
2559
+
2560
+ /* first of all, compare it to the reference position */
2561
+ dist = edge->fpos - blue->ref.org;
2562
+ if ( dist < 0 )
2563
+ dist = -dist;
2564
+
2565
+ dist = FT_MulFix( dist, scale );
2566
+ if ( dist < best_dist )
2567
+ {
2568
+ best_dist = dist;
2569
+ best_blue = &blue->ref;
2570
+ best_blue_is_neutral = is_neutral_blue;
2571
+ }
2572
+
2573
+ /* now compare it to the overshoot position and check whether */
2574
+ /* the edge is rounded, and whether the edge is over the */
2575
+ /* reference position of a top zone, or under the reference */
2576
+ /* position of a bottom zone (provided we don't have a */
2577
+ /* neutral blue zone) */
2578
+ if ( edge->flags & AF_EDGE_ROUND &&
2579
+ dist != 0 &&
2580
+ !is_neutral_blue )
2581
+ {
2582
+ FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );
2583
+
2584
+
2585
+ if ( is_top_blue ^ is_under_ref )
2586
+ {
2587
+ dist = edge->fpos - blue->shoot.org;
2588
+ if ( dist < 0 )
2589
+ dist = -dist;
2590
+
2591
+ dist = FT_MulFix( dist, scale );
2592
+ if ( dist < best_dist )
2593
+ {
2594
+ best_dist = dist;
2595
+ best_blue = &blue->shoot;
2596
+ best_blue_is_neutral = is_neutral_blue;
2597
+ }
2598
+ }
2599
+ }
2600
+ }
2601
+ }
2602
+
2603
+ if ( best_blue )
2604
+ {
2605
+ edge->blue_edge = best_blue;
2606
+ if ( best_blue_is_neutral )
2607
+ edge->flags |= AF_EDGE_NEUTRAL;
2608
+ }
2609
+ }
2610
+ }
2611
+
2612
+
2613
+ /* Initalize hinting engine. */
2614
+
2615
+ static FT_Error
2616
+ af_latin_hints_init( AF_GlyphHints hints,
2617
+ AF_StyleMetrics metrics_ ) /* AF_LatinMetrics */
2618
+ {
2619
+ AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
2620
+
2621
+ FT_Render_Mode mode;
2622
+ FT_UInt32 scaler_flags, other_flags;
2623
+ FT_Face face = metrics->root.scaler.face;
2624
+
2625
+
2626
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
2627
+
2628
+ /*
2629
+ * correct x_scale and y_scale if needed, since they may have
2630
+ * been modified by `af_latin_metrics_scale_dim' above
2631
+ */
2632
+ hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;
2633
+ hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;
2634
+ hints->y_scale = metrics->axis[AF_DIMENSION_VERT].scale;
2635
+ hints->y_delta = metrics->axis[AF_DIMENSION_VERT].delta;
2636
+
2637
+ /* compute flags depending on render mode, etc. */
2638
+ mode = metrics->root.scaler.render_mode;
2639
+
2640
+ scaler_flags = hints->scaler_flags;
2641
+ other_flags = 0;
2642
+
2643
+ /*
2644
+ * We snap the width of vertical stems for the monochrome and
2645
+ * horizontal LCD rendering targets only.
2646
+ */
2647
+ if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
2648
+ other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
2649
+
2650
+ /*
2651
+ * We snap the width of horizontal stems for the monochrome and
2652
+ * vertical LCD rendering targets only.
2653
+ */
2654
+ if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
2655
+ other_flags |= AF_LATIN_HINTS_VERT_SNAP;
2656
+
2657
+ /*
2658
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
2659
+ */
2660
+ if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
2661
+ other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
2662
+
2663
+ if ( mode == FT_RENDER_MODE_MONO )
2664
+ other_flags |= AF_LATIN_HINTS_MONO;
2665
+
2666
+ /*
2667
+ * In `light' or `lcd' mode we disable horizontal hinting completely.
2668
+ * We also do it if the face is italic.
2669
+ *
2670
+ * However, if warping is enabled (which only works in `light' hinting
2671
+ * mode), advance widths get adjusted, too.
2672
+ */
2673
+ if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
2674
+ ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
2675
+ scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
2676
+
2677
+ hints->scaler_flags = scaler_flags;
2678
+ hints->other_flags = other_flags;
2679
+
2680
+ return FT_Err_Ok;
2681
+ }
2682
+
2683
+
2684
+ /*************************************************************************/
2685
+ /*************************************************************************/
2686
+ /***** *****/
2687
+ /***** L A T I N G L Y P H G R I D - F I T T I N G *****/
2688
+ /***** *****/
2689
+ /*************************************************************************/
2690
+ /*************************************************************************/
2691
+
2692
+ /* Snap a given width in scaled coordinates to one of the */
2693
+ /* current standard widths. */
2694
+
2695
+ static FT_Pos
2696
+ af_latin_snap_width( AF_Width widths,
2697
+ FT_UInt count,
2698
+ FT_Pos width )
2699
+ {
2700
+ FT_UInt n;
2701
+ FT_Pos best = 64 + 32 + 2;
2702
+ FT_Pos reference = width;
2703
+ FT_Pos scaled;
2704
+
2705
+
2706
+ for ( n = 0; n < count; n++ )
2707
+ {
2708
+ FT_Pos w;
2709
+ FT_Pos dist;
2710
+
2711
+
2712
+ w = widths[n].cur;
2713
+ dist = width - w;
2714
+ if ( dist < 0 )
2715
+ dist = -dist;
2716
+ if ( dist < best )
2717
+ {
2718
+ best = dist;
2719
+ reference = w;
2720
+ }
2721
+ }
2722
+
2723
+ scaled = FT_PIX_ROUND( reference );
2724
+
2725
+ if ( width >= reference )
2726
+ {
2727
+ if ( width < scaled + 48 )
2728
+ width = reference;
2729
+ }
2730
+ else
2731
+ {
2732
+ if ( width > scaled - 48 )
2733
+ width = reference;
2734
+ }
2735
+
2736
+ return width;
2737
+ }
2738
+
2739
+
2740
+ /* Compute the snapped width of a given stem, ignoring very thin ones. */
2741
+ /* There is a lot of voodoo in this function; changing the hard-coded */
2742
+ /* parameters influence the whole hinting process. */
2743
+
2744
+ static FT_Pos
2745
+ af_latin_compute_stem_width( AF_GlyphHints hints,
2746
+ AF_Dimension dim,
2747
+ FT_Pos width,
2748
+ FT_Pos base_delta,
2749
+ FT_UInt base_flags,
2750
+ FT_UInt stem_flags )
2751
+ {
2752
+ AF_LatinMetrics metrics = (AF_LatinMetrics)hints->metrics;
2753
+ AF_LatinAxis axis = &metrics->axis[dim];
2754
+ FT_Pos dist = width;
2755
+ FT_Int sign = 0;
2756
+ FT_Int vertical = ( dim == AF_DIMENSION_VERT );
2757
+
2758
+
2759
+ if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||
2760
+ axis->extra_light )
2761
+ return width;
2762
+
2763
+ if ( dist < 0 )
2764
+ {
2765
+ dist = -width;
2766
+ sign = 1;
2767
+ }
2768
+
2769
+ if ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||
2770
+ ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )
2771
+ {
2772
+ /* smooth hinting process: very lightly quantize the stem width */
2773
+
2774
+ /* leave the widths of serifs alone */
2775
+ if ( ( stem_flags & AF_EDGE_SERIF ) &&
2776
+ vertical &&
2777
+ ( dist < 3 * 64 ) )
2778
+ goto Done_Width;
2779
+
2780
+ else if ( base_flags & AF_EDGE_ROUND )
2781
+ {
2782
+ if ( dist < 80 )
2783
+ dist = 64;
2784
+ }
2785
+ else if ( dist < 56 )
2786
+ dist = 56;
2787
+
2788
+ if ( axis->width_count > 0 )
2789
+ {
2790
+ FT_Pos delta;
2791
+
2792
+
2793
+ /* compare to standard width */
2794
+ delta = dist - axis->widths[0].cur;
2795
+
2796
+ if ( delta < 0 )
2797
+ delta = -delta;
2798
+
2799
+ if ( delta < 40 )
2800
+ {
2801
+ dist = axis->widths[0].cur;
2802
+ if ( dist < 48 )
2803
+ dist = 48;
2804
+
2805
+ goto Done_Width;
2806
+ }
2807
+
2808
+ if ( dist < 3 * 64 )
2809
+ {
2810
+ delta = dist & 63;
2811
+ dist &= -64;
2812
+
2813
+ if ( delta < 10 )
2814
+ dist += delta;
2815
+
2816
+ else if ( delta < 32 )
2817
+ dist += 10;
2818
+
2819
+ else if ( delta < 54 )
2820
+ dist += 54;
2821
+
2822
+ else
2823
+ dist += delta;
2824
+ }
2825
+ else
2826
+ {
2827
+ /* A stem's end position depends on two values: the start */
2828
+ /* position and the stem length. The former gets usually */
2829
+ /* rounded to the grid, while the latter gets rounded also if it */
2830
+ /* exceeds a certain length (see below in this function). This */
2831
+ /* `double rounding' can lead to a great difference to the */
2832
+ /* original, unhinted position; this normally doesn't matter for */
2833
+ /* large PPEM values, but for small sizes it can easily make */
2834
+ /* outlines collide. For this reason, we adjust the stem length */
2835
+ /* by a small amount depending on the PPEM value in case the */
2836
+ /* former and latter rounding both point into the same */
2837
+ /* direction. */
2838
+
2839
+ FT_Pos bdelta = 0;
2840
+
2841
+
2842
+ if ( ( ( width > 0 ) && ( base_delta > 0 ) ) ||
2843
+ ( ( width < 0 ) && ( base_delta < 0 ) ) )
2844
+ {
2845
+ FT_UInt ppem = metrics->root.scaler.face->size->metrics.x_ppem;
2846
+
2847
+
2848
+ if ( ppem < 10 )
2849
+ bdelta = base_delta;
2850
+ else if ( ppem < 30 )
2851
+ bdelta = ( base_delta * (FT_Pos)( 30 - ppem ) ) / 20;
2852
+
2853
+ if ( bdelta < 0 )
2854
+ bdelta = -bdelta;
2855
+ }
2856
+
2857
+ dist = ( dist - bdelta + 32 ) & ~63;
2858
+ }
2859
+ }
2860
+ }
2861
+ else
2862
+ {
2863
+ /* strong hinting process: snap the stem width to integer pixels */
2864
+
2865
+ FT_Pos org_dist = dist;
2866
+
2867
+
2868
+ dist = af_latin_snap_width( axis->widths, axis->width_count, dist );
2869
+
2870
+ if ( vertical )
2871
+ {
2872
+ /* in the case of vertical hinting, always round */
2873
+ /* the stem heights to integer pixels */
2874
+
2875
+ if ( dist >= 64 )
2876
+ dist = ( dist + 16 ) & ~63;
2877
+ else
2878
+ dist = 64;
2879
+ }
2880
+ else
2881
+ {
2882
+ if ( AF_LATIN_HINTS_DO_MONO( hints ) )
2883
+ {
2884
+ /* monochrome horizontal hinting: snap widths to integer pixels */
2885
+ /* with a different threshold */
2886
+
2887
+ if ( dist < 64 )
2888
+ dist = 64;
2889
+ else
2890
+ dist = ( dist + 32 ) & ~63;
2891
+ }
2892
+ else
2893
+ {
2894
+ /* for horizontal anti-aliased hinting, we adopt a more subtle */
2895
+ /* approach: we strengthen small stems, round stems whose size */
2896
+ /* is between 1 and 2 pixels to an integer, otherwise nothing */
2897
+
2898
+ if ( dist < 48 )
2899
+ dist = ( dist + 64 ) >> 1;
2900
+
2901
+ else if ( dist < 128 )
2902
+ {
2903
+ /* We only round to an integer width if the corresponding */
2904
+ /* distortion is less than 1/4 pixel. Otherwise this */
2905
+ /* makes everything worse since the diagonals, which are */
2906
+ /* not hinted, appear a lot bolder or thinner than the */
2907
+ /* vertical stems. */
2908
+
2909
+ FT_Pos delta;
2910
+
2911
+
2912
+ dist = ( dist + 22 ) & ~63;
2913
+ delta = dist - org_dist;
2914
+ if ( delta < 0 )
2915
+ delta = -delta;
2916
+
2917
+ if ( delta >= 16 )
2918
+ {
2919
+ dist = org_dist;
2920
+ if ( dist < 48 )
2921
+ dist = ( dist + 64 ) >> 1;
2922
+ }
2923
+ }
2924
+ else
2925
+ /* round otherwise to prevent color fringes in LCD mode */
2926
+ dist = ( dist + 32 ) & ~63;
2927
+ }
2928
+ }
2929
+ }
2930
+
2931
+ Done_Width:
2932
+ if ( sign )
2933
+ dist = -dist;
2934
+
2935
+ return dist;
2936
+ }
2937
+
2938
+
2939
+ /* Align one stem edge relative to the previous stem edge. */
2940
+
2941
+ static void
2942
+ af_latin_align_linked_edge( AF_GlyphHints hints,
2943
+ AF_Dimension dim,
2944
+ AF_Edge base_edge,
2945
+ AF_Edge stem_edge )
2946
+ {
2947
+ FT_Pos dist, base_delta;
2948
+ FT_Pos fitted_width;
2949
+
2950
+
2951
+ dist = stem_edge->opos - base_edge->opos;
2952
+ base_delta = base_edge->pos - base_edge->opos;
2953
+
2954
+ fitted_width = af_latin_compute_stem_width( hints, dim,
2955
+ dist, base_delta,
2956
+ base_edge->flags,
2957
+ stem_edge->flags );
2958
+
2959
+
2960
+ stem_edge->pos = base_edge->pos + fitted_width;
2961
+
2962
+ FT_TRACE5(( " LINK: edge %td (opos=%.2f) linked to %.2f,"
2963
+ " dist was %.2f, now %.2f\n",
2964
+ stem_edge - hints->axis[dim].edges,
2965
+ (double)stem_edge->opos / 64, (double)stem_edge->pos / 64,
2966
+ (double)dist / 64, (double)fitted_width / 64 ));
2967
+ }
2968
+
2969
+
2970
+ /* Shift the coordinates of the `serif' edge by the same amount */
2971
+ /* as the corresponding `base' edge has been moved already. */
2972
+
2973
+ static void
2974
+ af_latin_align_serif_edge( AF_GlyphHints hints,
2975
+ AF_Edge base,
2976
+ AF_Edge serif )
2977
+ {
2978
+ FT_UNUSED( hints );
2979
+
2980
+ serif->pos = base->pos + ( serif->opos - base->opos );
2981
+ }
2982
+
2983
+
2984
+ /*************************************************************************/
2985
+ /*************************************************************************/
2986
+ /*************************************************************************/
2987
+ /**** ****/
2988
+ /**** E D G E H I N T I N G ****/
2989
+ /**** ****/
2990
+ /*************************************************************************/
2991
+ /*************************************************************************/
2992
+ /*************************************************************************/
2993
+
2994
+
2995
+ /* The main grid-fitting routine. */
2996
+
2997
+ static void
2998
+ af_latin_hint_edges( AF_GlyphHints hints,
2999
+ AF_Dimension dim )
3000
+ {
3001
+ AF_AxisHints axis = &hints->axis[dim];
3002
+ AF_Edge edges = axis->edges;
3003
+ AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges );
3004
+ FT_PtrDist n_edges;
3005
+ AF_Edge edge;
3006
+ AF_Edge anchor = NULL;
3007
+ FT_Int has_serifs = 0;
3008
+
3009
+ AF_StyleClass style_class = hints->metrics->style_class;
3010
+ AF_ScriptClass script_class = af_script_classes[style_class->script];
3011
+
3012
+ FT_Bool top_to_bottom_hinting = 0;
3013
+
3014
+ #ifdef FT_DEBUG_LEVEL_TRACE
3015
+ FT_UInt num_actions = 0;
3016
+ #endif
3017
+
3018
+
3019
+ FT_TRACE5(( "latin %s edge hinting (style `%s')\n",
3020
+ dim == AF_DIMENSION_VERT ? "horizontal" : "vertical",
3021
+ af_style_names[hints->metrics->style_class->style] ));
3022
+
3023
+ if ( dim == AF_DIMENSION_VERT )
3024
+ top_to_bottom_hinting = script_class->top_to_bottom_hinting;
3025
+
3026
+ /* we begin by aligning all stems relative to the blue zone */
3027
+ /* if needed -- that's only for horizontal edges */
3028
+
3029
+ if ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_BLUES( hints ) )
3030
+ {
3031
+ for ( edge = edges; edge < edge_limit; edge++ )
3032
+ {
3033
+ AF_Width blue;
3034
+ AF_Edge edge1, edge2; /* these edges form the stem to check */
3035
+
3036
+
3037
+ if ( edge->flags & AF_EDGE_DONE )
3038
+ continue;
3039
+
3040
+ edge1 = NULL;
3041
+ edge2 = edge->link;
3042
+
3043
+ /*
3044
+ * If a stem contains both a neutral and a non-neutral blue zone,
3045
+ * skip the neutral one. Otherwise, outlines with different
3046
+ * directions might be incorrectly aligned at the same vertical
3047
+ * position.
3048
+ *
3049
+ * If we have two neutral blue zones, skip one of them.
3050
+ *
3051
+ */
3052
+ if ( edge->blue_edge && edge2 && edge2->blue_edge )
3053
+ {
3054
+ FT_Byte neutral = edge->flags & AF_EDGE_NEUTRAL;
3055
+ FT_Byte neutral2 = edge2->flags & AF_EDGE_NEUTRAL;
3056
+
3057
+
3058
+ if ( neutral2 )
3059
+ {
3060
+ edge2->blue_edge = NULL;
3061
+ edge2->flags &= ~AF_EDGE_NEUTRAL;
3062
+ }
3063
+ else if ( neutral )
3064
+ {
3065
+ edge->blue_edge = NULL;
3066
+ edge->flags &= ~AF_EDGE_NEUTRAL;
3067
+ }
3068
+ }
3069
+
3070
+ blue = edge->blue_edge;
3071
+ if ( blue )
3072
+ edge1 = edge;
3073
+
3074
+ /* flip edges if the other edge is aligned to a blue zone */
3075
+ else if ( edge2 && edge2->blue_edge )
3076
+ {
3077
+ blue = edge2->blue_edge;
3078
+ edge1 = edge2;
3079
+ edge2 = edge;
3080
+ }
3081
+
3082
+ if ( !edge1 )
3083
+ continue;
3084
+
3085
+ #ifdef FT_DEBUG_LEVEL_TRACE
3086
+ if ( !anchor )
3087
+ FT_TRACE5(( " BLUE_ANCHOR: edge %td (opos=%.2f) snapped to %.2f,"
3088
+ " was %.2f (anchor=edge %td)\n",
3089
+ edge1 - edges,
3090
+ (double)edge1->opos / 64, (double)blue->fit / 64,
3091
+ (double)edge1->pos / 64, edge - edges ));
3092
+ else
3093
+ FT_TRACE5(( " BLUE: edge %td (opos=%.2f) snapped to %.2f,"
3094
+ " was %.2f\n",
3095
+ edge1 - edges,
3096
+ (double)edge1->opos / 64, (double)blue->fit / 64,
3097
+ (double)edge1->pos / 64 ));
3098
+
3099
+ num_actions++;
3100
+ #endif
3101
+
3102
+ edge1->pos = blue->fit;
3103
+ edge1->flags |= AF_EDGE_DONE;
3104
+
3105
+ if ( edge2 && !edge2->blue_edge )
3106
+ {
3107
+ af_latin_align_linked_edge( hints, dim, edge1, edge2 );
3108
+ edge2->flags |= AF_EDGE_DONE;
3109
+
3110
+ #ifdef FT_DEBUG_LEVEL_TRACE
3111
+ num_actions++;
3112
+ #endif
3113
+ }
3114
+
3115
+ if ( !anchor )
3116
+ anchor = edge;
3117
+ }
3118
+ }
3119
+
3120
+ /* now we align all other stem edges, trying to maintain the */
3121
+ /* relative order of stems in the glyph */
3122
+ for ( edge = edges; edge < edge_limit; edge++ )
3123
+ {
3124
+ AF_Edge edge2;
3125
+
3126
+
3127
+ if ( edge->flags & AF_EDGE_DONE )
3128
+ continue;
3129
+
3130
+ /* skip all non-stem edges */
3131
+ edge2 = edge->link;
3132
+ if ( !edge2 )
3133
+ {
3134
+ has_serifs++;
3135
+ continue;
3136
+ }
3137
+
3138
+ /* now align the stem */
3139
+
3140
+ /* this should not happen, but it's better to be safe */
3141
+ if ( edge2->blue_edge )
3142
+ {
3143
+ FT_TRACE5(( " ASSERTION FAILED for edge %td\n", edge2 - edges ));
3144
+
3145
+ af_latin_align_linked_edge( hints, dim, edge2, edge );
3146
+ edge->flags |= AF_EDGE_DONE;
3147
+
3148
+ #ifdef FT_DEBUG_LEVEL_TRACE
3149
+ num_actions++;
3150
+ #endif
3151
+ continue;
3152
+ }
3153
+
3154
+ if ( !anchor )
3155
+ {
3156
+ /* if we reach this if clause, no stem has been aligned yet */
3157
+
3158
+ FT_Pos org_len, org_center, cur_len;
3159
+ FT_Pos cur_pos1, error1, error2, u_off, d_off;
3160
+
3161
+
3162
+ org_len = edge2->opos - edge->opos;
3163
+ cur_len = af_latin_compute_stem_width( hints, dim,
3164
+ org_len, 0,
3165
+ edge->flags,
3166
+ edge2->flags );
3167
+
3168
+ /* some voodoo to specially round edges for small stem widths; */
3169
+ /* the idea is to align the center of a stem, then shifting */
3170
+ /* the stem edges to suitable positions */
3171
+ if ( cur_len <= 64 )
3172
+ {
3173
+ /* width <= 1px */
3174
+ u_off = 32;
3175
+ d_off = 32;
3176
+ }
3177
+ else
3178
+ {
3179
+ /* 1px < width < 1.5px */
3180
+ u_off = 38;
3181
+ d_off = 26;
3182
+ }
3183
+
3184
+ if ( cur_len < 96 )
3185
+ {
3186
+ org_center = edge->opos + ( org_len >> 1 );
3187
+ cur_pos1 = FT_PIX_ROUND( org_center );
3188
+
3189
+ error1 = org_center - ( cur_pos1 - u_off );
3190
+ if ( error1 < 0 )
3191
+ error1 = -error1;
3192
+
3193
+ error2 = org_center - ( cur_pos1 + d_off );
3194
+ if ( error2 < 0 )
3195
+ error2 = -error2;
3196
+
3197
+ if ( error1 < error2 )
3198
+ cur_pos1 -= u_off;
3199
+ else
3200
+ cur_pos1 += d_off;
3201
+
3202
+ edge->pos = cur_pos1 - cur_len / 2;
3203
+ edge2->pos = edge->pos + cur_len;
3204
+ }
3205
+ else
3206
+ edge->pos = FT_PIX_ROUND( edge->opos );
3207
+
3208
+ anchor = edge;
3209
+ edge->flags |= AF_EDGE_DONE;
3210
+
3211
+ FT_TRACE5(( " ANCHOR: edge %td (opos=%.2f) and %td (opos=%.2f)"
3212
+ " snapped to %.2f and %.2f\n",
3213
+ edge - edges, (double)edge->opos / 64,
3214
+ edge2 - edges, (double)edge2->opos / 64,
3215
+ (double)edge->pos / 64, (double)edge2->pos / 64 ));
3216
+
3217
+ af_latin_align_linked_edge( hints, dim, edge, edge2 );
3218
+
3219
+ #ifdef FT_DEBUG_LEVEL_TRACE
3220
+ num_actions += 2;
3221
+ #endif
3222
+ }
3223
+ else
3224
+ {
3225
+ FT_Pos org_pos, org_len, org_center, cur_len;
3226
+ FT_Pos cur_pos1, cur_pos2, delta1, delta2;
3227
+
3228
+
3229
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
3230
+ org_len = edge2->opos - edge->opos;
3231
+ org_center = org_pos + ( org_len >> 1 );
3232
+
3233
+ cur_len = af_latin_compute_stem_width( hints, dim,
3234
+ org_len, 0,
3235
+ edge->flags,
3236
+ edge2->flags );
3237
+
3238
+ if ( edge2->flags & AF_EDGE_DONE )
3239
+ {
3240
+ FT_TRACE5(( " ADJUST: edge %td (pos=%.2f) moved to %.2f\n",
3241
+ edge - edges, (double)edge->pos / 64,
3242
+ (double)( edge2->pos - cur_len ) / 64 ));
3243
+
3244
+ edge->pos = edge2->pos - cur_len;
3245
+ }
3246
+
3247
+ else if ( cur_len < 96 )
3248
+ {
3249
+ FT_Pos u_off, d_off;
3250
+
3251
+
3252
+ cur_pos1 = FT_PIX_ROUND( org_center );
3253
+
3254
+ if ( cur_len <= 64 )
3255
+ {
3256
+ u_off = 32;
3257
+ d_off = 32;
3258
+ }
3259
+ else
3260
+ {
3261
+ u_off = 38;
3262
+ d_off = 26;
3263
+ }
3264
+
3265
+ delta1 = org_center - ( cur_pos1 - u_off );
3266
+ if ( delta1 < 0 )
3267
+ delta1 = -delta1;
3268
+
3269
+ delta2 = org_center - ( cur_pos1 + d_off );
3270
+ if ( delta2 < 0 )
3271
+ delta2 = -delta2;
3272
+
3273
+ if ( delta1 < delta2 )
3274
+ cur_pos1 -= u_off;
3275
+ else
3276
+ cur_pos1 += d_off;
3277
+
3278
+ edge->pos = cur_pos1 - cur_len / 2;
3279
+ edge2->pos = cur_pos1 + cur_len / 2;
3280
+
3281
+ FT_TRACE5(( " STEM: edge %td (opos=%.2f) linked to %td (opos=%.2f)"
3282
+ " snapped to %.2f and %.2f\n",
3283
+ edge - edges, (double)edge->opos / 64,
3284
+ edge2 - edges, (double)edge2->opos / 64,
3285
+ (double)edge->pos / 64, (double)edge2->pos / 64 ));
3286
+ }
3287
+
3288
+ else
3289
+ {
3290
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
3291
+ org_len = edge2->opos - edge->opos;
3292
+ org_center = org_pos + ( org_len >> 1 );
3293
+
3294
+ cur_len = af_latin_compute_stem_width( hints, dim,
3295
+ org_len, 0,
3296
+ edge->flags,
3297
+ edge2->flags );
3298
+
3299
+ cur_pos1 = FT_PIX_ROUND( org_pos );
3300
+ delta1 = cur_pos1 + ( cur_len >> 1 ) - org_center;
3301
+ if ( delta1 < 0 )
3302
+ delta1 = -delta1;
3303
+
3304
+ cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
3305
+ delta2 = cur_pos2 + ( cur_len >> 1 ) - org_center;
3306
+ if ( delta2 < 0 )
3307
+ delta2 = -delta2;
3308
+
3309
+ edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
3310
+ edge2->pos = edge->pos + cur_len;
3311
+
3312
+ FT_TRACE5(( " STEM: edge %td (opos=%.2f) linked to %td (opos=%.2f)"
3313
+ " snapped to %.2f and %.2f\n",
3314
+ edge - edges, (double)edge->opos / 64,
3315
+ edge2 - edges, (double)edge2->opos / 64,
3316
+ (double)edge->pos / 64, (double)edge2->pos / 64 ));
3317
+ }
3318
+
3319
+ #ifdef FT_DEBUG_LEVEL_TRACE
3320
+ num_actions++;
3321
+ #endif
3322
+
3323
+ edge->flags |= AF_EDGE_DONE;
3324
+ edge2->flags |= AF_EDGE_DONE;
3325
+
3326
+ if ( edge > edges &&
3327
+ ( top_to_bottom_hinting ? ( edge->pos > edge[-1].pos )
3328
+ : ( edge->pos < edge[-1].pos ) ) )
3329
+ {
3330
+ /* don't move if stem would (almost) disappear otherwise; */
3331
+ /* the ad-hoc value 16 corresponds to 1/4px */
3332
+ if ( edge->link && FT_ABS( edge->link->pos - edge[-1].pos ) > 16 )
3333
+ {
3334
+ #ifdef FT_DEBUG_LEVEL_TRACE
3335
+ FT_TRACE5(( " BOUND: edge %td (pos=%.2f) moved to %.2f\n",
3336
+ edge - edges,
3337
+ (double)edge->pos / 64,
3338
+ (double)edge[-1].pos / 64 ));
3339
+
3340
+ num_actions++;
3341
+ #endif
3342
+
3343
+ edge->pos = edge[-1].pos;
3344
+ }
3345
+ }
3346
+ }
3347
+ }
3348
+
3349
+ /* make sure that lowercase m's maintain their symmetry */
3350
+
3351
+ /* In general, lowercase m's have six vertical edges if they are sans */
3352
+ /* serif, or twelve if they are with serifs. This implementation is */
3353
+ /* based on that assumption, and seems to work very well with most */
3354
+ /* faces. However, if for a certain face this assumption is not */
3355
+ /* true, the m is just rendered like before. In addition, any stem */
3356
+ /* correction will only be applied to symmetrical glyphs (even if the */
3357
+ /* glyph is not an m), so the potential for unwanted distortion is */
3358
+ /* relatively low. */
3359
+
3360
+ /* We don't handle horizontal edges since we can't easily assure that */
3361
+ /* the third (lowest) stem aligns with the base line; it might end up */
3362
+ /* one pixel higher or lower. */
3363
+
3364
+ n_edges = edge_limit - edges;
3365
+ if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )
3366
+ {
3367
+ AF_Edge edge1, edge2, edge3;
3368
+ FT_Pos dist1, dist2, span, delta;
3369
+
3370
+
3371
+ if ( n_edges == 6 )
3372
+ {
3373
+ edge1 = edges;
3374
+ edge2 = edges + 2;
3375
+ edge3 = edges + 4;
3376
+ }
3377
+ else
3378
+ {
3379
+ edge1 = edges + 1;
3380
+ edge2 = edges + 5;
3381
+ edge3 = edges + 9;
3382
+ }
3383
+
3384
+ dist1 = edge2->opos - edge1->opos;
3385
+ dist2 = edge3->opos - edge2->opos;
3386
+
3387
+ span = dist1 - dist2;
3388
+ if ( span < 0 )
3389
+ span = -span;
3390
+
3391
+ if ( span < 8 )
3392
+ {
3393
+ delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );
3394
+ edge3->pos -= delta;
3395
+ if ( edge3->link )
3396
+ edge3->link->pos -= delta;
3397
+
3398
+ /* move the serifs along with the stem */
3399
+ if ( n_edges == 12 )
3400
+ {
3401
+ ( edges + 8 )->pos -= delta;
3402
+ ( edges + 11 )->pos -= delta;
3403
+ }
3404
+
3405
+ edge3->flags |= AF_EDGE_DONE;
3406
+ if ( edge3->link )
3407
+ edge3->link->flags |= AF_EDGE_DONE;
3408
+ }
3409
+ }
3410
+
3411
+ if ( has_serifs || !anchor )
3412
+ {
3413
+ /*
3414
+ * now hint the remaining edges (serifs and single) in order
3415
+ * to complete our processing
3416
+ */
3417
+ for ( edge = edges; edge < edge_limit; edge++ )
3418
+ {
3419
+ FT_Pos delta;
3420
+
3421
+
3422
+ if ( edge->flags & AF_EDGE_DONE )
3423
+ continue;
3424
+
3425
+ delta = 1000;
3426
+
3427
+ if ( edge->serif )
3428
+ {
3429
+ delta = edge->serif->opos - edge->opos;
3430
+ if ( delta < 0 )
3431
+ delta = -delta;
3432
+ }
3433
+
3434
+ if ( delta < 64 + 16 )
3435
+ {
3436
+ af_latin_align_serif_edge( hints, edge->serif, edge );
3437
+ FT_TRACE5(( " SERIF: edge %td (opos=%.2f) serif to %td (opos=%.2f)"
3438
+ " aligned to %.2f\n",
3439
+ edge - edges, (double)edge->opos / 64,
3440
+ edge->serif - edges, (double)edge->serif->opos / 64,
3441
+ (double)edge->pos / 64 ));
3442
+ }
3443
+ else if ( !anchor )
3444
+ {
3445
+ edge->pos = FT_PIX_ROUND( edge->opos );
3446
+ anchor = edge;
3447
+ FT_TRACE5(( " SERIF_ANCHOR: edge %td (opos=%.2f)"
3448
+ " snapped to %.2f\n",
3449
+ edge - edges,
3450
+ (double)edge->opos / 64, (double)edge->pos / 64 ));
3451
+ }
3452
+ else
3453
+ {
3454
+ AF_Edge before, after;
3455
+
3456
+
3457
+ for ( before = edge - 1; before >= edges; before-- )
3458
+ if ( before->flags & AF_EDGE_DONE )
3459
+ break;
3460
+
3461
+ for ( after = edge + 1; after < edge_limit; after++ )
3462
+ if ( after->flags & AF_EDGE_DONE )
3463
+ break;
3464
+
3465
+ if ( before >= edges && before < edge &&
3466
+ after < edge_limit && after > edge )
3467
+ {
3468
+ if ( after->opos == before->opos )
3469
+ edge->pos = before->pos;
3470
+ else
3471
+ edge->pos = before->pos +
3472
+ FT_MulDiv( edge->opos - before->opos,
3473
+ after->pos - before->pos,
3474
+ after->opos - before->opos );
3475
+
3476
+ FT_TRACE5(( " SERIF_LINK1: edge %td (opos=%.2f) snapped to %.2f"
3477
+ " from %td (opos=%.2f)\n",
3478
+ edge - edges, (double)edge->opos / 64,
3479
+ (double)edge->pos / 64,
3480
+ before - edges, (double)before->opos / 64 ));
3481
+ }
3482
+ else
3483
+ {
3484
+ edge->pos = anchor->pos +
3485
+ ( ( edge->opos - anchor->opos + 16 ) & ~31 );
3486
+ FT_TRACE5(( " SERIF_LINK2: edge %td (opos=%.2f)"
3487
+ " snapped to %.2f\n",
3488
+ edge - edges,
3489
+ (double)edge->opos / 64, (double)edge->pos / 64 ));
3490
+ }
3491
+ }
3492
+
3493
+ #ifdef FT_DEBUG_LEVEL_TRACE
3494
+ num_actions++;
3495
+ #endif
3496
+ edge->flags |= AF_EDGE_DONE;
3497
+
3498
+ if ( edge > edges &&
3499
+ ( top_to_bottom_hinting ? ( edge->pos > edge[-1].pos )
3500
+ : ( edge->pos < edge[-1].pos ) ) )
3501
+ {
3502
+ /* don't move if stem would (almost) disappear otherwise; */
3503
+ /* the ad-hoc value 16 corresponds to 1/4px */
3504
+ if ( edge->link && FT_ABS( edge->link->pos - edge[-1].pos ) > 16 )
3505
+ {
3506
+ #ifdef FT_DEBUG_LEVEL_TRACE
3507
+ FT_TRACE5(( " BOUND: edge %td (pos=%.2f) moved to %.2f\n",
3508
+ edge - edges,
3509
+ (double)edge->pos / 64,
3510
+ (double)edge[-1].pos / 64 ));
3511
+
3512
+ num_actions++;
3513
+ #endif
3514
+ edge->pos = edge[-1].pos;
3515
+ }
3516
+ }
3517
+
3518
+ if ( edge + 1 < edge_limit &&
3519
+ edge[1].flags & AF_EDGE_DONE &&
3520
+ ( top_to_bottom_hinting ? ( edge->pos < edge[1].pos )
3521
+ : ( edge->pos > edge[1].pos ) ) )
3522
+ {
3523
+ /* don't move if stem would (almost) disappear otherwise; */
3524
+ /* the ad-hoc value 16 corresponds to 1/4px */
3525
+ if ( edge->link && FT_ABS( edge->link->pos - edge[-1].pos ) > 16 )
3526
+ {
3527
+ #ifdef FT_DEBUG_LEVEL_TRACE
3528
+ FT_TRACE5(( " BOUND: edge %td (pos=%.2f) moved to %.2f\n",
3529
+ edge - edges,
3530
+ (double)edge->pos / 64,
3531
+ (double)edge[1].pos / 64 ));
3532
+
3533
+ num_actions++;
3534
+ #endif
3535
+
3536
+ edge->pos = edge[1].pos;
3537
+ }
3538
+ }
3539
+ }
3540
+ }
3541
+
3542
+ #ifdef FT_DEBUG_LEVEL_TRACE
3543
+ if ( !num_actions )
3544
+ FT_TRACE5(( " (none)\n" ));
3545
+ FT_TRACE5(( "\n" ));
3546
+ #endif
3547
+ }
3548
+
3549
+
3550
+ /* Apply the complete hinting algorithm to a latin glyph. */
3551
+
3552
+ static FT_Error
3553
+ af_latin_hints_apply( FT_UInt glyph_index,
3554
+ AF_GlyphHints hints,
3555
+ FT_Outline* outline,
3556
+ AF_StyleMetrics metrics_ ) /* AF_LatinMetrics */
3557
+ {
3558
+ AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
3559
+
3560
+ FT_Error error;
3561
+ int dim;
3562
+
3563
+ AF_LatinAxis axis;
3564
+
3565
+
3566
+ error = af_glyph_hints_reload( hints, outline );
3567
+ if ( error )
3568
+ goto Exit;
3569
+
3570
+ /* analyze glyph outline */
3571
+ if ( AF_HINTS_DO_HORIZONTAL( hints ) )
3572
+ {
3573
+ axis = &metrics->axis[AF_DIMENSION_HORZ];
3574
+ error = af_latin_hints_detect_features( hints,
3575
+ axis->width_count,
3576
+ axis->widths,
3577
+ AF_DIMENSION_HORZ );
3578
+ if ( error )
3579
+ goto Exit;
3580
+ }
3581
+
3582
+ if ( AF_HINTS_DO_VERTICAL( hints ) )
3583
+ {
3584
+ axis = &metrics->axis[AF_DIMENSION_VERT];
3585
+ error = af_latin_hints_detect_features( hints,
3586
+ axis->width_count,
3587
+ axis->widths,
3588
+ AF_DIMENSION_VERT );
3589
+ if ( error )
3590
+ goto Exit;
3591
+
3592
+ /* apply blue zones to base characters only */
3593
+ if ( !( metrics->root.globals->glyph_styles[glyph_index] & AF_NONBASE ) )
3594
+ af_latin_hints_compute_blue_edges( hints, metrics );
3595
+ }
3596
+
3597
+ /* grid-fit the outline */
3598
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
3599
+ {
3600
+ if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) ||
3601
+ ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) ) )
3602
+ {
3603
+ af_latin_hint_edges( hints, (AF_Dimension)dim );
3604
+ af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim );
3605
+ af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim );
3606
+ af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );
3607
+ }
3608
+ }
3609
+
3610
+ af_glyph_hints_save( hints, outline );
3611
+
3612
+ Exit:
3613
+ return error;
3614
+ }
3615
+
3616
+
3617
+ /*************************************************************************/
3618
+ /*************************************************************************/
3619
+ /***** *****/
3620
+ /***** L A T I N S C R I P T C L A S S *****/
3621
+ /***** *****/
3622
+ /*************************************************************************/
3623
+ /*************************************************************************/
3624
+
3625
+
3626
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
3627
+ af_latin_writing_system_class,
3628
+
3629
+ AF_WRITING_SYSTEM_LATIN,
3630
+
3631
+ sizeof ( AF_LatinMetricsRec ),
3632
+
3633
+ (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init, /* style_metrics_init */
3634
+ (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale, /* style_metrics_scale */
3635
+ (AF_WritingSystem_DoneMetricsFunc) NULL, /* style_metrics_done */
3636
+ (AF_WritingSystem_GetStdWidthsFunc)af_latin_get_standard_widths, /* style_metrics_getstdw */
3637
+
3638
+ (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, /* style_hints_init */
3639
+ (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply /* style_hints_apply */
3640
+ )
3641
+
3642
+
3643
+ /* END */