expo-juce 0.3.0 → 0.3.2

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 (1611) hide show
  1. package/README.md +34 -0
  2. package/build/index.d.ts +21 -24
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js +44 -48
  5. package/build/index.js.map +1 -1
  6. package/ios/BeeperAudioEngine.h +45 -0
  7. package/ios/BeeperAudioEngine.mm +352 -0
  8. package/ios/ExpoJuce.podspec +31 -8
  9. package/ios/ExpoJuceBridge.h +12 -12
  10. package/ios/ExpoJuceBridge.m +35 -100
  11. package/ios/ExpoJuceModule.swift +63 -85
  12. package/ios/JuceConfig.h +49 -14
  13. package/ios/JuceModule_audio_basics.mm +2 -0
  14. package/ios/JuceModule_audio_devices.mm +2 -0
  15. package/ios/JuceModule_audio_formats.mm +2 -0
  16. package/ios/JuceModule_audio_processors.mm +2 -0
  17. package/ios/JuceModule_core.mm +5 -0
  18. package/ios/JuceModule_data_structures.mm +2 -0
  19. package/ios/JuceModule_dsp.mm +2 -0
  20. package/ios/JuceModule_events.mm +2 -0
  21. package/ios/JuceModule_graphics.mm +2 -0
  22. package/ios/JuceModule_gui_basics.mm +2 -0
  23. package/ios/JuceModule_gui_extra.mm +2 -0
  24. package/ios/JuceModule_harfbuzz.mm +4 -0
  25. package/ios/PolySynthProcessor.h +83 -0
  26. package/ios/PolySynthProcessor.mm +164 -0
  27. package/ios/TransportEngine.h +35 -0
  28. package/ios/TransportEngine.mm +50 -0
  29. package/ios/Voice.h +59 -0
  30. package/ios/Voice.mm +157 -0
  31. package/ios/VoiceAllocator.h +22 -0
  32. package/ios/VoiceAllocator.mm +88 -0
  33. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +1957 -0
  34. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h +586 -0
  35. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioIODevice.cpp +65 -0
  36. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioIODevice.h +368 -0
  37. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp +152 -0
  38. package/ios/juce_modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h +200 -0
  39. package/ios/juce_modules/juce_audio_devices/audio_io/juce_SampleRateHelpers.cpp +57 -0
  40. package/ios/juce_modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h +71 -0
  41. package/ios/juce_modules/juce_audio_devices/juce_audio_devices.cpp +277 -0
  42. package/ios/juce_modules/juce_audio_devices/juce_audio_devices.h +201 -0
  43. package/ios/juce_modules/juce_audio_devices/juce_audio_devices.mm +35 -0
  44. package/ios/juce_modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp +246 -0
  45. package/ios/juce_modules/juce_audio_devices/midi_io/juce_MidiDevices.h +482 -0
  46. package/ios/juce_modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp +170 -0
  47. package/ios/juce_modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h +125 -0
  48. package/ios/juce_modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h +153 -0
  49. package/ios/juce_modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h +165 -0
  50. package/ios/juce_modules/juce_audio_devices/native/java/app/com/rmsl/juce/JuceMidiSupport.java +1121 -0
  51. package/ios/juce_modules/juce_audio_devices/native/juce_ALSA_linux.cpp +1313 -0
  52. package/ios/juce_modules/juce_audio_devices/native/juce_ASIO_windows.cpp +1654 -0
  53. package/ios/juce_modules/juce_audio_devices/native/juce_Audio_android.cpp +482 -0
  54. package/ios/juce_modules/juce_audio_devices/native/juce_Audio_ios.cpp +1508 -0
  55. package/ios/juce_modules/juce_audio_devices/native/juce_Audio_ios.h +106 -0
  56. package/ios/juce_modules/juce_audio_devices/native/juce_Bela_linux.cpp +612 -0
  57. package/ios/juce_modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp +2315 -0
  58. package/ios/juce_modules/juce_audio_devices/native/juce_CoreMidi_mac.mm +1280 -0
  59. package/ios/juce_modules/juce_audio_devices/native/juce_DirectSound_windows.cpp +1304 -0
  60. package/ios/juce_modules/juce_audio_devices/native/juce_HighPerformanceAudioHelpers_android.h +137 -0
  61. package/ios/juce_modules/juce_audio_devices/native/juce_JackAudio_linux.cpp +681 -0
  62. package/ios/juce_modules/juce_audio_devices/native/juce_Midi_android.cpp +1183 -0
  63. package/ios/juce_modules/juce_audio_devices/native/juce_Midi_linux.cpp +788 -0
  64. package/ios/juce_modules/juce_audio_devices/native/juce_Midi_windows.cpp +2038 -0
  65. package/ios/juce_modules/juce_audio_devices/native/juce_Oboe_android.cpp +1440 -0
  66. package/ios/juce_modules/juce_audio_devices/native/juce_OpenSL_android.cpp +1306 -0
  67. package/ios/juce_modules/juce_audio_devices/native/juce_WASAPI_windows.cpp +2032 -0
  68. package/ios/juce_modules/juce_audio_devices/native/oboe/.clang-tidy +3 -0
  69. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/AudioStream.h +706 -0
  70. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBase.h +343 -0
  71. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBuilder.h +670 -0
  72. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamCallback.h +193 -0
  73. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/Definitions.h +897 -0
  74. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/FifoBuffer.h +164 -0
  75. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/FifoControllerBase.h +112 -0
  76. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/FullDuplexStream.h +324 -0
  77. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/LatencyTuner.h +150 -0
  78. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/Oboe.h +40 -0
  79. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/OboeExtensions.h +64 -0
  80. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/ResultWithValue.h +155 -0
  81. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/StabilizedCallback.h +75 -0
  82. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/Utilities.h +99 -0
  83. package/ios/juce_modules/juce_audio_devices/native/oboe/include/oboe/Version.h +92 -0
  84. package/ios/juce_modules/juce_audio_devices/native/oboe/src/aaudio/AAudioExtensions.h +180 -0
  85. package/ios/juce_modules/juce_audio_devices/native/oboe/src/aaudio/AAudioLoader.cpp +506 -0
  86. package/ios/juce_modules/juce_audio_devices/native/oboe/src/aaudio/AAudioLoader.h +299 -0
  87. package/ios/juce_modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.cpp +868 -0
  88. package/ios/juce_modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.h +152 -0
  89. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AdpfWrapper.cpp +124 -0
  90. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AdpfWrapper.h +85 -0
  91. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AudioClock.h +75 -0
  92. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.cpp +38 -0
  93. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.h +83 -0
  94. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AudioStream.cpp +222 -0
  95. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/AudioStreamBuilder.cpp +224 -0
  96. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.cpp +266 -0
  97. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.h +86 -0
  98. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.cpp +106 -0
  99. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.h +227 -0
  100. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockAdapter.cpp +38 -0
  101. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockAdapter.h +67 -0
  102. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockReader.cpp +73 -0
  103. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockReader.h +60 -0
  104. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockWriter.cpp +73 -0
  105. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/FixedBlockWriter.h +54 -0
  106. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/LatencyTuner.cpp +108 -0
  107. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/MonotonicCounter.h +112 -0
  108. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/OboeDebug.h +41 -0
  109. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/OboeExtensions.cpp +36 -0
  110. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/QuirksManager.cpp +311 -0
  111. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/QuirksManager.h +134 -0
  112. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceFloatCaller.cpp +30 -0
  113. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceFloatCaller.h +44 -0
  114. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI16Caller.cpp +47 -0
  115. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI16Caller.h +49 -0
  116. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI24Caller.cpp +56 -0
  117. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI24Caller.h +53 -0
  118. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI32Caller.cpp +47 -0
  119. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/SourceI32Caller.h +53 -0
  120. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/StabilizedCallback.cpp +112 -0
  121. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/Trace.cpp +75 -0
  122. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/Trace.h +31 -0
  123. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/Utilities.cpp +333 -0
  124. package/ios/juce_modules/juce_audio_devices/native/oboe/src/common/Version.cpp +28 -0
  125. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoBuffer.cpp +178 -0
  126. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoController.cpp +30 -0
  127. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoController.h +62 -0
  128. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.cpp +68 -0
  129. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.cpp +32 -0
  130. package/ios/juce_modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.h +66 -0
  131. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp +52 -0
  132. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h +52 -0
  133. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp +38 -0
  134. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h +68 -0
  135. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp +114 -0
  136. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.h +450 -0
  137. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/FlowgraphUtilities.h +55 -0
  138. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/Limiter.cpp +67 -0
  139. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/Limiter.h +64 -0
  140. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.cpp +47 -0
  141. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h +53 -0
  142. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MonoBlend.cpp +46 -0
  143. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MonoBlend.h +48 -0
  144. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp +41 -0
  145. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h +49 -0
  146. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToManyConverter.cpp +47 -0
  147. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToManyConverter.h +49 -0
  148. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp +41 -0
  149. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h +49 -0
  150. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp +81 -0
  151. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h +96 -0
  152. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp +71 -0
  153. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.h +63 -0
  154. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.cpp +46 -0
  155. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.h +45 -0
  156. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.cpp +57 -0
  157. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.h +43 -0
  158. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.cpp +66 -0
  159. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.h +44 -0
  160. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI32.cpp +55 -0
  161. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI32.h +40 -0
  162. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.cpp +42 -0
  163. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.h +44 -0
  164. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.cpp +54 -0
  165. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.h +42 -0
  166. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.cpp +65 -0
  167. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.h +43 -0
  168. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI32.cpp +54 -0
  169. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI32.h +42 -0
  170. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/HyperbolicCosineWindow.h +71 -0
  171. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/IntegerRatio.cpp +50 -0
  172. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/IntegerRatio.h +54 -0
  173. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/KaiserWindow.h +90 -0
  174. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/LinearResampler.cpp +42 -0
  175. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/LinearResampler.h +47 -0
  176. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/MultiChannelResampler.cpp +171 -0
  177. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/MultiChannelResampler.h +281 -0
  178. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp +61 -0
  179. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.h +53 -0
  180. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp +63 -0
  181. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.h +41 -0
  182. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp +79 -0
  183. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.h +41 -0
  184. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/ResamplerDefinitions.h +27 -0
  185. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.cpp +72 -0
  186. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h +50 -0
  187. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp +81 -0
  188. package/ios/juce_modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h +42 -0
  189. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.cpp +360 -0
  190. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.h +66 -0
  191. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp +462 -0
  192. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.h +80 -0
  193. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.cpp +285 -0
  194. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.h +96 -0
  195. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.cpp +499 -0
  196. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.h +148 -0
  197. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/EngineOpenSLES.cpp +141 -0
  198. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/EngineOpenSLES.h +65 -0
  199. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.cpp +96 -0
  200. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.h +44 -0
  201. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/OutputMixerOpenSLES.cpp +74 -0
  202. package/ios/juce_modules/juce_audio_devices/native/oboe/src/opensles/OutputMixerOpenSLES.h +58 -0
  203. package/ios/juce_modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp +193 -0
  204. package/ios/juce_modules/juce_audio_devices/sources/juce_AudioSourcePlayer.h +127 -0
  205. package/ios/juce_modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp +295 -0
  206. package/ios/juce_modules/juce_audio_devices/sources/juce_AudioTransportSource.h +192 -0
  207. package/ios/juce_modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp +107 -0
  208. package/ios/juce_modules/juce_audio_processors/format/juce_AudioPluginFormat.h +183 -0
  209. package/ios/juce_modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp +212 -0
  210. package/ios/juce_modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h +151 -0
  211. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/generate_lv2_bundle_sources.py +175 -0
  212. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/juce_lv2_config.h +87 -0
  213. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/COPYING +13 -0
  214. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/lilv/lilv.h +2117 -0
  215. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/lilv/lilvmm.hpp +440 -0
  216. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/collections.c +240 -0
  217. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/filesystem.c +564 -0
  218. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/filesystem.h +182 -0
  219. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/instance.c +115 -0
  220. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/lib.c +127 -0
  221. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/lilv_internal.h +477 -0
  222. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/node.c +413 -0
  223. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/plugin.c +1140 -0
  224. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/pluginclass.c +91 -0
  225. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/port.c +272 -0
  226. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/query.c +144 -0
  227. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/scalepoint.c +53 -0
  228. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/state.c +1541 -0
  229. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/ui.c +115 -0
  230. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/util.c +291 -0
  231. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/world.c +1249 -0
  232. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/zix/common.h +138 -0
  233. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/zix/tree.c +727 -0
  234. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv/src/zix/tree.h +164 -0
  235. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lilv_config.h +42 -0
  236. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/COPYING +16 -0
  237. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/atom-test-utils.c +73 -0
  238. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/atom-test.c +367 -0
  239. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/atom.h +260 -0
  240. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/atom.meta.ttl +542 -0
  241. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/atom.ttl +247 -0
  242. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/forge-overflow-test.c +235 -0
  243. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/forge.h +683 -0
  244. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/manifest.ttl +9 -0
  245. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/atom/util.h +523 -0
  246. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/buf-size/buf-size.h +51 -0
  247. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/buf-size/buf-size.meta.ttl +157 -0
  248. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/buf-size/buf-size.ttl +67 -0
  249. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/buf-size/manifest.ttl +9 -0
  250. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/attributes.h +59 -0
  251. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/lv2.h +484 -0
  252. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/lv2_util.h +103 -0
  253. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/lv2core.meta.ttl +905 -0
  254. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/lv2core.ttl +674 -0
  255. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/manifest.ttl +15 -0
  256. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/meta.ttl +199 -0
  257. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/core/people.ttl +51 -0
  258. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/data-access/data-access.h +73 -0
  259. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/data-access/data-access.meta.ttl +77 -0
  260. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/data-access/data-access.ttl +11 -0
  261. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/data-access/manifest.ttl +9 -0
  262. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/dynmanifest/dynmanifest.h +160 -0
  263. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/dynmanifest/dynmanifest.meta.ttl +131 -0
  264. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/dynmanifest/dynmanifest.ttl +25 -0
  265. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/dynmanifest/manifest.ttl +9 -0
  266. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/event/event-helpers.h +255 -0
  267. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/event/event.h +306 -0
  268. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/event/event.meta.ttl +246 -0
  269. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/event/event.ttl +86 -0
  270. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/event/manifest.ttl +9 -0
  271. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/instance-access/instance-access.h +41 -0
  272. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/instance-access/instance-access.meta.ttl +75 -0
  273. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/instance-access/instance-access.ttl +11 -0
  274. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/instance-access/manifest.ttl +9 -0
  275. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/log/log.h +113 -0
  276. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/log/log.meta.ttl +126 -0
  277. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/log/log.ttl +48 -0
  278. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/log/logger.h +157 -0
  279. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/log/manifest.ttl +9 -0
  280. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/midi/manifest.ttl +9 -0
  281. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/midi/midi.h +248 -0
  282. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/midi/midi.meta.ttl +153 -0
  283. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/midi/midi.ttl +366 -0
  284. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/morph/manifest.ttl +9 -0
  285. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/morph/morph.h +48 -0
  286. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/morph/morph.meta.ttl +90 -0
  287. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/morph/morph.ttl +46 -0
  288. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/options/manifest.ttl +9 -0
  289. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/options/options.h +149 -0
  290. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/options/options.meta.ttl +129 -0
  291. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/options/options.ttl +44 -0
  292. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/parameters/manifest.ttl +9 -0
  293. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/parameters/parameters.h +68 -0
  294. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/parameters/parameters.meta.ttl +75 -0
  295. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/parameters/parameters.ttl +202 -0
  296. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/patch/manifest.ttl +9 -0
  297. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/patch/patch.h +73 -0
  298. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/patch/patch.meta.ttl +374 -0
  299. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/patch/patch.ttl +251 -0
  300. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-groups/manifest.ttl +9 -0
  301. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-groups/port-groups.h +77 -0
  302. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-groups/port-groups.meta.ttl +144 -0
  303. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-groups/port-groups.ttl +807 -0
  304. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-props/manifest.ttl +9 -0
  305. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-props/port-props.h +53 -0
  306. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-props/port-props.meta.ttl +202 -0
  307. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/port-props/port-props.ttl +79 -0
  308. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/presets/manifest.ttl +9 -0
  309. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/presets/presets.h +48 -0
  310. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/presets/presets.meta.ttl +132 -0
  311. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/presets/presets.ttl +60 -0
  312. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/resize-port/manifest.ttl +9 -0
  313. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/resize-port/resize-port.h +89 -0
  314. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/resize-port/resize-port.meta.ttl +74 -0
  315. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/resize-port/resize-port.ttl +36 -0
  316. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/state/manifest.ttl +9 -0
  317. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/state/state.h +392 -0
  318. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/state/state.meta.ttl +467 -0
  319. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/state/state.ttl +60 -0
  320. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/time/manifest.ttl +9 -0
  321. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/time/time.h +59 -0
  322. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/time/time.meta.ttl +112 -0
  323. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/time/time.ttl +122 -0
  324. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/ui/manifest.ttl +9 -0
  325. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/ui/ui.h +543 -0
  326. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/ui/ui.meta.ttl +627 -0
  327. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/ui/ui.ttl +248 -0
  328. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/units/manifest.ttl +9 -0
  329. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/units/units.h +75 -0
  330. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/units/units.meta.ttl +154 -0
  331. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/units/units.ttl +379 -0
  332. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/uri-map/manifest.ttl +9 -0
  333. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/uri-map/uri-map.h +121 -0
  334. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/uri-map/uri-map.meta.ttl +72 -0
  335. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/uri-map/uri-map.ttl +14 -0
  336. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/urid/manifest.ttl +9 -0
  337. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/urid/urid.h +140 -0
  338. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/urid/urid.meta.ttl +84 -0
  339. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/urid/urid.ttl +22 -0
  340. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/worker/manifest.ttl +9 -0
  341. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/worker/worker.h +183 -0
  342. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/worker/worker.meta.ttl +82 -0
  343. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/lv2/lv2/worker/worker.ttl +25 -0
  344. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/COPYING +13 -0
  345. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/serd/serd.h +1059 -0
  346. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/.clang-tidy +18 -0
  347. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/attributes.h +26 -0
  348. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/base64.c +132 -0
  349. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/base64.h +48 -0
  350. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/byte_sink.h +98 -0
  351. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/byte_source.c +112 -0
  352. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/byte_source.h +120 -0
  353. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/env.c +256 -0
  354. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/n3.c +1720 -0
  355. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/node.c +393 -0
  356. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/node.h +48 -0
  357. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/reader.c +425 -0
  358. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/reader.h +196 -0
  359. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/serd_config.h +98 -0
  360. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/serd_internal.h +46 -0
  361. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/serdi.c +377 -0
  362. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/stack.h +119 -0
  363. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/string.c +179 -0
  364. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/string_utils.h +173 -0
  365. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/system.c +82 -0
  366. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/system.h +40 -0
  367. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/uri.c +506 -0
  368. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/uri_utils.h +110 -0
  369. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd/src/writer.c +1114 -0
  370. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/serd_config.h +42 -0
  371. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/COPYING +13 -0
  372. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/sord/sord.h +642 -0
  373. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/sord/sordmm.hpp +720 -0
  374. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sord.c +1368 -0
  375. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sord_config.h +61 -0
  376. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sord_internal.h +53 -0
  377. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sord_test.c +767 -0
  378. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sord_validate.c +804 -0
  379. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sordi.c +216 -0
  380. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/sordmm_test.cpp +25 -0
  381. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/syntax.c +203 -0
  382. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/btree.c +936 -0
  383. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/btree.h +187 -0
  384. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/common.h +138 -0
  385. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/digest.c +141 -0
  386. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/digest.h +67 -0
  387. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/hash.c +230 -0
  388. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord/src/zix/hash.h +138 -0
  389. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sord_config.h +42 -0
  390. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sratom/COPYING +13 -0
  391. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sratom/sratom/sratom.h +220 -0
  392. package/ios/juce_modules/juce_audio_processors/format_types/LV2_SDK/sratom/src/sratom.c +919 -0
  393. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/VST3_License_Agreement.pdf +0 -0
  394. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/VST3_Usage_Guidelines.pdf +0 -0
  395. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/baseiids.cpp +52 -0
  396. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/classfactoryhelpers.h +87 -0
  397. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.cpp +641 -0
  398. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.h +306 -0
  399. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fcommandline.h +392 -0
  400. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.cpp +340 -0
  401. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.h +246 -0
  402. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.cpp +271 -0
  403. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.h +577 -0
  404. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.cpp +756 -0
  405. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.h +242 -0
  406. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.cpp +3962 -0
  407. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.h +767 -0
  408. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.cpp +737 -0
  409. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.h +150 -0
  410. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h +184 -0
  411. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp +146 -0
  412. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/helper.manifest +10 -0
  413. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.cpp +106 -0
  414. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/conststringtable.h +44 -0
  415. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/coreiids.cpp +40 -0
  416. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/falignpop.h +25 -0
  417. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/falignpush.h +40 -0
  418. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h +333 -0
  419. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fstrdefs.h +291 -0
  420. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ftypes.h +176 -0
  421. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp +502 -0
  422. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.h +564 -0
  423. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/futils.h +107 -0
  424. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fvariant.h +297 -0
  425. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ibstream.h +87 -0
  426. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/icloneable.h +41 -0
  427. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ipersistent.h +160 -0
  428. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ipluginbase.h +520 -0
  429. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/iplugincompatibility.h +122 -0
  430. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/istringresult.h +80 -0
  431. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/iupdatehandler.h +98 -0
  432. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/smartpointer.h +386 -0
  433. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/typesizecheck.h +55 -0
  434. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ustring.cpp +275 -0
  435. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/ustring.h +116 -0
  436. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/gui/iplugview.h +287 -0
  437. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/gui/iplugviewcontentscalesupport.h +75 -0
  438. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstattributes.h +150 -0
  439. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstaudioprocessor.h +434 -0
  440. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstautomationstate.h +67 -0
  441. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstchannelcontextinfo.h +238 -0
  442. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstcomponent.h +205 -0
  443. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstcontextmenu.h +219 -0
  444. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstdataexchange.h +221 -0
  445. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsteditcontroller.h +657 -0
  446. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstevents.h +221 -0
  447. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsthostapplication.h +163 -0
  448. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstinterappaudio.h +142 -0
  449. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstmessage.h +97 -0
  450. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstmidicontrollers.h +118 -0
  451. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstmidilearn.h +106 -0
  452. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstnoteexpression.h +255 -0
  453. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstparameterchanges.h +145 -0
  454. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstparameterfunctionname.h +151 -0
  455. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstphysicalui.h +169 -0
  456. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstpluginterfacesupport.h +67 -0
  457. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstplugview.h +62 -0
  458. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprefetchablesupport.h +99 -0
  459. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstprocesscontext.h +153 -0
  460. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstremapparamid.h +75 -0
  461. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstrepresentation.h +364 -0
  462. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsttestplugprovider.h +109 -0
  463. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstunits.h +271 -0
  464. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstpshpack4.h +30 -0
  465. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h +1318 -0
  466. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h +157 -0
  467. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/samples/vst-utilities/moduleinfotool/source/main.cpp +441 -0
  468. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp +319 -0
  469. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h +79 -0
  470. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp +100 -0
  471. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.h +116 -0
  472. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.cpp +81 -0
  473. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.h +54 -0
  474. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.cpp +342 -0
  475. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.h +120 -0
  476. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.cpp +340 -0
  477. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.h +214 -0
  478. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp +369 -0
  479. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_mac.mm +395 -0
  480. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_win32.cpp +647 -0
  481. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.cpp +134 -0
  482. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.h +70 -0
  483. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/json.h +3403 -0
  484. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/jsoncxx.h +427 -0
  485. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfo.h +100 -0
  486. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.cpp +309 -0
  487. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.h +67 -0
  488. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp +537 -0
  489. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.h +68 -0
  490. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/optional.h +135 -0
  491. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.cpp +148 -0
  492. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.h +147 -0
  493. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/uid.h +286 -0
  494. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.cpp +99 -0
  495. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.h +172 -0
  496. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.cpp +216 -0
  497. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.h +118 -0
  498. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.cpp +180 -0
  499. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.h +110 -0
  500. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.cpp +701 -0
  501. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.h +374 -0
  502. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstinitiids.cpp +154 -0
  503. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.cpp +454 -0
  504. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.h +240 -0
  505. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp +927 -0
  506. package/ios/juce_modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h +306 -0
  507. package/ios/juce_modules/juce_audio_processors/format_types/juce_ARACommon.cpp +99 -0
  508. package/ios/juce_modules/juce_audio_processors/format_types/juce_ARACommon.h +98 -0
  509. package/ios/juce_modules/juce_audio_processors/format_types/juce_ARAHosting.cpp +490 -0
  510. package/ios/juce_modules/juce_audio_processors/format_types/juce_ARAHosting.h +786 -0
  511. package/ios/juce_modules/juce_audio_processors/format_types/juce_AU_Shared.h +588 -0
  512. package/ios/juce_modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h +79 -0
  513. package/ios/juce_modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +2947 -0
  514. package/ios/juce_modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +728 -0
  515. package/ios/juce_modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.h +79 -0
  516. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2Common.h +676 -0
  517. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp +5654 -0
  518. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2PluginFormat.h +87 -0
  519. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2PluginFormat_test.cpp +281 -0
  520. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2Resources.h +10241 -0
  521. package/ios/juce_modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp +117 -0
  522. package/ios/juce_modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp +225 -0
  523. package/ios/juce_modules/juce_audio_processors/format_types/juce_VST3Common.h +1851 -0
  524. package/ios/juce_modules/juce_audio_processors/format_types/juce_VST3Headers.h +280 -0
  525. package/ios/juce_modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +4086 -0
  526. package/ios/juce_modules/juce_audio_processors/format_types/juce_VST3PluginFormat.h +95 -0
  527. package/ios/juce_modules/juce_audio_processors/format_types/juce_VST3PluginFormat_test.cpp +740 -0
  528. package/ios/juce_modules/juce_audio_processors/format_types/juce_VSTCommon.h +315 -0
  529. package/ios/juce_modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h +229 -0
  530. package/ios/juce_modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +3764 -0
  531. package/ios/juce_modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h +141 -0
  532. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipslcontextinfo.h +190 -0
  533. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipsleditcontroller.h +108 -0
  534. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipslgainreduction.h +53 -0
  535. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipslhostcommands.h +121 -0
  536. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipslviewembedding.h +53 -0
  537. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/ipslviewscaling.h +67 -0
  538. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/pslauextensions.h +57 -0
  539. package/ios/juce_modules/juce_audio_processors/format_types/pslextensions/pslvst2extensions.h +111 -0
  540. package/ios/juce_modules/juce_audio_processors/juce_audio_processors.cpp +246 -0
  541. package/ios/juce_modules/juce_audio_processors/juce_audio_processors.h +195 -0
  542. package/ios/juce_modules/juce_audio_processors/juce_audio_processors.mm +35 -0
  543. package/ios/juce_modules/juce_audio_processors/juce_audio_processors_ara.cpp +51 -0
  544. package/ios/juce_modules/juce_audio_processors/juce_audio_processors_lv2_libs.cpp +44 -0
  545. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp +294 -0
  546. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioPluginInstance.h +191 -0
  547. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +1655 -0
  548. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessor.h +1587 -0
  549. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp +230 -0
  550. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +272 -0
  551. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorEditorHostContext.h +98 -0
  552. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +2375 -0
  553. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +453 -0
  554. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorListener.h +198 -0
  555. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h +370 -0
  556. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.cpp +330 -0
  557. package/ios/juce_modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.h +263 -0
  558. package/ios/juce_modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp +633 -0
  559. package/ios/juce_modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.h +74 -0
  560. package/ios/juce_modules/juce_audio_processors/processors/juce_HostedAudioProcessorParameter.h +61 -0
  561. package/ios/juce_modules/juce_audio_processors/processors/juce_PluginDescription.cpp +126 -0
  562. package/ios/juce_modules/juce_audio_processors/processors/juce_PluginDescription.h +189 -0
  563. package/ios/juce_modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +651 -0
  564. package/ios/juce_modules/juce_audio_processors/scanning/juce_KnownPluginList.h +249 -0
  565. package/ios/juce_modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.cpp +148 -0
  566. package/ios/juce_modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h +147 -0
  567. package/ios/juce_modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +690 -0
  568. package/ios/juce_modules/juce_audio_processors/scanning/juce_PluginListComponent.h +156 -0
  569. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARADebug.h +76 -0
  570. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARADocumentController.cpp +985 -0
  571. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARADocumentController.h +538 -0
  572. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARADocumentControllerCommon.cpp +80 -0
  573. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.cpp +302 -0
  574. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.h +983 -0
  575. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARAPlugInInstanceRoles.cpp +123 -0
  576. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARAPlugInInstanceRoles.h +263 -0
  577. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.cpp +65 -0
  578. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.h +95 -0
  579. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.cpp +163 -0
  580. package/ios/juce_modules/juce_audio_processors/utilities/ARA/juce_AudioProcessor_ARAExtensions.h +213 -0
  581. package/ios/juce_modules/juce_audio_processors/utilities/juce_AAXClientExtensions.cpp +308 -0
  582. package/ios/juce_modules/juce_audio_processors/utilities/juce_AAXClientExtensions.h +92 -0
  583. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp +104 -0
  584. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterBool.h +149 -0
  585. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp +145 -0
  586. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h +162 -0
  587. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp +113 -0
  588. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h +169 -0
  589. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp +146 -0
  590. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioParameterInt.h +163 -0
  591. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.cpp +56 -0
  592. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h +200 -0
  593. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +997 -0
  594. package/ios/juce_modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +669 -0
  595. package/ios/juce_modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h +155 -0
  596. package/ios/juce_modules/juce_audio_processors/utilities/juce_FlagCache.h +191 -0
  597. package/ios/juce_modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp +442 -0
  598. package/ios/juce_modules/juce_audio_processors/utilities/juce_ParameterAttachments.h +400 -0
  599. package/ios/juce_modules/juce_audio_processors/utilities/juce_PluginHostType.cpp +328 -0
  600. package/ios/juce_modules/juce_audio_processors/utilities/juce_PluginHostType.h +265 -0
  601. package/ios/juce_modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp +60 -0
  602. package/ios/juce_modules/juce_audio_processors/utilities/juce_RangedAudioParameter.h +129 -0
  603. package/ios/juce_modules/juce_audio_processors/utilities/juce_VST2ClientExtensions.cpp +48 -0
  604. package/ios/juce_modules/juce_audio_processors/utilities/juce_VST2ClientExtensions.h +83 -0
  605. package/ios/juce_modules/juce_audio_processors/utilities/juce_VST3ClientExtensions.h +119 -0
  606. package/ios/juce_modules/juce_core/native/juce_BasicNativeHeaders.h +6 -1
  607. package/ios/juce_modules/juce_graphics/colour/juce_Colour.cpp +726 -0
  608. package/ios/juce_modules/juce_graphics/colour/juce_Colour.h +429 -0
  609. package/ios/juce_modules/juce_graphics/colour/juce_ColourGradient.cpp +294 -0
  610. package/ios/juce_modules/juce_graphics/colour/juce_ColourGradient.h +255 -0
  611. package/ios/juce_modules/juce_graphics/colour/juce_Colours.cpp +205 -0
  612. package/ios/juce_modules/juce_graphics/colour/juce_Colours.h +200 -0
  613. package/ios/juce_modules/juce_graphics/colour/juce_FillType.cpp +166 -0
  614. package/ios/juce_modules/juce_graphics/colour/juce_FillType.h +165 -0
  615. package/ios/juce_modules/juce_graphics/colour/juce_PixelFormats.h +749 -0
  616. package/ios/juce_modules/juce_graphics/contexts/juce_GraphicsContext.cpp +857 -0
  617. package/ios/juce_modules/juce_graphics/contexts/juce_GraphicsContext.h +758 -0
  618. package/ios/juce_modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h +186 -0
  619. package/ios/juce_modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +59 -0
  620. package/ios/juce_modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h +66 -0
  621. package/ios/juce_modules/juce_graphics/detail/juce_Ranges.cpp +793 -0
  622. package/ios/juce_modules/juce_graphics/detail/juce_Ranges.h +1014 -0
  623. package/ios/juce_modules/juce_graphics/effects/juce_DropShadowEffect.cpp +152 -0
  624. package/ios/juce_modules/juce_graphics/effects/juce_DropShadowEffect.h +122 -0
  625. package/ios/juce_modules/juce_graphics/effects/juce_GlowEffect.cpp +59 -0
  626. package/ios/juce_modules/juce_graphics/effects/juce_GlowEffect.h +86 -0
  627. package/ios/juce_modules/juce_graphics/effects/juce_ImageEffectFilter.h +80 -0
  628. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/CBDT/CBDT.hh +1031 -0
  629. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/COLR/COLR.hh +2745 -0
  630. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/COLR/colrv1-closure.hh +137 -0
  631. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/CPAL/CPAL.hh +358 -0
  632. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/sbix/sbix.hh +448 -0
  633. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Color/svg/svg.hh +152 -0
  634. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/Common/Coverage.hh +352 -0
  635. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/Common/CoverageFormat1.hh +133 -0
  636. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/Common/CoverageFormat2.hh +239 -0
  637. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/Common/RangeRecord.hh +97 -0
  638. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GDEF/GDEF.hh +1044 -0
  639. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/Anchor.hh +84 -0
  640. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/AnchorFormat1.hh +46 -0
  641. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/AnchorFormat2.hh +58 -0
  642. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/AnchorFormat3.hh +120 -0
  643. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/AnchorMatrix.hh +87 -0
  644. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/ChainContextPos.hh +14 -0
  645. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/Common.hh +33 -0
  646. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/ContextPos.hh +14 -0
  647. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/CursivePos.hh +35 -0
  648. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh +311 -0
  649. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/ExtensionPos.hh +17 -0
  650. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/GPOS.hh +171 -0
  651. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/LigatureArray.hh +57 -0
  652. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkArray.hh +128 -0
  653. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkBasePos.hh +41 -0
  654. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh +243 -0
  655. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkLigPos.hh +41 -0
  656. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh +224 -0
  657. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkMarkPos.hh +42 -0
  658. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh +231 -0
  659. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/MarkRecord.hh +51 -0
  660. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PairPos.hh +46 -0
  661. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PairPosFormat1.hh +233 -0
  662. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PairPosFormat2.hh +365 -0
  663. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PairSet.hh +210 -0
  664. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PairValueRecord.hh +99 -0
  665. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PosLookup.hh +79 -0
  666. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/PosLookupSubTable.hh +79 -0
  667. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/SinglePos.hh +98 -0
  668. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/SinglePosFormat1.hh +190 -0
  669. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/SinglePosFormat2.hh +213 -0
  670. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GPOS/ValueFormat.hh +441 -0
  671. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/AlternateSet.hh +126 -0
  672. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/AlternateSubst.hh +62 -0
  673. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh +128 -0
  674. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/ChainContextSubst.hh +18 -0
  675. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/Common.hh +19 -0
  676. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/ContextSubst.hh +18 -0
  677. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/ExtensionSubst.hh +22 -0
  678. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/GSUB.hh +61 -0
  679. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/Ligature.hh +203 -0
  680. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/LigatureSet.hh +188 -0
  681. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/LigatureSubst.hh +71 -0
  682. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh +166 -0
  683. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/MultipleSubst.hh +62 -0
  684. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/MultipleSubstFormat1.hh +130 -0
  685. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh +36 -0
  686. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh +245 -0
  687. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/Sequence.hh +165 -0
  688. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/SingleSubst.hh +103 -0
  689. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh +204 -0
  690. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh +176 -0
  691. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/SubstLookup.hh +220 -0
  692. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/GSUB/SubstLookupSubTable.hh +77 -0
  693. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Layout/types.hh +66 -0
  694. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Var/VARC/VARC.cc +346 -0
  695. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Var/VARC/VARC.hh +193 -0
  696. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/Var/VARC/coord-setter.hh +37 -0
  697. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/CompositeGlyph.hh +435 -0
  698. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/Glyph.hh +556 -0
  699. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/GlyphHeader.hh +52 -0
  700. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/SimpleGlyph.hh +348 -0
  701. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/SubsetGlyph.hh +141 -0
  702. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/composite-iter.hh +68 -0
  703. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/glyf-helpers.hh +127 -0
  704. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/glyf.hh +513 -0
  705. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/loca.hh +43 -0
  706. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/glyf/path-builder.hh +190 -0
  707. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/OT/name/name.hh +589 -0
  708. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/failing-alloc.c +65 -0
  709. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/harfbuzz-subset.cc +64 -0
  710. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/harfbuzz.cc +63 -0
  711. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-ankr-table.hh +99 -0
  712. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-bsln-table.hh +159 -0
  713. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-common.hh +1076 -0
  714. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-feat-table.hh +224 -0
  715. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-just-table.hh +420 -0
  716. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-kerx-table.hh +1191 -0
  717. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-morx-table.hh +1443 -0
  718. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-opbd-table.hh +174 -0
  719. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout-trak-table.hh +232 -0
  720. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout.cc +449 -0
  721. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout.h +795 -0
  722. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-layout.hh +77 -0
  723. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-ltag-table.hh +95 -0
  724. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-map.cc +172 -0
  725. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat-map.hh +123 -0
  726. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-aat.h +38 -0
  727. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-algs.hh +1558 -0
  728. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-array.hh +504 -0
  729. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-atomic.hh +228 -0
  730. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-bimap.hh +205 -0
  731. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-bit-page.hh +352 -0
  732. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-bit-set-invertible.hh +379 -0
  733. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-bit-set.hh +982 -0
  734. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-blob.cc +794 -0
  735. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-blob.h +160 -0
  736. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-blob.hh +98 -0
  737. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer-deserialize-json.hh +795 -0
  738. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer-deserialize-text-glyphs.hh +692 -0
  739. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer-deserialize-text-unicode.hh +332 -0
  740. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer-serialize.cc +872 -0
  741. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer-verify.cc +423 -0
  742. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer.cc +2266 -0
  743. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer.h +805 -0
  744. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-buffer.hh +682 -0
  745. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cache.hh +99 -0
  746. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cff-interp-common.hh +642 -0
  747. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cff-interp-cs-common.hh +905 -0
  748. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cff-interp-dict-common.hh +201 -0
  749. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cff1-interp-cs.hh +160 -0
  750. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cff2-interp-cs.hh +278 -0
  751. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-common.cc +1220 -0
  752. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-common.h +935 -0
  753. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-config.hh +212 -0
  754. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-coretext.cc +1197 -0
  755. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-coretext.h +96 -0
  756. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-cplusplus.hh +220 -0
  757. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-debug.hh +491 -0
  758. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-deprecated.h +318 -0
  759. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-directwrite.cc +884 -0
  760. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-directwrite.h +40 -0
  761. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-dispatch.hh +60 -0
  762. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-draw.cc +458 -0
  763. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-draw.h +340 -0
  764. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-draw.hh +243 -0
  765. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-face-builder.cc +246 -0
  766. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-face.cc +664 -0
  767. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-face.h +187 -0
  768. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-face.hh +111 -0
  769. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-fallback-shape.cc +115 -0
  770. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-font.cc +3069 -0
  771. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-font.h +1153 -0
  772. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-font.hh +720 -0
  773. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ft-colr.hh +601 -0
  774. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ft.cc +1500 -0
  775. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ft.h +145 -0
  776. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-gdi.cc +85 -0
  777. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-gdi.h +39 -0
  778. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-geometry.hh +284 -0
  779. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-glib.cc +232 -0
  780. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-glib.h +56 -0
  781. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-gobject-structs.cc +116 -0
  782. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-gobject-structs.h +136 -0
  783. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-gobject.h +40 -0
  784. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-graphite2.cc +455 -0
  785. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-graphite2.h +61 -0
  786. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-icu.cc +291 -0
  787. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-icu.h +52 -0
  788. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-iter.hh +1037 -0
  789. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-kern.hh +145 -0
  790. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-limits.hh +112 -0
  791. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-machinery.hh +332 -0
  792. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-map.cc +419 -0
  793. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-map.h +143 -0
  794. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-map.hh +568 -0
  795. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-meta.hh +238 -0
  796. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ms-feature-ranges.hh +232 -0
  797. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-multimap.hh +96 -0
  798. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-mutex.hh +122 -0
  799. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-null.hh +226 -0
  800. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-number-parser.hh +237 -0
  801. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-number.cc +79 -0
  802. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-number.hh +41 -0
  803. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-object.hh +357 -0
  804. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-open-file.hh +543 -0
  805. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-open-type.hh +1886 -0
  806. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff-common.hh +374 -0
  807. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff1-std-str.hh +425 -0
  808. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff1-table.cc +620 -0
  809. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff1-table.hh +1539 -0
  810. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff2-table.cc +227 -0
  811. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cff2-table.hh +564 -0
  812. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-cmap-table.hh +2154 -0
  813. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-color.cc +363 -0
  814. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-color.h +155 -0
  815. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-deprecated.h +147 -0
  816. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-face-table-list.hh +155 -0
  817. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-face.cc +60 -0
  818. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-face.hh +77 -0
  819. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-font.cc +662 -0
  820. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-font.h +45 -0
  821. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-gasp-table.hh +84 -0
  822. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-glyf-table.hh +35 -0
  823. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-hdmx-table.hh +177 -0
  824. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-head-table.hh +204 -0
  825. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-hhea-table.hh +106 -0
  826. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-hmtx-table.hh +502 -0
  827. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-kern-table.hh +425 -0
  828. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-base-table.hh +849 -0
  829. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-common.hh +4953 -0
  830. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-gdef-table.hh +34 -0
  831. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-gpos-table.hh +81 -0
  832. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-gsub-table.hh +94 -0
  833. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-gsubgpos.hh +4887 -0
  834. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout-jstf-table.hh +236 -0
  835. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout.cc +2705 -0
  836. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout.h +549 -0
  837. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-layout.hh +611 -0
  838. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-map.cc +394 -0
  839. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-map.hh +298 -0
  840. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-math-table.hh +1132 -0
  841. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-math.cc +338 -0
  842. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-math.h +333 -0
  843. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-maxp-table.hh +156 -0
  844. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-meta-table.hh +131 -0
  845. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-meta.cc +79 -0
  846. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-meta.h +72 -0
  847. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-metrics.cc +436 -0
  848. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-metrics.h +129 -0
  849. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-metrics.hh +35 -0
  850. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-name-language-static.hh +456 -0
  851. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-name-language.hh +40 -0
  852. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-name-table.hh +32 -0
  853. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-name.cc +184 -0
  854. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-name.h +164 -0
  855. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-os2-table.hh +405 -0
  856. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-os2-unicode-ranges.hh +231 -0
  857. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-post-macroman.hh +294 -0
  858. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-post-table-v2subset.hh +142 -0
  859. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-post-table.hh +352 -0
  860. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape-fallback.cc +615 -0
  861. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape-fallback.hh +54 -0
  862. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape-normalize.cc +470 -0
  863. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape-normalize.hh +104 -0
  864. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape.cc +1319 -0
  865. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape.h +53 -0
  866. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shape.hh +171 -0
  867. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic-fallback.hh +383 -0
  868. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic-joining-list.hh +47 -0
  869. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic-pua.hh +118 -0
  870. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic-table.hh +556 -0
  871. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic-win1256.hh +349 -0
  872. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic.cc +774 -0
  873. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-arabic.hh +50 -0
  874. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-default.cc +75 -0
  875. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-hangul.cc +436 -0
  876. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-hebrew.cc +211 -0
  877. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-indic-machine.hh +627 -0
  878. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-indic-table.cc +561 -0
  879. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-indic.cc +1578 -0
  880. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-indic.hh +66 -0
  881. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-khmer-machine.hh +428 -0
  882. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-khmer.cc +387 -0
  883. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-myanmar-machine.hh +553 -0
  884. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-myanmar.cc +390 -0
  885. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-syllabic.cc +112 -0
  886. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-syllabic.hh +47 -0
  887. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-thai.cc +393 -0
  888. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-use-machine.hh +1079 -0
  889. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-use-table.hh +690 -0
  890. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-use.cc +514 -0
  891. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-vowel-constraints.cc +477 -0
  892. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper-vowel-constraints.hh +39 -0
  893. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-shaper.hh +404 -0
  894. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-stat-table.hh +619 -0
  895. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-tag-table.hh +3009 -0
  896. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-tag.cc +658 -0
  897. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-avar-table.hh +411 -0
  898. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-common.hh +1985 -0
  899. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-cvar-table.hh +220 -0
  900. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-fvar-table.hh +505 -0
  901. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-gvar-table.hh +890 -0
  902. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-hvar-table.hh +478 -0
  903. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-mvar-table.hh +184 -0
  904. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var-varc-table.hh +32 -0
  905. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var.cc +328 -0
  906. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-var.h +191 -0
  907. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot-vorg-table.hh +137 -0
  908. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ot.h +49 -0
  909. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-outline.cc +321 -0
  910. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-outline.hh +83 -0
  911. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-paint-extents.cc +330 -0
  912. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-paint-extents.hh +132 -0
  913. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-paint.cc +728 -0
  914. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-paint.h +1029 -0
  915. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-paint.hh +236 -0
  916. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-pool.hh +107 -0
  917. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-priority-queue.hh +174 -0
  918. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-repacker.hh +476 -0
  919. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-sanitize.hh +530 -0
  920. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-serialize.hh +832 -0
  921. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-set-digest.hh +227 -0
  922. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-set.cc +673 -0
  923. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-set.h +203 -0
  924. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-set.hh +186 -0
  925. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shape-plan.cc +581 -0
  926. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shape-plan.h +122 -0
  927. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shape-plan.hh +77 -0
  928. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shape.cc +445 -0
  929. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shape.h +74 -0
  930. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shaper-impl.hh +38 -0
  931. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shaper-list.hh +65 -0
  932. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shaper.cc +102 -0
  933. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-shaper.hh +134 -0
  934. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-static.cc +138 -0
  935. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-string-array.hh +85 -0
  936. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-style.cc +134 -0
  937. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-style.h +81 -0
  938. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-accelerator.hh +141 -0
  939. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-cff-common.cc +231 -0
  940. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-cff-common.hh +1228 -0
  941. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-cff1.cc +1001 -0
  942. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-cff2.cc +679 -0
  943. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-input.cc +748 -0
  944. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-input.hh +155 -0
  945. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-instancer-iup.cc +532 -0
  946. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-instancer-iup.hh +37 -0
  947. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-instancer-solver.cc +434 -0
  948. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-instancer-solver.hh +114 -0
  949. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-plan-member-list.hh +164 -0
  950. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-plan.cc +1570 -0
  951. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-plan.hh +302 -0
  952. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-repacker.cc +58 -0
  953. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset-repacker.h +81 -0
  954. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset.cc +704 -0
  955. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset.h +260 -0
  956. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-subset.hh +74 -0
  957. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ucd-table.hh +5637 -0
  958. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-ucd.cc +258 -0
  959. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-unicode-emoji-table.hh +79 -0
  960. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-unicode.cc +625 -0
  961. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-unicode.h +643 -0
  962. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-unicode.hh +403 -0
  963. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-uniscribe.cc +889 -0
  964. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-uniscribe.h +46 -0
  965. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-utf.hh +481 -0
  966. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-vector.hh +539 -0
  967. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-version.h +95 -0
  968. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-blob.hh +50 -0
  969. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-buffer.hh +217 -0
  970. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-common.hh +44 -0
  971. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-face.hh +109 -0
  972. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-font.hh +263 -0
  973. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-list.hh +109 -0
  974. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api-shape.hh +70 -0
  975. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api.cc +46 -0
  976. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api.h +322 -0
  977. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-api.hh +117 -0
  978. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb-wasm-shape.cc +470 -0
  979. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb.h +51 -0
  980. package/ios/juce_modules/juce_graphics/fonts/harfbuzz/hb.hh +555 -0
  981. package/ios/juce_modules/juce_graphics/fonts/juce_AttributedString.cpp +288 -0
  982. package/ios/juce_modules/juce_graphics/fonts/juce_AttributedString.h +219 -0
  983. package/ios/juce_modules/juce_graphics/fonts/juce_Font.cpp +1036 -0
  984. package/ios/juce_modules/juce_graphics/fonts/juce_Font.h +571 -0
  985. package/ios/juce_modules/juce_graphics/fonts/juce_FontOptions.cpp +111 -0
  986. package/ios/juce_modules/juce_graphics/fonts/juce_FontOptions.h +218 -0
  987. package/ios/juce_modules/juce_graphics/fonts/juce_FunctionPointerDestructor.h +53 -0
  988. package/ios/juce_modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +657 -0
  989. package/ios/juce_modules/juce_graphics/fonts/juce_GlyphArrangement.h +324 -0
  990. package/ios/juce_modules/juce_graphics/fonts/juce_JustifiedText.cpp +580 -0
  991. package/ios/juce_modules/juce_graphics/fonts/juce_LruCache.h +88 -0
  992. package/ios/juce_modules/juce_graphics/fonts/juce_ShapedText.cpp +210 -0
  993. package/ios/juce_modules/juce_graphics/fonts/juce_SimpleShapedText.cpp +1279 -0
  994. package/ios/juce_modules/juce_graphics/fonts/juce_TextLayout.cpp +512 -0
  995. package/ios/juce_modules/juce_graphics/fonts/juce_TextLayout.h +278 -0
  996. package/ios/juce_modules/juce_graphics/fonts/juce_Typeface.cpp +983 -0
  997. package/ios/juce_modules/juce_graphics/fonts/juce_Typeface.h +396 -0
  998. package/ios/juce_modules/juce_graphics/fonts/juce_TypefaceFileCache.h +74 -0
  999. package/ios/juce_modules/juce_graphics/fonts/juce_TypefaceTestData.cpp +6051 -0
  1000. package/ios/juce_modules/juce_graphics/geometry/juce_AffineTransform.cpp +307 -0
  1001. package/ios/juce_modules/juce_graphics/geometry/juce_AffineTransform.h +314 -0
  1002. package/ios/juce_modules/juce_graphics/geometry/juce_BorderSize.h +176 -0
  1003. package/ios/juce_modules/juce_graphics/geometry/juce_EdgeTable.cpp +848 -0
  1004. package/ios/juce_modules/juce_graphics/geometry/juce_EdgeTable.h +225 -0
  1005. package/ios/juce_modules/juce_graphics/geometry/juce_Line.h +454 -0
  1006. package/ios/juce_modules/juce_graphics/geometry/juce_Parallelogram.h +194 -0
  1007. package/ios/juce_modules/juce_graphics/geometry/juce_Parallelogram_test.cpp +75 -0
  1008. package/ios/juce_modules/juce_graphics/geometry/juce_Path.cpp +1531 -0
  1009. package/ios/juce_modules/juce_graphics/geometry/juce_Path.h +846 -0
  1010. package/ios/juce_modules/juce_graphics/geometry/juce_PathIterator.cpp +304 -0
  1011. package/ios/juce_modules/juce_graphics/geometry/juce_PathIterator.h +120 -0
  1012. package/ios/juce_modules/juce_graphics/geometry/juce_PathStrokeType.cpp +756 -0
  1013. package/ios/juce_modules/juce_graphics/geometry/juce_PathStrokeType.h +215 -0
  1014. package/ios/juce_modules/juce_graphics/geometry/juce_Point.h +269 -0
  1015. package/ios/juce_modules/juce_graphics/geometry/juce_Rectangle.h +1032 -0
  1016. package/ios/juce_modules/juce_graphics/geometry/juce_RectangleList.h +694 -0
  1017. package/ios/juce_modules/juce_graphics/geometry/juce_Rectangle_test.cpp +60 -0
  1018. package/ios/juce_modules/juce_graphics/image_formats/jpglib/README +385 -0
  1019. package/ios/juce_modules/juce_graphics/image_formats/jpglib/cderror.h +132 -0
  1020. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcapimin.c +280 -0
  1021. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcapistd.c +161 -0
  1022. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jccoefct.c +449 -0
  1023. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jccolor.c +459 -0
  1024. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcdctmgr.c +387 -0
  1025. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jchuff.c +909 -0
  1026. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jchuff.h +52 -0
  1027. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcinit.c +72 -0
  1028. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcmainct.c +293 -0
  1029. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcmarker.c +597 -0
  1030. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcmaster.c +590 -0
  1031. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcomapi.c +106 -0
  1032. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jconfig.h +59 -0
  1033. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcparam.c +610 -0
  1034. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcphuff.c +833 -0
  1035. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcprepct.c +354 -0
  1036. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jcsample.c +519 -0
  1037. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jctrans.c +388 -0
  1038. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdapimin.c +395 -0
  1039. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdapistd.c +275 -0
  1040. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdatasrc.c +212 -0
  1041. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdcoefct.c +736 -0
  1042. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdcolor.c +396 -0
  1043. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdct.h +182 -0
  1044. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jddctmgr.c +269 -0
  1045. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdhuff.c +625 -0
  1046. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdhuff.h +206 -0
  1047. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdinput.c +381 -0
  1048. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdmainct.c +512 -0
  1049. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdmarker.c +1292 -0
  1050. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdmaster.c +557 -0
  1051. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdmerge.c +400 -0
  1052. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdphuff.c +642 -0
  1053. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdpostct.c +290 -0
  1054. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdsample.c +478 -0
  1055. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jdtrans.c +143 -0
  1056. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jerror.c +252 -0
  1057. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jerror.h +291 -0
  1058. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jfdctflt.c +168 -0
  1059. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jfdctfst.c +224 -0
  1060. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jfdctint.c +283 -0
  1061. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jidctflt.c +242 -0
  1062. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jidctfst.c +368 -0
  1063. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jidctint.c +389 -0
  1064. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jidctred.c +398 -0
  1065. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jinclude.h +197 -0
  1066. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jmemmgr.c +1118 -0
  1067. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jmemnobs.c +109 -0
  1068. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jmemsys.h +203 -0
  1069. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jmorecfg.h +363 -0
  1070. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jpegint.h +392 -0
  1071. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jpeglib.h +1096 -0
  1072. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jquant1.c +856 -0
  1073. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jquant2.c +1310 -0
  1074. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jutils.c +179 -0
  1075. package/ios/juce_modules/juce_graphics/image_formats/jpglib/jversion.h +14 -0
  1076. package/ios/juce_modules/juce_graphics/image_formats/jpglib/transupp.c +928 -0
  1077. package/ios/juce_modules/juce_graphics/image_formats/jpglib/transupp.h +135 -0
  1078. package/ios/juce_modules/juce_graphics/image_formats/juce_GIFLoader.cpp +464 -0
  1079. package/ios/juce_modules/juce_graphics/image_formats/juce_JPEGLoader.cpp +456 -0
  1080. package/ios/juce_modules/juce_graphics/image_formats/juce_PNGLoader.cpp +635 -0
  1081. package/ios/juce_modules/juce_graphics/image_formats/pnglib/png.c +4607 -0
  1082. package/ios/juce_modules/juce_graphics/image_formats/pnglib/png.h +3251 -0
  1083. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngconf.h +623 -0
  1084. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngdebug.h +153 -0
  1085. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngerror.c +963 -0
  1086. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngget.c +1249 -0
  1087. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pnginfo.h +267 -0
  1088. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngmem.c +284 -0
  1089. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngpread.c +1096 -0
  1090. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngpriv.h +2156 -0
  1091. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngread.c +4225 -0
  1092. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngrio.c +120 -0
  1093. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngrtran.c +5102 -0
  1094. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngrutil.c +4681 -0
  1095. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngset.c +1802 -0
  1096. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngstruct.h +491 -0
  1097. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngtrans.c +864 -0
  1098. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngwio.c +168 -0
  1099. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngwrite.c +2395 -0
  1100. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngwtran.c +587 -0
  1101. package/ios/juce_modules/juce_graphics/image_formats/pnglib/pngwutil.c +2781 -0
  1102. package/ios/juce_modules/juce_graphics/images/juce_Image.cpp +851 -0
  1103. package/ios/juce_modules/juce_graphics/images/juce_Image.h +630 -0
  1104. package/ios/juce_modules/juce_graphics/images/juce_ImageCache.cpp +183 -0
  1105. package/ios/juce_modules/juce_graphics/images/juce_ImageCache.h +136 -0
  1106. package/ios/juce_modules/juce_graphics/images/juce_ImageConvolutionKernel.cpp +209 -0
  1107. package/ios/juce_modules/juce_graphics/images/juce_ImageConvolutionKernel.h +121 -0
  1108. package/ios/juce_modules/juce_graphics/images/juce_ImageFileFormat.cpp +120 -0
  1109. package/ios/juce_modules/juce_graphics/images/juce_ImageFileFormat.h +232 -0
  1110. package/ios/juce_modules/juce_graphics/images/juce_ScaledImage.h +93 -0
  1111. package/ios/juce_modules/juce_graphics/juce_graphics.cpp +230 -0
  1112. package/ios/juce_modules/juce_graphics/juce_graphics.h +162 -0
  1113. package/ios/juce_modules/juce_graphics/juce_graphics.mm +35 -0
  1114. package/ios/juce_modules/juce_graphics/juce_graphics_Harfbuzz.cpp +100 -0
  1115. package/ios/juce_modules/juce_graphics/native/juce_CoreGraphicsContext_mac.h +153 -0
  1116. package/ios/juce_modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm +969 -0
  1117. package/ios/juce_modules/juce_graphics/native/juce_CoreGraphicsHelpers_mac.h +117 -0
  1118. package/ios/juce_modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp +1807 -0
  1119. package/ios/juce_modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.h +174 -0
  1120. package/ios/juce_modules/juce_graphics/native/juce_Direct2DHelpers_windows.cpp +456 -0
  1121. package/ios/juce_modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp +784 -0
  1122. package/ios/juce_modules/juce_graphics/native/juce_Direct2DHwndContext_windows.h +73 -0
  1123. package/ios/juce_modules/juce_graphics/native/juce_Direct2DImageContext_windows.cpp +124 -0
  1124. package/ios/juce_modules/juce_graphics/native/juce_Direct2DImageContext_windows.h +55 -0
  1125. package/ios/juce_modules/juce_graphics/native/juce_Direct2DImage_windows.cpp +732 -0
  1126. package/ios/juce_modules/juce_graphics/native/juce_Direct2DImage_windows.h +94 -0
  1127. package/ios/juce_modules/juce_graphics/native/juce_Direct2DMetrics_windows.cpp +132 -0
  1128. package/ios/juce_modules/juce_graphics/native/juce_Direct2DMetrics_windows.h +320 -0
  1129. package/ios/juce_modules/juce_graphics/native/juce_Direct2DResources_windows.cpp +661 -0
  1130. package/ios/juce_modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp +920 -0
  1131. package/ios/juce_modules/juce_graphics/native/juce_DirectX_windows.h +330 -0
  1132. package/ios/juce_modules/juce_graphics/native/juce_EventTracing.h +310 -0
  1133. package/ios/juce_modules/juce_graphics/native/juce_Fonts_android.cpp +636 -0
  1134. package/ios/juce_modules/juce_graphics/native/juce_Fonts_freetype.cpp +589 -0
  1135. package/ios/juce_modules/juce_graphics/native/juce_Fonts_linux.cpp +208 -0
  1136. package/ios/juce_modules/juce_graphics/native/juce_Fonts_mac.mm +416 -0
  1137. package/ios/juce_modules/juce_graphics/native/juce_GraphicsContext_android.cpp +43 -0
  1138. package/ios/juce_modules/juce_graphics/native/juce_IconHelpers_android.cpp +39 -0
  1139. package/ios/juce_modules/juce_graphics/native/juce_IconHelpers_linux.cpp +39 -0
  1140. package/ios/juce_modules/juce_graphics/native/juce_IconHelpers_mac.cpp +150 -0
  1141. package/ios/juce_modules/juce_graphics/native/juce_IconHelpers_windows.cpp +39 -0
  1142. package/ios/juce_modules/juce_graphics/native/juce_RenderingHelpers.h +2696 -0
  1143. package/ios/juce_modules/juce_graphics/placement/juce_Justification.h +196 -0
  1144. package/ios/juce_modules/juce_graphics/placement/juce_RectanglePlacement.cpp +131 -0
  1145. package/ios/juce_modules/juce_graphics/placement/juce_RectanglePlacement.h +183 -0
  1146. package/ios/juce_modules/juce_graphics/unicode/juce_Unicode.cpp +331 -0
  1147. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeBidi.cpp +1139 -0
  1148. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeBrackets.cpp +142 -0
  1149. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeGenerated.cpp +1380 -0
  1150. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeLine.cpp +273 -0
  1151. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeScript.cpp +235 -0
  1152. package/ios/juce_modules/juce_graphics/unicode/juce_UnicodeUtils.cpp +104 -0
  1153. package/ios/juce_modules/juce_gui_basics/accessibility/enums/juce_AccessibilityActions.h +128 -0
  1154. package/ios/juce_modules/juce_gui_basics/accessibility/enums/juce_AccessibilityEvent.h +90 -0
  1155. package/ios/juce_modules/juce_gui_basics/accessibility/enums/juce_AccessibilityRole.h +80 -0
  1156. package/ios/juce_modules/juce_gui_basics/accessibility/interfaces/juce_AccessibilityCellInterface.h +61 -0
  1157. package/ios/juce_modules/juce_gui_basics/accessibility/interfaces/juce_AccessibilityTableInterface.h +106 -0
  1158. package/ios/juce_modules/juce_gui_basics/accessibility/interfaces/juce_AccessibilityTextInterface.h +93 -0
  1159. package/ios/juce_modules/juce_gui_basics/accessibility/interfaces/juce_AccessibilityValueInterface.h +231 -0
  1160. package/ios/juce_modules/juce_gui_basics/accessibility/juce_AccessibilityHandler.cpp +412 -0
  1161. package/ios/juce_modules/juce_gui_basics/accessibility/juce_AccessibilityHandler.h +354 -0
  1162. package/ios/juce_modules/juce_gui_basics/accessibility/juce_AccessibilityState.h +236 -0
  1163. package/ios/juce_modules/juce_gui_basics/application/juce_Application.cpp +109 -0
  1164. package/ios/juce_modules/juce_gui_basics/application/juce_Application.h +202 -0
  1165. package/ios/juce_modules/juce_gui_basics/buttons/juce_ArrowButton.cpp +60 -0
  1166. package/ios/juce_modules/juce_gui_basics/buttons/juce_ArrowButton.h +74 -0
  1167. package/ios/juce_modules/juce_gui_basics/buttons/juce_Button.cpp +730 -0
  1168. package/ios/juce_modules/juce_gui_basics/buttons/juce_Button.h +559 -0
  1169. package/ios/juce_modules/juce_gui_basics/buttons/juce_DrawableButton.cpp +250 -0
  1170. package/ios/juce_modules/juce_gui_basics/buttons/juce_DrawableButton.h +206 -0
  1171. package/ios/juce_modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp +138 -0
  1172. package/ios/juce_modules/juce_gui_basics/buttons/juce_HyperlinkButton.h +139 -0
  1173. package/ios/juce_modules/juce_gui_basics/buttons/juce_ImageButton.cpp +207 -0
  1174. package/ios/juce_modules/juce_gui_basics/buttons/juce_ImageButton.h +170 -0
  1175. package/ios/juce_modules/juce_gui_basics/buttons/juce_ShapeButton.cpp +146 -0
  1176. package/ios/juce_modules/juce_gui_basics/buttons/juce_ShapeButton.h +135 -0
  1177. package/ios/juce_modules/juce_gui_basics/buttons/juce_TextButton.cpp +86 -0
  1178. package/ios/juce_modules/juce_gui_basics/buttons/juce_TextButton.h +118 -0
  1179. package/ios/juce_modules/juce_gui_basics/buttons/juce_ToggleButton.cpp +74 -0
  1180. package/ios/juce_modules/juce_gui_basics/buttons/juce_ToggleButton.h +102 -0
  1181. package/ios/juce_modules/juce_gui_basics/buttons/juce_ToolbarButton.cpp +122 -0
  1182. package/ios/juce_modules/juce_gui_basics/buttons/juce_ToolbarButton.h +107 -0
  1183. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandID.h +99 -0
  1184. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.cpp +75 -0
  1185. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.h +199 -0
  1186. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp +331 -0
  1187. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h +358 -0
  1188. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp +195 -0
  1189. package/ios/juce_modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.h +253 -0
  1190. package/ios/juce_modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp +427 -0
  1191. package/ios/juce_modules/juce_gui_basics/commands/juce_KeyPressMappingSet.h +253 -0
  1192. package/ios/juce_modules/juce_gui_basics/components/juce_CachedComponentImage.h +81 -0
  1193. package/ios/juce_modules/juce_gui_basics/components/juce_Component.cpp +3013 -0
  1194. package/ios/juce_modules/juce_gui_basics/components/juce_Component.h +2716 -0
  1195. package/ios/juce_modules/juce_gui_basics/components/juce_ComponentListener.cpp +47 -0
  1196. package/ios/juce_modules/juce_gui_basics/components/juce_ComponentListener.h +131 -0
  1197. package/ios/juce_modules/juce_gui_basics/components/juce_ComponentTraverser.h +81 -0
  1198. package/ios/juce_modules/juce_gui_basics/components/juce_FocusTraverser.cpp +283 -0
  1199. package/ios/juce_modules/juce_gui_basics/components/juce_FocusTraverser.h +102 -0
  1200. package/ios/juce_modules/juce_gui_basics/components/juce_ModalComponentManager.cpp +295 -0
  1201. package/ios/juce_modules/juce_gui_basics/components/juce_ModalComponentManager.h +340 -0
  1202. package/ios/juce_modules/juce_gui_basics/desktop/juce_Desktop.cpp +386 -0
  1203. package/ios/juce_modules/juce_gui_basics/desktop/juce_Desktop.h +502 -0
  1204. package/ios/juce_modules/juce_gui_basics/desktop/juce_Displays.cpp +447 -0
  1205. package/ios/juce_modules/juce_gui_basics/desktop/juce_Displays.h +218 -0
  1206. package/ios/juce_modules/juce_gui_basics/detail/juce_AccessibilityHelpers.cpp +42 -0
  1207. package/ios/juce_modules/juce_gui_basics/detail/juce_AccessibilityHelpers.h +79 -0
  1208. package/ios/juce_modules/juce_gui_basics/detail/juce_AlertWindowHelpers.h +124 -0
  1209. package/ios/juce_modules/juce_gui_basics/detail/juce_ButtonAccessibilityHandler.h +134 -0
  1210. package/ios/juce_modules/juce_gui_basics/detail/juce_ComponentHelpers.h +291 -0
  1211. package/ios/juce_modules/juce_gui_basics/detail/juce_CustomMouseCursorInfo.h +44 -0
  1212. package/ios/juce_modules/juce_gui_basics/detail/juce_FocusHelpers.h +126 -0
  1213. package/ios/juce_modules/juce_gui_basics/detail/juce_FocusRestorer.h +55 -0
  1214. package/ios/juce_modules/juce_gui_basics/detail/juce_LookAndFeelHelpers.h +71 -0
  1215. package/ios/juce_modules/juce_gui_basics/detail/juce_MouseInputSourceImpl.h +597 -0
  1216. package/ios/juce_modules/juce_gui_basics/detail/juce_MouseInputSourceList.h +163 -0
  1217. package/ios/juce_modules/juce_gui_basics/detail/juce_PointerState.h +113 -0
  1218. package/ios/juce_modules/juce_gui_basics/detail/juce_ScalingHelpers.h +132 -0
  1219. package/ios/juce_modules/juce_gui_basics/detail/juce_ScopedContentSharerImpl.h +107 -0
  1220. package/ios/juce_modules/juce_gui_basics/detail/juce_ScopedContentSharerInterface.h +224 -0
  1221. package/ios/juce_modules/juce_gui_basics/detail/juce_ScopedMessageBoxImpl.h +141 -0
  1222. package/ios/juce_modules/juce_gui_basics/detail/juce_ScopedMessageBoxInterface.h +69 -0
  1223. package/ios/juce_modules/juce_gui_basics/detail/juce_StandardCachedComponentImage.h +102 -0
  1224. package/ios/juce_modules/juce_gui_basics/detail/juce_ToolbarItemDragAndDropOverlayComponent.h +127 -0
  1225. package/ios/juce_modules/juce_gui_basics/detail/juce_TopLevelWindowManager.h +145 -0
  1226. package/ios/juce_modules/juce_gui_basics/detail/juce_ViewportHelpers.h +58 -0
  1227. package/ios/juce_modules/juce_gui_basics/detail/juce_WindowingHelpers.h +70 -0
  1228. package/ios/juce_modules/juce_gui_basics/drawables/juce_Drawable.cpp +228 -0
  1229. package/ios/juce_modules/juce_gui_basics/drawables/juce_Drawable.h +271 -0
  1230. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp +173 -0
  1231. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableComposite.h +126 -0
  1232. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableImage.cpp +165 -0
  1233. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableImage.h +126 -0
  1234. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawablePath.cpp +66 -0
  1235. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawablePath.h +86 -0
  1236. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp +96 -0
  1237. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableRectangle.h +85 -0
  1238. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableShape.cpp +190 -0
  1239. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableShape.h +135 -0
  1240. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableText.cpp +241 -0
  1241. package/ios/juce_modules/juce_gui_basics/drawables/juce_DrawableText.h +130 -0
  1242. package/ios/juce_modules/juce_gui_basics/drawables/juce_SVGParser.cpp +1903 -0
  1243. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp +83 -0
  1244. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_ContentSharer.h +154 -0
  1245. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp +79 -0
  1246. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.h +125 -0
  1247. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp +279 -0
  1248. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h +235 -0
  1249. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp +633 -0
  1250. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h +306 -0
  1251. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h +67 -0
  1252. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +292 -0
  1253. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileChooser.h +358 -0
  1254. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp +272 -0
  1255. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h +177 -0
  1256. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp +295 -0
  1257. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileListComponent.h +104 -0
  1258. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h +75 -0
  1259. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp +280 -0
  1260. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.h +126 -0
  1261. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp +690 -0
  1262. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.h +117 -0
  1263. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp +277 -0
  1264. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h +245 -0
  1265. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_ImagePreviewComponent.cpp +135 -0
  1266. package/ios/juce_modules/juce_gui_basics/filebrowser/juce_ImagePreviewComponent.h +77 -0
  1267. package/ios/juce_modules/juce_gui_basics/juce_gui_basics.cpp +370 -0
  1268. package/ios/juce_modules/juce_gui_basics/juce_gui_basics.h +403 -0
  1269. package/ios/juce_modules/juce_gui_basics/juce_gui_basics.mm +35 -0
  1270. package/ios/juce_modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp +73 -0
  1271. package/ios/juce_modules/juce_gui_basics/keyboard/juce_CaretComponent.h +90 -0
  1272. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyListener.cpp +43 -0
  1273. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyListener.h +86 -0
  1274. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +298 -0
  1275. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyPress.h +286 -0
  1276. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.cpp +283 -0
  1277. package/ios/juce_modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.h +96 -0
  1278. package/ios/juce_modules/juce_gui_basics/keyboard/juce_ModifierKeys.cpp +58 -0
  1279. package/ios/juce_modules/juce_gui_basics/keyboard/juce_ModifierKeys.h +220 -0
  1280. package/ios/juce_modules/juce_gui_basics/keyboard/juce_SystemClipboard.h +58 -0
  1281. package/ios/juce_modules/juce_gui_basics/keyboard/juce_TextEditorKeyMapper.h +132 -0
  1282. package/ios/juce_modules/juce_gui_basics/keyboard/juce_TextInputTarget.h +129 -0
  1283. package/ios/juce_modules/juce_gui_basics/layout/juce_AnimatedPosition.h +216 -0
  1284. package/ios/juce_modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h +162 -0
  1285. package/ios/juce_modules/juce_gui_basics/layout/juce_BorderedComponentBoundsConstrainer.cpp +86 -0
  1286. package/ios/juce_modules/juce_gui_basics/layout/juce_BorderedComponentBoundsConstrainer.h +78 -0
  1287. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +363 -0
  1288. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentAnimator.h +174 -0
  1289. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp +314 -0
  1290. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.h +206 -0
  1291. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp +295 -0
  1292. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentBuilder.h +256 -0
  1293. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp +151 -0
  1294. package/ios/juce_modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h +105 -0
  1295. package/ios/juce_modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp +512 -0
  1296. package/ios/juce_modules/juce_gui_basics/layout/juce_ConcertinaPanel.h +153 -0
  1297. package/ios/juce_modules/juce_gui_basics/layout/juce_FlexBox.cpp +1158 -0
  1298. package/ios/juce_modules/juce_gui_basics/layout/juce_FlexBox.h +152 -0
  1299. package/ios/juce_modules/juce_gui_basics/layout/juce_FlexItem.h +186 -0
  1300. package/ios/juce_modules/juce_gui_basics/layout/juce_Grid.cpp +1651 -0
  1301. package/ios/juce_modules/juce_gui_basics/layout/juce_Grid.h +232 -0
  1302. package/ios/juce_modules/juce_gui_basics/layout/juce_GridItem.cpp +188 -0
  1303. package/ios/juce_modules/juce_gui_basics/layout/juce_GridItem.h +249 -0
  1304. package/ios/juce_modules/juce_gui_basics/layout/juce_GroupComponent.cpp +87 -0
  1305. package/ios/juce_modules/juce_gui_basics/layout/juce_GroupComponent.h +120 -0
  1306. package/ios/juce_modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp +641 -0
  1307. package/ios/juce_modules/juce_gui_basics/layout/juce_MultiDocumentPanel.h +390 -0
  1308. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp +208 -0
  1309. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h +205 -0
  1310. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp +112 -0
  1311. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableCornerComponent.h +101 -0
  1312. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.cpp +139 -0
  1313. package/ios/juce_modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h +109 -0
  1314. package/ios/juce_modules/juce_gui_basics/layout/juce_ScrollBar.cpp +486 -0
  1315. package/ios/juce_modules/juce_gui_basics/layout/juce_ScrollBar.h +450 -0
  1316. package/ios/juce_modules/juce_gui_basics/layout/juce_SidePanel.cpp +309 -0
  1317. package/ios/juce_modules/juce_gui_basics/layout/juce_SidePanel.h +248 -0
  1318. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp +351 -0
  1319. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableLayoutManager.h +270 -0
  1320. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.cpp +88 -0
  1321. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h +114 -0
  1322. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp +131 -0
  1323. package/ios/juce_modules/juce_gui_basics/layout/juce_StretchableObjectResizer.h +111 -0
  1324. package/ios/juce_modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +592 -0
  1325. package/ios/juce_modules/juce_gui_basics/layout/juce_TabbedButtonBar.h +382 -0
  1326. package/ios/juce_modules/juce_gui_basics/layout/juce_TabbedComponent.cpp +328 -0
  1327. package/ios/juce_modules/juce_gui_basics/layout/juce_TabbedComponent.h +236 -0
  1328. package/ios/juce_modules/juce_gui_basics/layout/juce_Viewport.cpp +649 -0
  1329. package/ios/juce_modules/juce_gui_basics/layout/juce_Viewport.h +383 -0
  1330. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp +201 -0
  1331. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h +301 -0
  1332. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp +599 -0
  1333. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h +114 -0
  1334. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +3200 -0
  1335. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h +443 -0
  1336. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +655 -0
  1337. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h +107 -0
  1338. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +1516 -0
  1339. package/ios/juce_modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.h +269 -0
  1340. package/ios/juce_modules/juce_gui_basics/menus/juce_BurgerMenuComponent.cpp +311 -0
  1341. package/ios/juce_modules/juce_gui_basics/menus/juce_BurgerMenuComponent.h +120 -0
  1342. package/ios/juce_modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp +472 -0
  1343. package/ios/juce_modules/juce_gui_basics/menus/juce_MenuBarComponent.h +138 -0
  1344. package/ios/juce_modules/juce_gui_basics/menus/juce_MenuBarModel.cpp +108 -0
  1345. package/ios/juce_modules/juce_gui_basics/menus/juce_MenuBarModel.h +201 -0
  1346. package/ios/juce_modules/juce_gui_basics/menus/juce_PopupMenu.cpp +2401 -0
  1347. package/ios/juce_modules/juce_gui_basics/menus/juce_PopupMenu.h +1070 -0
  1348. package/ios/juce_modules/juce_gui_basics/misc/juce_BubbleComponent.cpp +162 -0
  1349. package/ios/juce_modules/juce_gui_basics/misc/juce_BubbleComponent.h +213 -0
  1350. package/ios/juce_modules/juce_gui_basics/misc/juce_DropShadower.cpp +408 -0
  1351. package/ios/juce_modules/juce_gui_basics/misc/juce_DropShadower.h +96 -0
  1352. package/ios/juce_modules/juce_gui_basics/misc/juce_FocusOutline.cpp +194 -0
  1353. package/ios/juce_modules/juce_gui_basics/misc/juce_FocusOutline.h +109 -0
  1354. package/ios/juce_modules/juce_gui_basics/mouse/juce_ComponentDragger.cpp +76 -0
  1355. package/ios/juce_modules/juce_gui_basics/mouse/juce_ComponentDragger.h +110 -0
  1356. package/ios/juce_modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp +646 -0
  1357. package/ios/juce_modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h +275 -0
  1358. package/ios/juce_modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h +149 -0
  1359. package/ios/juce_modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h +115 -0
  1360. package/ios/juce_modules/juce_gui_basics/mouse/juce_LassoComponent.h +233 -0
  1361. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseCursor.cpp +162 -0
  1362. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseCursor.h +199 -0
  1363. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseEvent.cpp +147 -0
  1364. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseEvent.h +463 -0
  1365. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.cpp +86 -0
  1366. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h +121 -0
  1367. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp +114 -0
  1368. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseInputSource.h +315 -0
  1369. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseListener.cpp +48 -0
  1370. package/ios/juce_modules/juce_gui_basics/mouse/juce_MouseListener.h +180 -0
  1371. package/ios/juce_modules/juce_gui_basics/mouse/juce_SelectedItemSet.h +336 -0
  1372. package/ios/juce_modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h +115 -0
  1373. package/ios/juce_modules/juce_gui_basics/mouse/juce_TooltipClient.h +98 -0
  1374. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_Accessibility.cpp +46 -0
  1375. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp +660 -0
  1376. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.h +89 -0
  1377. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm +283 -0
  1378. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h +311 -0
  1379. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp +164 -0
  1380. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_Accessibility_android.cpp +1058 -0
  1381. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_Accessibility_ios.mm +669 -0
  1382. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_Accessibility_mac.mm +942 -0
  1383. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp +336 -0
  1384. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h +92 -0
  1385. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h +162 -0
  1386. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h +160 -0
  1387. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAHelpers_windows.h +128 -0
  1388. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAInvokeProvider_windows.h +68 -0
  1389. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAProviderBase_windows.h +67 -0
  1390. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAProviders_windows.h +52 -0
  1391. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIARangeValueProvider_windows.h +146 -0
  1392. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIASelectionProvider_windows.h +254 -0
  1393. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIATextProvider_windows.h +626 -0
  1394. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAToggleProvider_windows.h +87 -0
  1395. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIATransformProvider_windows.h +131 -0
  1396. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAValueProvider_windows.h +92 -0
  1397. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_UIAWindowProvider_windows.h +203 -0
  1398. package/ios/juce_modules/juce_gui_basics/native/accessibility/juce_WindowsUIAWrapper_windows.h +169 -0
  1399. package/ios/juce_modules/juce_gui_basics/native/java/app/com/rmsl/juce/ComponentPeerView.java +987 -0
  1400. package/ios/juce_modules/juce_gui_basics/native/java/app/com/rmsl/juce/JuceContentProviderCursor.java +62 -0
  1401. package/ios/juce_modules/juce_gui_basics/native/java/app/com/rmsl/juce/JuceContentProviderFileObserver.java +57 -0
  1402. package/ios/juce_modules/juce_gui_basics/native/javaopt/app/com/rmsl/juce/JuceActivity.java +63 -0
  1403. package/ios/juce_modules/juce_gui_basics/native/javaopt/app/com/rmsl/juce/JuceSharingContentProvider.java +128 -0
  1404. package/ios/juce_modules/juce_gui_basics/native/javaopt/app/com/rmsl/juce/Receiver.java +51 -0
  1405. package/ios/juce_modules/juce_gui_basics/native/juce_CGMetalLayerRenderer_mac.h +384 -0
  1406. package/ios/juce_modules/juce_gui_basics/native/juce_ContentSharer_android.cpp +963 -0
  1407. package/ios/juce_modules/juce_gui_basics/native/juce_ContentSharer_ios.cpp +134 -0
  1408. package/ios/juce_modules/juce_gui_basics/native/juce_DragAndDrop_linux.cpp +618 -0
  1409. package/ios/juce_modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp +377 -0
  1410. package/ios/juce_modules/juce_gui_basics/native/juce_FileChooser_android.cpp +276 -0
  1411. package/ios/juce_modules/juce_gui_basics/native/juce_FileChooser_ios.mm +379 -0
  1412. package/ios/juce_modules/juce_gui_basics/native/juce_FileChooser_linux.cpp +296 -0
  1413. package/ios/juce_modules/juce_gui_basics/native/juce_FileChooser_mac.mm +414 -0
  1414. package/ios/juce_modules/juce_gui_basics/native/juce_FileChooser_windows.cpp +908 -0
  1415. package/ios/juce_modules/juce_gui_basics/native/juce_MainMenu_mac.mm +848 -0
  1416. package/ios/juce_modules/juce_gui_basics/native/juce_MouseCursor_mac.mm +205 -0
  1417. package/ios/juce_modules/juce_gui_basics/native/juce_MultiTouchMapper.h +116 -0
  1418. package/ios/juce_modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +3053 -0
  1419. package/ios/juce_modules/juce_gui_basics/native/juce_NativeMessageBox_android.cpp +124 -0
  1420. package/ios/juce_modules/juce_gui_basics/native/juce_NativeMessageBox_ios.mm +119 -0
  1421. package/ios/juce_modules/juce_gui_basics/native/juce_NativeMessageBox_linux.cpp +78 -0
  1422. package/ios/juce_modules/juce_gui_basics/native/juce_NativeMessageBox_mac.mm +140 -0
  1423. package/ios/juce_modules/juce_gui_basics/native/juce_NativeMessageBox_windows.cpp +354 -0
  1424. package/ios/juce_modules/juce_gui_basics/native/juce_NativeModalWrapperComponent_ios.h +141 -0
  1425. package/ios/juce_modules/juce_gui_basics/native/juce_PerScreenDisplayLinks_mac.h +313 -0
  1426. package/ios/juce_modules/juce_gui_basics/native/juce_ScopedDPIAwarenessDisabler.cpp +43 -0
  1427. package/ios/juce_modules/juce_gui_basics/native/juce_ScopedDPIAwarenessDisabler.h +63 -0
  1428. package/ios/juce_modules/juce_gui_basics/native/juce_ScopedThreadDPIAwarenessSetter_windows.h +52 -0
  1429. package/ios/juce_modules/juce_gui_basics/native/juce_ScopedWindowAssociation_linux.h +127 -0
  1430. package/ios/juce_modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +2376 -0
  1431. package/ios/juce_modules/juce_gui_basics/native/juce_VBlank_windows.cpp +302 -0
  1432. package/ios/juce_modules/juce_gui_basics/native/juce_WindowUtils_android.cpp +43 -0
  1433. package/ios/juce_modules/juce_gui_basics/native/juce_WindowUtils_ios.mm +43 -0
  1434. package/ios/juce_modules/juce_gui_basics/native/juce_WindowUtils_linux.cpp +48 -0
  1435. package/ios/juce_modules/juce_gui_basics/native/juce_WindowUtils_mac.mm +47 -0
  1436. package/ios/juce_modules/juce_gui_basics/native/juce_WindowUtils_windows.cpp +68 -0
  1437. package/ios/juce_modules/juce_gui_basics/native/juce_Windowing_android.cpp +2903 -0
  1438. package/ios/juce_modules/juce_gui_basics/native/juce_Windowing_ios.mm +629 -0
  1439. package/ios/juce_modules/juce_gui_basics/native/juce_Windowing_linux.cpp +863 -0
  1440. package/ios/juce_modules/juce_gui_basics/native/juce_Windowing_mac.mm +588 -0
  1441. package/ios/juce_modules/juce_gui_basics/native/juce_Windowing_windows.cpp +5549 -0
  1442. package/ios/juce_modules/juce_gui_basics/native/juce_WindowsHooks_windows.cpp +118 -0
  1443. package/ios/juce_modules/juce_gui_basics/native/juce_WindowsHooks_windows.h +55 -0
  1444. package/ios/juce_modules/juce_gui_basics/native/juce_XSymbols_linux.cpp +249 -0
  1445. package/ios/juce_modules/juce_gui_basics/native/juce_XSymbols_linux.h +629 -0
  1446. package/ios/juce_modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp +4036 -0
  1447. package/ios/juce_modules/juce_gui_basics/native/juce_XWindowSystem_linux.h +364 -0
  1448. package/ios/juce_modules/juce_gui_basics/positioning/juce_MarkerList.cpp +293 -0
  1449. package/ios/juce_modules/juce_gui_basics/positioning/juce_MarkerList.h +204 -0
  1450. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeCoordinate.cpp +162 -0
  1451. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h +190 -0
  1452. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +344 -0
  1453. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h +99 -0
  1454. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp +149 -0
  1455. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeParallelogram.h +75 -0
  1456. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativePoint.cpp +110 -0
  1457. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativePoint.h +100 -0
  1458. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp +271 -0
  1459. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativePointPath.h +202 -0
  1460. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp +286 -0
  1461. package/ios/juce_modules/juce_gui_basics/positioning/juce_RelativeRectangle.h +117 -0
  1462. package/ios/juce_modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp +95 -0
  1463. package/ios/juce_modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h +118 -0
  1464. package/ios/juce_modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.cpp +55 -0
  1465. package/ios/juce_modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h +85 -0
  1466. package/ios/juce_modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp +284 -0
  1467. package/ios/juce_modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h +162 -0
  1468. package/ios/juce_modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp +367 -0
  1469. package/ios/juce_modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.h +150 -0
  1470. package/ios/juce_modules/juce_gui_basics/properties/juce_PropertyComponent.cpp +65 -0
  1471. package/ios/juce_modules/juce_gui_basics/properties/juce_PropertyComponent.h +154 -0
  1472. package/ios/juce_modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +405 -0
  1473. package/ios/juce_modules/juce_gui_basics/properties/juce_PropertyPanel.h +186 -0
  1474. package/ios/juce_modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp +95 -0
  1475. package/ios/juce_modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h +116 -0
  1476. package/ios/juce_modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp +271 -0
  1477. package/ios/juce_modules/juce_gui_basics/properties/juce_TextPropertyComponent.h +196 -0
  1478. package/ios/juce_modules/juce_gui_basics/widgets/juce_ComboBox.cpp +721 -0
  1479. package/ios/juce_modules/juce_gui_basics/widgets/juce_ComboBox.h +473 -0
  1480. package/ios/juce_modules/juce_gui_basics/widgets/juce_ImageComponent.cpp +116 -0
  1481. package/ios/juce_modules/juce_gui_basics/widgets/juce_ImageComponent.h +90 -0
  1482. package/ios/juce_modules/juce_gui_basics/widgets/juce_Label.cpp +592 -0
  1483. package/ios/juce_modules/juce_gui_basics/widgets/juce_Label.h +377 -0
  1484. package/ios/juce_modules/juce_gui_basics/widgets/juce_ListBox.cpp +1263 -0
  1485. package/ios/juce_modules/juce_gui_basics/widgets/juce_ListBox.h +656 -0
  1486. package/ios/juce_modules/juce_gui_basics/widgets/juce_ProgressBar.cpp +189 -0
  1487. package/ios/juce_modules/juce_gui_basics/widgets/juce_ProgressBar.h +215 -0
  1488. package/ios/juce_modules/juce_gui_basics/widgets/juce_Slider.cpp +1839 -0
  1489. package/ios/juce_modules/juce_gui_basics/widgets/juce_Slider.h +1048 -0
  1490. package/ios/juce_modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp +935 -0
  1491. package/ios/juce_modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h +472 -0
  1492. package/ios/juce_modules/juce_gui_basics/widgets/juce_TableListBox.cpp +688 -0
  1493. package/ios/juce_modules/juce_gui_basics/widgets/juce_TableListBox.h +365 -0
  1494. package/ios/juce_modules/juce_gui_basics/widgets/juce_TextEditor.cpp +2786 -0
  1495. package/ios/juce_modules/juce_gui_basics/widgets/juce_TextEditor.h +888 -0
  1496. package/ios/juce_modules/juce_gui_basics/widgets/juce_Toolbar.cpp +838 -0
  1497. package/ios/juce_modules/juce_gui_basics/widgets/juce_Toolbar.h +347 -0
  1498. package/ios/juce_modules/juce_gui_basics/widgets/juce_ToolbarItemComponent.cpp +173 -0
  1499. package/ios/juce_modules/juce_gui_basics/widgets/juce_ToolbarItemComponent.h +217 -0
  1500. package/ios/juce_modules/juce_gui_basics/widgets/juce_ToolbarItemFactory.h +118 -0
  1501. package/ios/juce_modules/juce_gui_basics/widgets/juce_ToolbarItemPalette.cpp +125 -0
  1502. package/ios/juce_modules/juce_gui_basics/widgets/juce_ToolbarItemPalette.h +88 -0
  1503. package/ios/juce_modules/juce_gui_basics/widgets/juce_TreeView.cpp +2286 -0
  1504. package/ios/juce_modules/juce_gui_basics/widgets/juce_TreeView.h +969 -0
  1505. package/ios/juce_modules/juce_gui_basics/windows/juce_AlertWindow.cpp +712 -0
  1506. package/ios/juce_modules/juce_gui_basics/windows/juce_AlertWindow.h +600 -0
  1507. package/ios/juce_modules/juce_gui_basics/windows/juce_CallOutBox.cpp +279 -0
  1508. package/ios/juce_modules/juce_gui_basics/windows/juce_CallOutBox.h +197 -0
  1509. package/ios/juce_modules/juce_gui_basics/windows/juce_ComponentPeer.cpp +625 -0
  1510. package/ios/juce_modules/juce_gui_basics/windows/juce_ComponentPeer.h +623 -0
  1511. package/ios/juce_modules/juce_gui_basics/windows/juce_DialogWindow.cpp +190 -0
  1512. package/ios/juce_modules/juce_gui_basics/windows/juce_DialogWindow.h +286 -0
  1513. package/ios/juce_modules/juce_gui_basics/windows/juce_DocumentWindow.cpp +423 -0
  1514. package/ios/juce_modules/juce_gui_basics/windows/juce_DocumentWindow.h +316 -0
  1515. package/ios/juce_modules/juce_gui_basics/windows/juce_MessageBoxOptions.cpp +102 -0
  1516. package/ios/juce_modules/juce_gui_basics/windows/juce_MessageBoxOptions.h +202 -0
  1517. package/ios/juce_modules/juce_gui_basics/windows/juce_NativeMessageBox.cpp +167 -0
  1518. package/ios/juce_modules/juce_gui_basics/windows/juce_NativeMessageBox.h +311 -0
  1519. package/ios/juce_modules/juce_gui_basics/windows/juce_NativeScaleFactorNotifier.cpp +75 -0
  1520. package/ios/juce_modules/juce_gui_basics/windows/juce_NativeScaleFactorNotifier.h +78 -0
  1521. package/ios/juce_modules/juce_gui_basics/windows/juce_ResizableWindow.cpp +679 -0
  1522. package/ios/juce_modules/juce_gui_basics/windows/juce_ResizableWindow.h +427 -0
  1523. package/ios/juce_modules/juce_gui_basics/windows/juce_ScopedMessageBox.cpp +67 -0
  1524. package/ios/juce_modules/juce_gui_basics/windows/juce_ScopedMessageBox.h +78 -0
  1525. package/ios/juce_modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp +128 -0
  1526. package/ios/juce_modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h +184 -0
  1527. package/ios/juce_modules/juce_gui_basics/windows/juce_TooltipWindow.cpp +264 -0
  1528. package/ios/juce_modules/juce_gui_basics/windows/juce_TooltipWindow.h +169 -0
  1529. package/ios/juce_modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp +264 -0
  1530. package/ios/juce_modules/juce_gui_basics/windows/juce_TopLevelWindow.h +176 -0
  1531. package/ios/juce_modules/juce_gui_basics/windows/juce_VBlankAttachment.cpp +122 -0
  1532. package/ios/juce_modules/juce_gui_basics/windows/juce_VBlankAttachment.h +85 -0
  1533. package/ios/juce_modules/juce_gui_basics/windows/juce_WindowUtils.h +51 -0
  1534. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.cpp +83 -0
  1535. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniser.h +81 -0
  1536. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h +683 -0
  1537. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp +1306 -0
  1538. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CodeDocument.h +459 -0
  1539. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp +1857 -0
  1540. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h +486 -0
  1541. package/ios/juce_modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h +68 -0
  1542. package/ios/juce_modules/juce_gui_extra/code_editor/juce_LuaCodeTokeniser.cpp +248 -0
  1543. package/ios/juce_modules/juce_gui_extra/code_editor/juce_LuaCodeTokeniser.h +74 -0
  1544. package/ios/juce_modules/juce_gui_extra/code_editor/juce_XMLCodeTokeniser.cpp +181 -0
  1545. package/ios/juce_modules/juce_gui_extra/code_editor/juce_XMLCodeTokeniser.h +72 -0
  1546. package/ios/juce_modules/juce_gui_extra/detail/juce_WebControlRelayEvents.h +255 -0
  1547. package/ios/juce_modules/juce_gui_extra/documents/juce_FileBasedDocument.cpp +1124 -0
  1548. package/ios/juce_modules/juce_gui_extra/documents/juce_FileBasedDocument.h +440 -0
  1549. package/ios/juce_modules/juce_gui_extra/embedding/juce_ActiveXControlComponent.h +142 -0
  1550. package/ios/juce_modules/juce_gui_extra/embedding/juce_AndroidViewComponent.h +91 -0
  1551. package/ios/juce_modules/juce_gui_extra/embedding/juce_HWNDComponent.h +98 -0
  1552. package/ios/juce_modules/juce_gui_extra/embedding/juce_NSViewComponent.h +107 -0
  1553. package/ios/juce_modules/juce_gui_extra/embedding/juce_UIViewComponent.h +99 -0
  1554. package/ios/juce_modules/juce_gui_extra/embedding/juce_XEmbedComponent.h +129 -0
  1555. package/ios/juce_modules/juce_gui_extra/juce_gui_extra.cpp +210 -0
  1556. package/ios/juce_modules/juce_gui_extra/juce_gui_extra.h +161 -0
  1557. package/ios/juce_modules/juce_gui_extra/juce_gui_extra.mm +35 -0
  1558. package/ios/juce_modules/juce_gui_extra/misc/juce_AnimatedAppComponent.cpp +89 -0
  1559. package/ios/juce_modules/juce_gui_extra/misc/juce_AnimatedAppComponent.h +96 -0
  1560. package/ios/juce_modules/juce_gui_extra/misc/juce_AppleRemote.h +126 -0
  1561. package/ios/juce_modules/juce_gui_extra/misc/juce_BubbleMessageComponent.cpp +133 -0
  1562. package/ios/juce_modules/juce_gui_extra/misc/juce_BubbleMessageComponent.h +134 -0
  1563. package/ios/juce_modules/juce_gui_extra/misc/juce_ColourSelector.cpp +656 -0
  1564. package/ios/juce_modules/juce_gui_extra/misc/juce_ColourSelector.h +173 -0
  1565. package/ios/juce_modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp +486 -0
  1566. package/ios/juce_modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.h +142 -0
  1567. package/ios/juce_modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +501 -0
  1568. package/ios/juce_modules/juce_gui_extra/misc/juce_LiveConstantEditor.h +310 -0
  1569. package/ios/juce_modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp +165 -0
  1570. package/ios/juce_modules/juce_gui_extra/misc/juce_PreferencesPanel.h +156 -0
  1571. package/ios/juce_modules/juce_gui_extra/misc/juce_PushNotifications.cpp +239 -0
  1572. package/ios/juce_modules/juce_gui_extra/misc/juce_PushNotifications.h +714 -0
  1573. package/ios/juce_modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp +189 -0
  1574. package/ios/juce_modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h +186 -0
  1575. package/ios/juce_modules/juce_gui_extra/misc/juce_SplashScreen.cpp +110 -0
  1576. package/ios/juce_modules/juce_gui_extra/misc/juce_SplashScreen.h +165 -0
  1577. package/ios/juce_modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.cpp +51 -0
  1578. package/ios/juce_modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h +125 -0
  1579. package/ios/juce_modules/juce_gui_extra/misc/juce_WebBrowserComponent.cpp +722 -0
  1580. package/ios/juce_modules/juce_gui_extra/misc/juce_WebBrowserComponent.h +626 -0
  1581. package/ios/juce_modules/juce_gui_extra/misc/juce_WebControlParameterIndexReceiver.h +76 -0
  1582. package/ios/juce_modules/juce_gui_extra/misc/juce_WebControlRelays.cpp +256 -0
  1583. package/ios/juce_modules/juce_gui_extra/misc/juce_WebControlRelays.h +254 -0
  1584. package/ios/juce_modules/juce_gui_extra/native/java/app/com/rmsl/juce/JuceWebViewClasses.java +356 -0
  1585. package/ios/juce_modules/juce_gui_extra/native/javaopt/app/com/rmsl/juce/JuceFirebaseInstanceIdService.java +50 -0
  1586. package/ios/juce_modules/juce_gui_extra/native/javaopt/app/com/rmsl/juce/JuceFirebaseMessagingService.java +69 -0
  1587. package/ios/juce_modules/juce_gui_extra/native/javascript/check_native_interop.js +146 -0
  1588. package/ios/juce_modules/juce_gui_extra/native/javascript/index.js +577 -0
  1589. package/ios/juce_modules/juce_gui_extra/native/javascript/package.json +4 -0
  1590. package/ios/juce_modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp +553 -0
  1591. package/ios/juce_modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp +199 -0
  1592. package/ios/juce_modules/juce_gui_extra/native/juce_AppleRemote_mac.mm +285 -0
  1593. package/ios/juce_modules/juce_gui_extra/native/juce_HWNDComponent_windows.cpp +203 -0
  1594. package/ios/juce_modules/juce_gui_extra/native/juce_NSViewComponent_mac.mm +203 -0
  1595. package/ios/juce_modules/juce_gui_extra/native/juce_NSViewFrameWatcher_mac.h +120 -0
  1596. package/ios/juce_modules/juce_gui_extra/native/juce_PushNotifications_android.cpp +1607 -0
  1597. package/ios/juce_modules/juce_gui_extra/native/juce_PushNotifications_ios.cpp +620 -0
  1598. package/ios/juce_modules/juce_gui_extra/native/juce_PushNotifications_mac.cpp +535 -0
  1599. package/ios/juce_modules/juce_gui_extra/native/juce_SystemTrayIcon_linux.cpp +160 -0
  1600. package/ios/juce_modules/juce_gui_extra/native/juce_SystemTrayIcon_mac.cpp +451 -0
  1601. package/ios/juce_modules/juce_gui_extra/native/juce_SystemTrayIcon_windows.cpp +251 -0
  1602. package/ios/juce_modules/juce_gui_extra/native/juce_UIViewComponent_ios.mm +151 -0
  1603. package/ios/juce_modules/juce_gui_extra/native/juce_WebBrowserComponent_android.cpp +953 -0
  1604. package/ios/juce_modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp +1659 -0
  1605. package/ios/juce_modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm +1113 -0
  1606. package/ios/juce_modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp +1298 -0
  1607. package/ios/juce_modules/juce_gui_extra/native/juce_XEmbedComponent_linux.cpp +739 -0
  1608. package/package.json +1 -1
  1609. package/ios/JuceModules.mm +0 -14
  1610. package/ios/JuceToneGenerator.h +0 -39
  1611. package/ios/JuceToneGenerator.mm +0 -613
@@ -0,0 +1,4887 @@
1
+ /*
2
+ * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
3
+ * Copyright © 2010,2012 Google, Inc.
4
+ *
5
+ * This is part of HarfBuzz, a text shaping library.
6
+ *
7
+ * Permission is hereby granted, without written agreement and without
8
+ * license or royalty fees, to use, copy, modify, and distribute this
9
+ * software and its documentation for any purpose, provided that the
10
+ * above copyright notice and the following two paragraphs appear in
11
+ * all copies of this software.
12
+ *
13
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17
+ * DAMAGE.
18
+ *
19
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24
+ *
25
+ * Red Hat Author(s): Behdad Esfahbod
26
+ * Google Author(s): Behdad Esfahbod
27
+ */
28
+
29
+ #ifndef HB_OT_LAYOUT_GSUBGPOS_HH
30
+ #define HB_OT_LAYOUT_GSUBGPOS_HH
31
+
32
+ #include "hb.hh"
33
+ #include "hb-buffer.hh"
34
+ #include "hb-map.hh"
35
+ #include "hb-set.hh"
36
+ #include "hb-ot-map.hh"
37
+ #include "hb-ot-layout-common.hh"
38
+ #include "hb-ot-layout-gdef-table.hh"
39
+
40
+
41
+ namespace OT {
42
+
43
+
44
+ struct hb_intersects_context_t :
45
+ hb_dispatch_context_t<hb_intersects_context_t, bool>
46
+ {
47
+ template <typename T>
48
+ return_t dispatch (const T &obj) { return obj.intersects (this->glyphs); }
49
+ static return_t default_return_value () { return false; }
50
+ bool stop_sublookup_iteration (return_t r) const { return r; }
51
+
52
+ const hb_set_t *glyphs;
53
+
54
+ hb_intersects_context_t (const hb_set_t *glyphs_) :
55
+ glyphs (glyphs_) {}
56
+ };
57
+
58
+ struct hb_have_non_1to1_context_t :
59
+ hb_dispatch_context_t<hb_have_non_1to1_context_t, bool>
60
+ {
61
+ template <typename T>
62
+ return_t dispatch (const T &obj) { return obj.may_have_non_1to1 (); }
63
+ static return_t default_return_value () { return false; }
64
+ bool stop_sublookup_iteration (return_t r) const { return r; }
65
+ };
66
+
67
+ struct hb_closure_context_t :
68
+ hb_dispatch_context_t<hb_closure_context_t>
69
+ {
70
+ typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indicies, unsigned seq_index, unsigned end_index);
71
+ template <typename T>
72
+ return_t dispatch (const T &obj) { obj.closure (this); return hb_empty_t (); }
73
+ static return_t default_return_value () { return hb_empty_t (); }
74
+ void recurse (unsigned lookup_index, hb_set_t *covered_seq_indicies, unsigned seq_index, unsigned end_index)
75
+ {
76
+ if (unlikely (nesting_level_left == 0 || !recurse_func))
77
+ return;
78
+
79
+ nesting_level_left--;
80
+ recurse_func (this, lookup_index, covered_seq_indicies, seq_index, end_index);
81
+ nesting_level_left++;
82
+ }
83
+
84
+ void reset_lookup_visit_count ()
85
+ { lookup_count = 0; }
86
+
87
+ bool lookup_limit_exceeded ()
88
+ { return lookup_count > HB_MAX_LOOKUP_VISIT_COUNT; }
89
+
90
+ bool should_visit_lookup (unsigned int lookup_index)
91
+ {
92
+ if (lookup_count++ > HB_MAX_LOOKUP_VISIT_COUNT)
93
+ return false;
94
+
95
+ if (is_lookup_done (lookup_index))
96
+ return false;
97
+
98
+ return true;
99
+ }
100
+
101
+ bool is_lookup_done (unsigned int lookup_index)
102
+ {
103
+ if (unlikely (done_lookups_glyph_count->in_error () ||
104
+ done_lookups_glyph_set->in_error ()))
105
+ return true;
106
+
107
+ /* Have we visited this lookup with the current set of glyphs? */
108
+ if (done_lookups_glyph_count->get (lookup_index) != glyphs->get_population ())
109
+ {
110
+ done_lookups_glyph_count->set (lookup_index, glyphs->get_population ());
111
+
112
+ if (!done_lookups_glyph_set->has (lookup_index))
113
+ {
114
+ if (unlikely (!done_lookups_glyph_set->set (lookup_index, hb::unique_ptr<hb_set_t> {hb_set_create ()})))
115
+ return true;
116
+ }
117
+
118
+ done_lookups_glyph_set->get (lookup_index)->clear ();
119
+ }
120
+
121
+ hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index);
122
+ if (unlikely (covered_glyph_set->in_error ()))
123
+ return true;
124
+ if (parent_active_glyphs ().is_subset (*covered_glyph_set))
125
+ return true;
126
+
127
+ covered_glyph_set->union_ (parent_active_glyphs ());
128
+ return false;
129
+ }
130
+
131
+ const hb_set_t& previous_parent_active_glyphs () {
132
+ if (active_glyphs_stack.length <= 1)
133
+ return *glyphs;
134
+
135
+ return active_glyphs_stack[active_glyphs_stack.length - 2];
136
+ }
137
+
138
+ const hb_set_t& parent_active_glyphs ()
139
+ {
140
+ if (!active_glyphs_stack)
141
+ return *glyphs;
142
+
143
+ return active_glyphs_stack.tail ();
144
+ }
145
+
146
+ hb_set_t* push_cur_active_glyphs ()
147
+ {
148
+ hb_set_t *s = active_glyphs_stack.push ();
149
+ if (unlikely (active_glyphs_stack.in_error ()))
150
+ return nullptr;
151
+ return s;
152
+ }
153
+
154
+ bool pop_cur_done_glyphs ()
155
+ {
156
+ if (!active_glyphs_stack)
157
+ return false;
158
+
159
+ active_glyphs_stack.pop ();
160
+ return true;
161
+ }
162
+
163
+ hb_face_t *face;
164
+ hb_set_t *glyphs;
165
+ hb_set_t output[1];
166
+ hb_vector_t<hb_set_t> active_glyphs_stack;
167
+ recurse_func_t recurse_func = nullptr;
168
+ unsigned int nesting_level_left;
169
+
170
+ hb_closure_context_t (hb_face_t *face_,
171
+ hb_set_t *glyphs_,
172
+ hb_map_t *done_lookups_glyph_count_,
173
+ hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *done_lookups_glyph_set_,
174
+ unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
175
+ face (face_),
176
+ glyphs (glyphs_),
177
+ nesting_level_left (nesting_level_left_),
178
+ done_lookups_glyph_count (done_lookups_glyph_count_),
179
+ done_lookups_glyph_set (done_lookups_glyph_set_)
180
+ {}
181
+
182
+ ~hb_closure_context_t () { flush (); }
183
+
184
+ void set_recurse_func (recurse_func_t func) { recurse_func = func; }
185
+
186
+ void flush ()
187
+ {
188
+ output->del_range (face->get_num_glyphs (), HB_SET_VALUE_INVALID); /* Remove invalid glyphs. */
189
+ glyphs->union_ (*output);
190
+ output->clear ();
191
+ active_glyphs_stack.pop ();
192
+ active_glyphs_stack.reset ();
193
+ }
194
+
195
+ private:
196
+ hb_map_t *done_lookups_glyph_count;
197
+ hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *done_lookups_glyph_set;
198
+ unsigned int lookup_count = 0;
199
+ };
200
+
201
+
202
+
203
+ struct hb_closure_lookups_context_t :
204
+ hb_dispatch_context_t<hb_closure_lookups_context_t>
205
+ {
206
+ typedef return_t (*recurse_func_t) (hb_closure_lookups_context_t *c, unsigned lookup_index);
207
+ template <typename T>
208
+ return_t dispatch (const T &obj) { obj.closure_lookups (this); return hb_empty_t (); }
209
+ static return_t default_return_value () { return hb_empty_t (); }
210
+ void recurse (unsigned lookup_index)
211
+ {
212
+ if (unlikely (nesting_level_left == 0 || !recurse_func))
213
+ return;
214
+
215
+ /* Return if new lookup was recursed to before. */
216
+ if (lookup_limit_exceeded ()
217
+ || visited_lookups->in_error ()
218
+ || visited_lookups->has (lookup_index))
219
+ // Don't increment lookup count here, that will be done in the call to closure_lookups()
220
+ // made by recurse_func.
221
+ return;
222
+
223
+ nesting_level_left--;
224
+ recurse_func (this, lookup_index);
225
+ nesting_level_left++;
226
+ }
227
+
228
+ void set_lookup_visited (unsigned lookup_index)
229
+ { visited_lookups->add (lookup_index); }
230
+
231
+ void set_lookup_inactive (unsigned lookup_index)
232
+ { inactive_lookups->add (lookup_index); }
233
+
234
+ bool lookup_limit_exceeded ()
235
+ {
236
+ bool ret = lookup_count > HB_MAX_LOOKUP_VISIT_COUNT;
237
+ if (ret)
238
+ DEBUG_MSG (SUBSET, nullptr, "lookup visit count limit exceeded in lookup closure!");
239
+ return ret; }
240
+
241
+ bool is_lookup_visited (unsigned lookup_index)
242
+ {
243
+ if (unlikely (lookup_count++ > HB_MAX_LOOKUP_VISIT_COUNT))
244
+ {
245
+ DEBUG_MSG (SUBSET, nullptr, "total visited lookup count %u exceeds max limit, lookup %u is dropped.",
246
+ lookup_count, lookup_index);
247
+ return true;
248
+ }
249
+
250
+ if (unlikely (visited_lookups->in_error ()))
251
+ return true;
252
+
253
+ return visited_lookups->has (lookup_index);
254
+ }
255
+
256
+ hb_face_t *face;
257
+ const hb_set_t *glyphs;
258
+ recurse_func_t recurse_func;
259
+ unsigned int nesting_level_left;
260
+
261
+ hb_closure_lookups_context_t (hb_face_t *face_,
262
+ const hb_set_t *glyphs_,
263
+ hb_set_t *visited_lookups_,
264
+ hb_set_t *inactive_lookups_,
265
+ unsigned nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
266
+ face (face_),
267
+ glyphs (glyphs_),
268
+ recurse_func (nullptr),
269
+ nesting_level_left (nesting_level_left_),
270
+ visited_lookups (visited_lookups_),
271
+ inactive_lookups (inactive_lookups_),
272
+ lookup_count (0) {}
273
+
274
+ void set_recurse_func (recurse_func_t func) { recurse_func = func; }
275
+
276
+ private:
277
+ hb_set_t *visited_lookups;
278
+ hb_set_t *inactive_lookups;
279
+ unsigned int lookup_count;
280
+ };
281
+
282
+ struct hb_would_apply_context_t :
283
+ hb_dispatch_context_t<hb_would_apply_context_t, bool>
284
+ {
285
+ template <typename T>
286
+ return_t dispatch (const T &obj) { return obj.would_apply (this); }
287
+ static return_t default_return_value () { return false; }
288
+ bool stop_sublookup_iteration (return_t r) const { return r; }
289
+
290
+ hb_face_t *face;
291
+ const hb_codepoint_t *glyphs;
292
+ unsigned int len;
293
+ bool zero_context;
294
+
295
+ hb_would_apply_context_t (hb_face_t *face_,
296
+ const hb_codepoint_t *glyphs_,
297
+ unsigned int len_,
298
+ bool zero_context_) :
299
+ face (face_),
300
+ glyphs (glyphs_),
301
+ len (len_),
302
+ zero_context (zero_context_) {}
303
+ };
304
+
305
+ struct hb_collect_glyphs_context_t :
306
+ hb_dispatch_context_t<hb_collect_glyphs_context_t>
307
+ {
308
+ typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index);
309
+ template <typename T>
310
+ return_t dispatch (const T &obj) { obj.collect_glyphs (this); return hb_empty_t (); }
311
+ static return_t default_return_value () { return hb_empty_t (); }
312
+ void recurse (unsigned int lookup_index)
313
+ {
314
+ if (unlikely (nesting_level_left == 0 || !recurse_func))
315
+ return;
316
+
317
+ /* Note that GPOS sets recurse_func to nullptr already, so it doesn't get
318
+ * past the previous check. For GSUB, we only want to collect the output
319
+ * glyphs in the recursion. If output is not requested, we can go home now.
320
+ *
321
+ * Note further, that the above is not exactly correct. A recursed lookup
322
+ * is allowed to match input that is not matched in the context, but that's
323
+ * not how most fonts are built. It's possible to relax that and recurse
324
+ * with all sets here if it proves to be an issue.
325
+ */
326
+
327
+ if (output == hb_set_get_empty ())
328
+ return;
329
+
330
+ /* Return if new lookup was recursed to before. */
331
+ if (recursed_lookups->has (lookup_index))
332
+ return;
333
+
334
+ hb_set_t *old_before = before;
335
+ hb_set_t *old_input = input;
336
+ hb_set_t *old_after = after;
337
+ before = input = after = hb_set_get_empty ();
338
+
339
+ nesting_level_left--;
340
+ recurse_func (this, lookup_index);
341
+ nesting_level_left++;
342
+
343
+ before = old_before;
344
+ input = old_input;
345
+ after = old_after;
346
+
347
+ recursed_lookups->add (lookup_index);
348
+ }
349
+
350
+ hb_face_t *face;
351
+ hb_set_t *before;
352
+ hb_set_t *input;
353
+ hb_set_t *after;
354
+ hb_set_t *output;
355
+ recurse_func_t recurse_func;
356
+ hb_set_t *recursed_lookups;
357
+ unsigned int nesting_level_left;
358
+
359
+ hb_collect_glyphs_context_t (hb_face_t *face_,
360
+ hb_set_t *glyphs_before, /* OUT. May be NULL */
361
+ hb_set_t *glyphs_input, /* OUT. May be NULL */
362
+ hb_set_t *glyphs_after, /* OUT. May be NULL */
363
+ hb_set_t *glyphs_output, /* OUT. May be NULL */
364
+ unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
365
+ face (face_),
366
+ before (glyphs_before ? glyphs_before : hb_set_get_empty ()),
367
+ input (glyphs_input ? glyphs_input : hb_set_get_empty ()),
368
+ after (glyphs_after ? glyphs_after : hb_set_get_empty ()),
369
+ output (glyphs_output ? glyphs_output : hb_set_get_empty ()),
370
+ recurse_func (nullptr),
371
+ recursed_lookups (hb_set_create ()),
372
+ nesting_level_left (nesting_level_left_) {}
373
+ ~hb_collect_glyphs_context_t () { hb_set_destroy (recursed_lookups); }
374
+
375
+ void set_recurse_func (recurse_func_t func) { recurse_func = func; }
376
+ };
377
+
378
+
379
+
380
+ template <typename set_t>
381
+ struct hb_collect_coverage_context_t :
382
+ hb_dispatch_context_t<hb_collect_coverage_context_t<set_t>, const Coverage &>
383
+ {
384
+ typedef const Coverage &return_t; // Stoopid that we have to dupe this here.
385
+ template <typename T>
386
+ return_t dispatch (const T &obj) { return obj.get_coverage (); }
387
+ static return_t default_return_value () { return Null (Coverage); }
388
+ bool stop_sublookup_iteration (return_t r) const
389
+ {
390
+ r.collect_coverage (set);
391
+ return false;
392
+ }
393
+
394
+ hb_collect_coverage_context_t (set_t *set_) :
395
+ set (set_) {}
396
+
397
+ set_t *set;
398
+ };
399
+
400
+ struct hb_ot_apply_context_t :
401
+ hb_dispatch_context_t<hb_ot_apply_context_t, bool, HB_DEBUG_APPLY>
402
+ {
403
+ struct matcher_t
404
+ {
405
+ typedef bool (*match_func_t) (hb_glyph_info_t &info, unsigned value, const void *data);
406
+
407
+ void set_ignore_zwnj (bool ignore_zwnj_) { ignore_zwnj = ignore_zwnj_; }
408
+ void set_ignore_zwj (bool ignore_zwj_) { ignore_zwj = ignore_zwj_; }
409
+ void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; }
410
+ void set_mask (hb_mask_t mask_) { mask = mask_; }
411
+ void set_per_syllable (bool per_syllable_) { per_syllable = per_syllable_; }
412
+ void set_syllable (uint8_t syllable_) { syllable = per_syllable ? syllable_ : 0; }
413
+ void set_match_func (match_func_t match_func_,
414
+ const void *match_data_)
415
+ { match_func = match_func_; match_data = match_data_; }
416
+
417
+ enum may_match_t {
418
+ MATCH_NO,
419
+ MATCH_YES,
420
+ MATCH_MAYBE
421
+ };
422
+
423
+ #ifndef HB_OPTIMIZE_SIZE
424
+ HB_ALWAYS_INLINE
425
+ #endif
426
+ may_match_t may_match (hb_glyph_info_t &info,
427
+ hb_codepoint_t glyph_data) const
428
+ {
429
+ if (!(info.mask & mask) ||
430
+ (syllable && syllable != info.syllable ()))
431
+ return MATCH_NO;
432
+
433
+ if (match_func)
434
+ return match_func (info, glyph_data, match_data) ? MATCH_YES : MATCH_NO;
435
+
436
+ return MATCH_MAYBE;
437
+ }
438
+
439
+ enum may_skip_t {
440
+ SKIP_NO,
441
+ SKIP_YES,
442
+ SKIP_MAYBE
443
+ };
444
+
445
+ #ifndef HB_OPTIMIZE_SIZE
446
+ HB_ALWAYS_INLINE
447
+ #endif
448
+ may_skip_t may_skip (const hb_ot_apply_context_t *c,
449
+ const hb_glyph_info_t &info) const
450
+ {
451
+ if (!c->check_glyph_property (&info, lookup_props))
452
+ return SKIP_YES;
453
+
454
+ if (unlikely (_hb_glyph_info_is_default_ignorable_and_not_hidden (&info) &&
455
+ (ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) &&
456
+ (ignore_zwj || !_hb_glyph_info_is_zwj (&info))))
457
+ return SKIP_MAYBE;
458
+
459
+ return SKIP_NO;
460
+ }
461
+
462
+ protected:
463
+ unsigned int lookup_props = 0;
464
+ hb_mask_t mask = -1;
465
+ bool ignore_zwnj = false;
466
+ bool ignore_zwj = false;
467
+ bool per_syllable = false;
468
+ uint8_t syllable = 0;
469
+ match_func_t match_func = nullptr;
470
+ const void *match_data = nullptr;
471
+ };
472
+
473
+ struct skipping_iterator_t
474
+ {
475
+ void init (hb_ot_apply_context_t *c_, bool context_match = false)
476
+ {
477
+ c = c_;
478
+ end = c->buffer->len;
479
+ match_glyph_data16 = nullptr;
480
+ #ifndef HB_NO_BEYOND_64K
481
+ match_glyph_data24 = nullptr;
482
+ #endif
483
+ matcher.set_match_func (nullptr, nullptr);
484
+ matcher.set_lookup_props (c->lookup_props);
485
+ /* Ignore ZWNJ if we are matching GPOS, or matching GSUB context and asked to. */
486
+ matcher.set_ignore_zwnj (c->table_index == 1 || (context_match && c->auto_zwnj));
487
+ /* Ignore ZWJ if we are matching context, or asked to. */
488
+ matcher.set_ignore_zwj (context_match || c->auto_zwj);
489
+ matcher.set_mask (context_match ? -1 : c->lookup_mask);
490
+ /* Per syllable matching is only for GSUB. */
491
+ matcher.set_per_syllable (c->table_index == 0 && c->per_syllable);
492
+ matcher.set_syllable (0);
493
+ }
494
+ void set_lookup_props (unsigned int lookup_props)
495
+ {
496
+ matcher.set_lookup_props (lookup_props);
497
+ }
498
+ void set_match_func (matcher_t::match_func_t match_func_,
499
+ const void *match_data_)
500
+ {
501
+ matcher.set_match_func (match_func_, match_data_);
502
+ }
503
+ void set_glyph_data (const HBUINT16 glyph_data[])
504
+ {
505
+ match_glyph_data16 = glyph_data;
506
+ #ifndef HB_NO_BEYOND_64K
507
+ match_glyph_data24 = nullptr;
508
+ #endif
509
+ }
510
+ #ifndef HB_NO_BEYOND_64K
511
+ void set_glyph_data (const HBUINT24 glyph_data[])
512
+ {
513
+ match_glyph_data16 = nullptr;
514
+ match_glyph_data24 = glyph_data;
515
+ }
516
+ #endif
517
+
518
+ #ifndef HB_OPTIMIZE_SIZE
519
+ HB_ALWAYS_INLINE
520
+ #endif
521
+ void reset (unsigned int start_index_)
522
+ {
523
+ idx = start_index_;
524
+ end = c->buffer->len;
525
+ matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
526
+ }
527
+
528
+ #ifndef HB_OPTIMIZE_SIZE
529
+ HB_ALWAYS_INLINE
530
+ #endif
531
+ void reset_fast (unsigned int start_index_)
532
+ {
533
+ // Doesn't set end or syllable. Used by GPOS which doesn't care / change.
534
+ idx = start_index_;
535
+ }
536
+
537
+ void reject ()
538
+ {
539
+ backup_glyph_data ();
540
+ }
541
+
542
+ matcher_t::may_skip_t
543
+ #ifndef HB_OPTIMIZE_SIZE
544
+ HB_ALWAYS_INLINE
545
+ #endif
546
+ may_skip (const hb_glyph_info_t &info) const
547
+ { return matcher.may_skip (c, info); }
548
+
549
+ enum match_t {
550
+ MATCH,
551
+ NOT_MATCH,
552
+ SKIP
553
+ };
554
+
555
+ #ifndef HB_OPTIMIZE_SIZE
556
+ HB_ALWAYS_INLINE
557
+ #endif
558
+ match_t match (hb_glyph_info_t &info)
559
+ {
560
+ matcher_t::may_skip_t skip = matcher.may_skip (c, info);
561
+ if (unlikely (skip == matcher_t::SKIP_YES))
562
+ return SKIP;
563
+
564
+ matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ());
565
+ if (match == matcher_t::MATCH_YES ||
566
+ (match == matcher_t::MATCH_MAYBE &&
567
+ skip == matcher_t::SKIP_NO))
568
+ return MATCH;
569
+
570
+ if (skip == matcher_t::SKIP_NO)
571
+ return NOT_MATCH;
572
+
573
+ return SKIP;
574
+ }
575
+
576
+ #ifndef HB_OPTIMIZE_SIZE
577
+ HB_ALWAYS_INLINE
578
+ #endif
579
+ bool next (unsigned *unsafe_to = nullptr)
580
+ {
581
+ const signed stop = (signed) end - 1;
582
+ while ((signed) idx < stop)
583
+ {
584
+ idx++;
585
+ switch (match (c->buffer->info[idx]))
586
+ {
587
+ case MATCH:
588
+ {
589
+ advance_glyph_data ();
590
+ return true;
591
+ }
592
+ case NOT_MATCH:
593
+ {
594
+ if (unsafe_to)
595
+ *unsafe_to = idx + 1;
596
+ return false;
597
+ }
598
+ case SKIP:
599
+ continue;
600
+ }
601
+ }
602
+ if (unsafe_to)
603
+ *unsafe_to = end;
604
+ return false;
605
+ }
606
+ #ifndef HB_OPTIMIZE_SIZE
607
+ HB_ALWAYS_INLINE
608
+ #endif
609
+ bool prev (unsigned *unsafe_from = nullptr)
610
+ {
611
+ const unsigned stop = 0;
612
+ while (idx > stop)
613
+ {
614
+ idx--;
615
+ switch (match (c->buffer->out_info[idx]))
616
+ {
617
+ case MATCH:
618
+ {
619
+ advance_glyph_data ();
620
+ return true;
621
+ }
622
+ case NOT_MATCH:
623
+ {
624
+ if (unsafe_from)
625
+ *unsafe_from = hb_max (1u, idx) - 1u;
626
+ return false;
627
+ }
628
+ case SKIP:
629
+ continue;
630
+ }
631
+ }
632
+ if (unsafe_from)
633
+ *unsafe_from = 0;
634
+ return false;
635
+ }
636
+
637
+ HB_ALWAYS_INLINE
638
+ hb_codepoint_t
639
+ get_glyph_data ()
640
+ {
641
+ if (match_glyph_data16) return *match_glyph_data16;
642
+ #ifndef HB_NO_BEYOND_64K
643
+ else
644
+ if (match_glyph_data24) return *match_glyph_data24;
645
+ #endif
646
+ return 0;
647
+ }
648
+ HB_ALWAYS_INLINE
649
+ void
650
+ advance_glyph_data ()
651
+ {
652
+ if (match_glyph_data16) match_glyph_data16++;
653
+ #ifndef HB_NO_BEYOND_64K
654
+ else
655
+ if (match_glyph_data24) match_glyph_data24++;
656
+ #endif
657
+ }
658
+ void
659
+ backup_glyph_data ()
660
+ {
661
+ if (match_glyph_data16) match_glyph_data16--;
662
+ #ifndef HB_NO_BEYOND_64K
663
+ else
664
+ if (match_glyph_data24) match_glyph_data24--;
665
+ #endif
666
+ }
667
+
668
+ unsigned int idx;
669
+ protected:
670
+ hb_ot_apply_context_t *c;
671
+ matcher_t matcher;
672
+ const HBUINT16 *match_glyph_data16;
673
+ #ifndef HB_NO_BEYOND_64K
674
+ const HBUINT24 *match_glyph_data24;
675
+ #endif
676
+
677
+ unsigned int end;
678
+ };
679
+
680
+
681
+ const char *get_name () { return "APPLY"; }
682
+ typedef return_t (*recurse_func_t) (hb_ot_apply_context_t *c, unsigned int lookup_index);
683
+ template <typename T>
684
+ return_t dispatch (const T &obj) { return obj.apply (this); }
685
+ static return_t default_return_value () { return false; }
686
+ bool stop_sublookup_iteration (return_t r) const { return r; }
687
+ return_t recurse (unsigned int sub_lookup_index)
688
+ {
689
+ if (unlikely (nesting_level_left == 0 || !recurse_func || buffer->max_ops-- <= 0))
690
+ {
691
+ buffer->shaping_failed = true;
692
+ return default_return_value ();
693
+ }
694
+
695
+ nesting_level_left--;
696
+ bool ret = recurse_func (this, sub_lookup_index);
697
+ nesting_level_left++;
698
+ return ret;
699
+ }
700
+
701
+ skipping_iterator_t iter_input, iter_context;
702
+
703
+ unsigned int table_index; /* GSUB/GPOS */
704
+ hb_font_t *font;
705
+ hb_face_t *face;
706
+ hb_buffer_t *buffer;
707
+ hb_sanitize_context_t sanitizer;
708
+ recurse_func_t recurse_func = nullptr;
709
+ const GDEF &gdef;
710
+ const GDEF::accelerator_t &gdef_accel;
711
+ const ItemVariationStore &var_store;
712
+ ItemVariationStore::cache_t *var_store_cache;
713
+ hb_set_digest_t digest;
714
+
715
+ hb_direction_t direction;
716
+ hb_mask_t lookup_mask = 1;
717
+ unsigned int lookup_index = (unsigned) -1;
718
+ unsigned int lookup_props = 0;
719
+ unsigned int nesting_level_left = HB_MAX_NESTING_LEVEL;
720
+
721
+ bool has_glyph_classes;
722
+ bool auto_zwnj = true;
723
+ bool auto_zwj = true;
724
+ bool per_syllable = false;
725
+ bool random = false;
726
+ unsigned new_syllables = (unsigned) -1;
727
+
728
+ signed last_base = -1; // GPOS uses
729
+ unsigned last_base_until = 0; // GPOS uses
730
+
731
+ hb_ot_apply_context_t (unsigned int table_index_,
732
+ hb_font_t *font_,
733
+ hb_buffer_t *buffer_,
734
+ hb_blob_t *table_blob_) :
735
+ table_index (table_index_),
736
+ font (font_), face (font->face), buffer (buffer_),
737
+ sanitizer (table_blob_),
738
+ gdef (
739
+ #ifndef HB_NO_OT_LAYOUT
740
+ *face->table.GDEF->table
741
+ #else
742
+ Null (GDEF)
743
+ #endif
744
+ ),
745
+ gdef_accel (
746
+ #ifndef HB_NO_OT_LAYOUT
747
+ *face->table.GDEF
748
+ #else
749
+ Null (GDEF::accelerator_t)
750
+ #endif
751
+ ),
752
+ var_store (gdef.get_var_store ()),
753
+ var_store_cache (
754
+ #ifndef HB_NO_VAR
755
+ table_index == 1 && font->num_coords ? var_store.create_cache () : nullptr
756
+ #else
757
+ nullptr
758
+ #endif
759
+ ),
760
+ digest (buffer_->digest ()),
761
+ direction (buffer_->props.direction),
762
+ has_glyph_classes (gdef.has_glyph_classes ())
763
+ { init_iters (); }
764
+
765
+ ~hb_ot_apply_context_t ()
766
+ {
767
+ #ifndef HB_NO_VAR
768
+ ItemVariationStore::destroy_cache (var_store_cache);
769
+ #endif
770
+ }
771
+
772
+ void init_iters ()
773
+ {
774
+ iter_input.init (this, false);
775
+ iter_context.init (this, true);
776
+ }
777
+
778
+ void set_lookup_mask (hb_mask_t mask, bool init = true) { lookup_mask = mask; last_base = -1; last_base_until = 0; if (init) init_iters (); }
779
+ void set_auto_zwj (bool auto_zwj_, bool init = true) { auto_zwj = auto_zwj_; if (init) init_iters (); }
780
+ void set_auto_zwnj (bool auto_zwnj_, bool init = true) { auto_zwnj = auto_zwnj_; if (init) init_iters (); }
781
+ void set_per_syllable (bool per_syllable_, bool init = true) { per_syllable = per_syllable_; if (init) init_iters (); }
782
+ void set_random (bool random_) { random = random_; }
783
+ void set_recurse_func (recurse_func_t func) { recurse_func = func; }
784
+ void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; }
785
+ void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; init_iters (); }
786
+
787
+ uint32_t random_number ()
788
+ {
789
+ /* http://www.cplusplus.com/reference/random/minstd_rand/ */
790
+ buffer->random_state = buffer->random_state * 48271 % 2147483647;
791
+ return buffer->random_state;
792
+ }
793
+
794
+ bool match_properties_mark (hb_codepoint_t glyph,
795
+ unsigned int glyph_props,
796
+ unsigned int match_props) const
797
+ {
798
+ /* If using mark filtering sets, the high short of
799
+ * match_props has the set index.
800
+ */
801
+ if (match_props & LookupFlag::UseMarkFilteringSet)
802
+ return gdef_accel.mark_set_covers (match_props >> 16, glyph);
803
+
804
+ /* The second byte of match_props has the meaning
805
+ * "ignore marks of attachment type different than
806
+ * the attachment type specified."
807
+ */
808
+ if (match_props & LookupFlag::MarkAttachmentType)
809
+ return (match_props & LookupFlag::MarkAttachmentType) == (glyph_props & LookupFlag::MarkAttachmentType);
810
+
811
+ return true;
812
+ }
813
+
814
+ #ifndef HB_OPTIMIZE_SIZE
815
+ HB_ALWAYS_INLINE
816
+ #endif
817
+ bool check_glyph_property (const hb_glyph_info_t *info,
818
+ unsigned int match_props) const
819
+ {
820
+ unsigned int glyph_props = _hb_glyph_info_get_glyph_props (info);
821
+
822
+ /* Not covered, if, for example, glyph class is ligature and
823
+ * match_props includes LookupFlags::IgnoreLigatures
824
+ */
825
+ if (glyph_props & match_props & LookupFlag::IgnoreFlags)
826
+ return false;
827
+
828
+ if (unlikely (glyph_props & HB_OT_LAYOUT_GLYPH_PROPS_MARK))
829
+ return match_properties_mark (info->codepoint, glyph_props, match_props);
830
+
831
+ return true;
832
+ }
833
+
834
+ void _set_glyph_class (hb_codepoint_t glyph_index,
835
+ unsigned int class_guess = 0,
836
+ bool ligature = false,
837
+ bool component = false)
838
+ {
839
+ digest.add (glyph_index);
840
+
841
+ if (new_syllables != (unsigned) -1)
842
+ buffer->cur().syllable() = new_syllables;
843
+
844
+ unsigned int props = _hb_glyph_info_get_glyph_props (&buffer->cur());
845
+ props |= HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED;
846
+ if (ligature)
847
+ {
848
+ props |= HB_OT_LAYOUT_GLYPH_PROPS_LIGATED;
849
+ /* In the only place that the MULTIPLIED bit is used, Uniscribe
850
+ * seems to only care about the "last" transformation between
851
+ * Ligature and Multiple substitutions. Ie. if you ligate, expand,
852
+ * and ligate again, it forgives the multiplication and acts as
853
+ * if only ligation happened. As such, clear MULTIPLIED bit.
854
+ */
855
+ props &= ~HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED;
856
+ }
857
+ if (component)
858
+ props |= HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED;
859
+ if (likely (has_glyph_classes))
860
+ {
861
+ props &= HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE;
862
+ _hb_glyph_info_set_glyph_props (&buffer->cur(), props | gdef_accel.get_glyph_props (glyph_index));
863
+ }
864
+ else if (class_guess)
865
+ {
866
+ props &= HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE;
867
+ _hb_glyph_info_set_glyph_props (&buffer->cur(), props | class_guess);
868
+ }
869
+ else
870
+ _hb_glyph_info_set_glyph_props (&buffer->cur(), props);
871
+ }
872
+
873
+ void replace_glyph (hb_codepoint_t glyph_index)
874
+ {
875
+ _set_glyph_class (glyph_index);
876
+ (void) buffer->replace_glyph (glyph_index);
877
+ }
878
+ void replace_glyph_inplace (hb_codepoint_t glyph_index)
879
+ {
880
+ _set_glyph_class (glyph_index);
881
+ buffer->cur().codepoint = glyph_index;
882
+ }
883
+ void replace_glyph_with_ligature (hb_codepoint_t glyph_index,
884
+ unsigned int class_guess)
885
+ {
886
+ _set_glyph_class (glyph_index, class_guess, true);
887
+ (void) buffer->replace_glyph (glyph_index);
888
+ }
889
+ void output_glyph_for_component (hb_codepoint_t glyph_index,
890
+ unsigned int class_guess)
891
+ {
892
+ _set_glyph_class (glyph_index, class_guess, false, true);
893
+ (void) buffer->output_glyph (glyph_index);
894
+ }
895
+ };
896
+
897
+
898
+ struct hb_accelerate_subtables_context_t :
899
+ hb_dispatch_context_t<hb_accelerate_subtables_context_t>
900
+ {
901
+ template <typename Type>
902
+ static inline bool apply_to (const void *obj, hb_ot_apply_context_t *c)
903
+ {
904
+ const Type *typed_obj = (const Type *) obj;
905
+ return typed_obj->apply (c);
906
+ }
907
+
908
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
909
+ template <typename T>
910
+ static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, hb_priority<1>) HB_RETURN (bool, obj->apply_cached (c) )
911
+ template <typename T>
912
+ static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, hb_priority<0>) HB_RETURN (bool, obj->apply (c) )
913
+ template <typename Type>
914
+ static inline bool apply_cached_to (const void *obj, hb_ot_apply_context_t *c)
915
+ {
916
+ const Type *typed_obj = (const Type *) obj;
917
+ return apply_cached_ (typed_obj, c, hb_prioritize);
918
+ }
919
+
920
+ template <typename T>
921
+ static inline auto cache_func_ (const T *obj, hb_ot_apply_context_t *c, bool enter, hb_priority<1>) HB_RETURN (bool, obj->cache_func (c, enter) )
922
+ template <typename T>
923
+ static inline bool cache_func_ (const T *obj, hb_ot_apply_context_t *c, bool enter, hb_priority<0>) { return false; }
924
+ template <typename Type>
925
+ static inline bool cache_func_to (const void *obj, hb_ot_apply_context_t *c, bool enter)
926
+ {
927
+ const Type *typed_obj = (const Type *) obj;
928
+ return cache_func_ (typed_obj, c, enter, hb_prioritize);
929
+ }
930
+ #endif
931
+
932
+ typedef bool (*hb_apply_func_t) (const void *obj, hb_ot_apply_context_t *c);
933
+ typedef bool (*hb_cache_func_t) (const void *obj, hb_ot_apply_context_t *c, bool enter);
934
+
935
+ struct hb_applicable_t
936
+ {
937
+ friend struct hb_accelerate_subtables_context_t;
938
+ friend struct hb_ot_layout_lookup_accelerator_t;
939
+
940
+ template <typename T>
941
+ void init (const T &obj_,
942
+ hb_apply_func_t apply_func_
943
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
944
+ , hb_apply_func_t apply_cached_func_
945
+ , hb_cache_func_t cache_func_
946
+ #endif
947
+ )
948
+ {
949
+ obj = &obj_;
950
+ apply_func = apply_func_;
951
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
952
+ apply_cached_func = apply_cached_func_;
953
+ cache_func = cache_func_;
954
+ #endif
955
+ digest.init ();
956
+ obj_.get_coverage ().collect_coverage (&digest);
957
+ }
958
+
959
+ bool apply (hb_ot_apply_context_t *c) const
960
+ {
961
+ return digest.may_have (c->buffer->cur().codepoint) && apply_func (obj, c);
962
+ }
963
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
964
+ bool apply_cached (hb_ot_apply_context_t *c) const
965
+ {
966
+ return digest.may_have (c->buffer->cur().codepoint) && apply_cached_func (obj, c);
967
+ }
968
+ bool cache_enter (hb_ot_apply_context_t *c) const
969
+ {
970
+ return cache_func (obj, c, true);
971
+ }
972
+ void cache_leave (hb_ot_apply_context_t *c) const
973
+ {
974
+ cache_func (obj, c, false);
975
+ }
976
+ #endif
977
+
978
+ private:
979
+ const void *obj;
980
+ hb_apply_func_t apply_func;
981
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
982
+ hb_apply_func_t apply_cached_func;
983
+ hb_cache_func_t cache_func;
984
+ #endif
985
+ hb_set_digest_t digest;
986
+ };
987
+
988
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
989
+ template <typename T>
990
+ auto cache_cost (const T &obj, hb_priority<1>) HB_AUTO_RETURN ( obj.cache_cost () )
991
+ template <typename T>
992
+ auto cache_cost (const T &obj, hb_priority<0>) HB_AUTO_RETURN ( 0u )
993
+ #endif
994
+
995
+ /* Dispatch interface. */
996
+ template <typename T>
997
+ return_t dispatch (const T &obj)
998
+ {
999
+ hb_applicable_t *entry = &array[i++];
1000
+
1001
+ entry->init (obj,
1002
+ apply_to<T>
1003
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
1004
+ , apply_cached_to<T>
1005
+ , cache_func_to<T>
1006
+ #endif
1007
+ );
1008
+
1009
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
1010
+ /* Cache handling
1011
+ *
1012
+ * We allow one subtable from each lookup to use a cache. The assumption
1013
+ * being that multiple subtables of the same lookup cannot use a cache
1014
+ * because the resources they would use will collide. As such, we ask
1015
+ * each subtable to tell us how much it costs (which a cache would avoid),
1016
+ * and we allocate the cache opportunity to the costliest subtable.
1017
+ */
1018
+ unsigned cost = cache_cost (obj, hb_prioritize);
1019
+ if (cost > cache_user_cost)
1020
+ {
1021
+ cache_user_idx = i - 1;
1022
+ cache_user_cost = cost;
1023
+ }
1024
+ #endif
1025
+
1026
+ return hb_empty_t ();
1027
+ }
1028
+ static return_t default_return_value () { return hb_empty_t (); }
1029
+
1030
+ hb_accelerate_subtables_context_t (hb_applicable_t *array_) :
1031
+ array (array_) {}
1032
+
1033
+ hb_applicable_t *array;
1034
+ unsigned i = 0;
1035
+
1036
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
1037
+ unsigned cache_user_idx = (unsigned) -1;
1038
+ unsigned cache_user_cost = 0;
1039
+ #endif
1040
+ };
1041
+
1042
+
1043
+ typedef bool (*intersects_func_t) (const hb_set_t *glyphs, unsigned value, const void *data, void *cache);
1044
+ typedef void (*intersected_glyphs_func_t) (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs, void *cache);
1045
+ typedef void (*collect_glyphs_func_t) (hb_set_t *glyphs, unsigned value, const void *data);
1046
+ typedef bool (*match_func_t) (hb_glyph_info_t &info, unsigned value, const void *data);
1047
+
1048
+ struct ContextClosureFuncs
1049
+ {
1050
+ intersects_func_t intersects;
1051
+ intersected_glyphs_func_t intersected_glyphs;
1052
+ };
1053
+ struct ContextCollectGlyphsFuncs
1054
+ {
1055
+ collect_glyphs_func_t collect;
1056
+ };
1057
+ struct ContextApplyFuncs
1058
+ {
1059
+ match_func_t match;
1060
+ };
1061
+ struct ChainContextApplyFuncs
1062
+ {
1063
+ match_func_t match[3];
1064
+ };
1065
+
1066
+
1067
+ static inline bool intersects_glyph (const hb_set_t *glyphs, unsigned value, const void *data HB_UNUSED, void *cache HB_UNUSED)
1068
+ {
1069
+ return glyphs->has (value);
1070
+ }
1071
+ static inline bool intersects_class (const hb_set_t *glyphs, unsigned value, const void *data, void *cache)
1072
+ {
1073
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1074
+ hb_map_t *map = (hb_map_t *) cache;
1075
+
1076
+ hb_codepoint_t *cached_v;
1077
+ if (map->has (value, &cached_v))
1078
+ return *cached_v;
1079
+
1080
+ bool v = class_def.intersects_class (glyphs, value);
1081
+ map->set (value, v);
1082
+
1083
+ return v;
1084
+ }
1085
+ static inline bool intersects_coverage (const hb_set_t *glyphs, unsigned value, const void *data, void *cache HB_UNUSED)
1086
+ {
1087
+ Offset16To<Coverage> coverage;
1088
+ coverage = value;
1089
+ return (data+coverage).intersects (glyphs);
1090
+ }
1091
+
1092
+
1093
+ static inline void intersected_glyph (const hb_set_t *glyphs HB_UNUSED, const void *data, unsigned value, hb_set_t *intersected_glyphs, HB_UNUSED void *cache)
1094
+ {
1095
+ unsigned g = reinterpret_cast<const HBUINT16 *>(data)[value];
1096
+ intersected_glyphs->add (g);
1097
+ }
1098
+
1099
+ using intersected_class_cache_t = hb_hashmap_t<unsigned, hb_set_t>;
1100
+
1101
+ static inline void intersected_class_glyphs (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs, void *cache)
1102
+ {
1103
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1104
+
1105
+ intersected_class_cache_t *map = (intersected_class_cache_t *) cache;
1106
+
1107
+ hb_set_t *cached_v;
1108
+ if (map->has (value, &cached_v))
1109
+ {
1110
+ intersected_glyphs->union_ (*cached_v);
1111
+ return;
1112
+ }
1113
+
1114
+ hb_set_t v;
1115
+ class_def.intersected_class_glyphs (glyphs, value, &v);
1116
+
1117
+ intersected_glyphs->union_ (v);
1118
+
1119
+ map->set (value, std::move (v));
1120
+ }
1121
+
1122
+ static inline void intersected_coverage_glyphs (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs, HB_UNUSED void *cache)
1123
+ {
1124
+ Offset16To<Coverage> coverage;
1125
+ coverage = value;
1126
+ (data+coverage).intersect_set (*glyphs, *intersected_glyphs);
1127
+ }
1128
+
1129
+
1130
+ template <typename HBUINT>
1131
+ static inline bool array_is_subset_of (const hb_set_t *glyphs,
1132
+ unsigned int count,
1133
+ const HBUINT values[],
1134
+ intersects_func_t intersects_func,
1135
+ const void *intersects_data,
1136
+ void *cache)
1137
+ {
1138
+ for (const auto &_ : + hb_iter (values, count))
1139
+ if (!intersects_func (glyphs, _, intersects_data, cache)) return false;
1140
+ return true;
1141
+ }
1142
+
1143
+
1144
+ static inline void collect_glyph (hb_set_t *glyphs, unsigned value, const void *data HB_UNUSED)
1145
+ {
1146
+ glyphs->add (value);
1147
+ }
1148
+ static inline void collect_class (hb_set_t *glyphs, unsigned value, const void *data)
1149
+ {
1150
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1151
+ class_def.collect_class (glyphs, value);
1152
+ }
1153
+ static inline void collect_coverage (hb_set_t *glyphs, unsigned value, const void *data)
1154
+ {
1155
+ Offset16To<Coverage> coverage;
1156
+ coverage = value;
1157
+ (data+coverage).collect_coverage (glyphs);
1158
+ }
1159
+ template <typename HBUINT>
1160
+ static inline void collect_array (hb_collect_glyphs_context_t *c HB_UNUSED,
1161
+ hb_set_t *glyphs,
1162
+ unsigned int count,
1163
+ const HBUINT values[],
1164
+ collect_glyphs_func_t collect_func,
1165
+ const void *collect_data)
1166
+ {
1167
+ return
1168
+ + hb_iter (values, count)
1169
+ | hb_apply ([&] (const HBUINT &_) { collect_func (glyphs, _, collect_data); })
1170
+ ;
1171
+ }
1172
+
1173
+
1174
+ static inline bool match_always (hb_glyph_info_t &info HB_UNUSED, unsigned value HB_UNUSED, const void *data HB_UNUSED)
1175
+ {
1176
+ return true;
1177
+ }
1178
+ static inline bool match_glyph (hb_glyph_info_t &info, unsigned value, const void *data HB_UNUSED)
1179
+ {
1180
+ return info.codepoint == value;
1181
+ }
1182
+ static inline bool match_class (hb_glyph_info_t &info, unsigned value, const void *data)
1183
+ {
1184
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1185
+ return class_def.get_class (info.codepoint) == value;
1186
+ }
1187
+ static inline bool match_class_cached (hb_glyph_info_t &info, unsigned value, const void *data)
1188
+ {
1189
+ unsigned klass = info.syllable();
1190
+ if (klass < 255)
1191
+ return klass == value;
1192
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1193
+ klass = class_def.get_class (info.codepoint);
1194
+ if (likely (klass < 255))
1195
+ info.syllable() = klass;
1196
+ return klass == value;
1197
+ }
1198
+ static inline bool match_class_cached1 (hb_glyph_info_t &info, unsigned value, const void *data)
1199
+ {
1200
+ unsigned klass = info.syllable() & 0x0F;
1201
+ if (klass < 15)
1202
+ return klass == value;
1203
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1204
+ klass = class_def.get_class (info.codepoint);
1205
+ if (likely (klass < 15))
1206
+ info.syllable() = (info.syllable() & 0xF0) | klass;
1207
+ return klass == value;
1208
+ }
1209
+ static inline bool match_class_cached2 (hb_glyph_info_t &info, unsigned value, const void *data)
1210
+ {
1211
+ unsigned klass = (info.syllable() & 0xF0) >> 4;
1212
+ if (klass < 15)
1213
+ return klass == value;
1214
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
1215
+ klass = class_def.get_class (info.codepoint);
1216
+ if (likely (klass < 15))
1217
+ info.syllable() = (info.syllable() & 0x0F) | (klass << 4);
1218
+ return klass == value;
1219
+ }
1220
+ static inline bool match_coverage (hb_glyph_info_t &info, unsigned value, const void *data)
1221
+ {
1222
+ Offset16To<Coverage> coverage;
1223
+ coverage = value;
1224
+ return (data+coverage).get_coverage (info.codepoint) != NOT_COVERED;
1225
+ }
1226
+
1227
+ template <typename HBUINT>
1228
+ static inline bool would_match_input (hb_would_apply_context_t *c,
1229
+ unsigned int count, /* Including the first glyph (not matched) */
1230
+ const HBUINT input[], /* Array of input values--start with second glyph */
1231
+ match_func_t match_func,
1232
+ const void *match_data)
1233
+ {
1234
+ if (count != c->len)
1235
+ return false;
1236
+
1237
+ for (unsigned int i = 1; i < count; i++)
1238
+ {
1239
+ hb_glyph_info_t info;
1240
+ info.codepoint = c->glyphs[i];
1241
+ if (likely (!match_func (info, input[i - 1], match_data)))
1242
+ return false;
1243
+ }
1244
+
1245
+ return true;
1246
+ }
1247
+ template <typename HBUINT>
1248
+ #ifndef HB_OPTIMIZE_SIZE
1249
+ HB_ALWAYS_INLINE
1250
+ #endif
1251
+ static bool match_input (hb_ot_apply_context_t *c,
1252
+ unsigned int count, /* Including the first glyph (not matched) */
1253
+ const HBUINT input[], /* Array of input values--start with second glyph */
1254
+ match_func_t match_func,
1255
+ const void *match_data,
1256
+ unsigned int *end_position,
1257
+ unsigned int *match_positions,
1258
+ unsigned int *p_total_component_count = nullptr)
1259
+ {
1260
+ TRACE_APPLY (nullptr);
1261
+
1262
+ if (unlikely (count > HB_MAX_CONTEXT_LENGTH)) return_trace (false);
1263
+
1264
+ hb_buffer_t *buffer = c->buffer;
1265
+
1266
+ hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
1267
+ skippy_iter.reset (buffer->idx);
1268
+ skippy_iter.set_match_func (match_func, match_data);
1269
+ skippy_iter.set_glyph_data (input);
1270
+
1271
+ /*
1272
+ * This is perhaps the trickiest part of OpenType... Remarks:
1273
+ *
1274
+ * - If all components of the ligature were marks, we call this a mark ligature.
1275
+ *
1276
+ * - If there is no GDEF, and the ligature is NOT a mark ligature, we categorize
1277
+ * it as a ligature glyph.
1278
+ *
1279
+ * - Ligatures cannot be formed across glyphs attached to different components
1280
+ * of previous ligatures. Eg. the sequence is LAM,SHADDA,LAM,FATHA,HEH, and
1281
+ * LAM,LAM,HEH form a ligature, leaving SHADDA,FATHA next to eachother.
1282
+ * However, it would be wrong to ligate that SHADDA,FATHA sequence.
1283
+ * There are a couple of exceptions to this:
1284
+ *
1285
+ * o If a ligature tries ligating with marks that belong to it itself, go ahead,
1286
+ * assuming that the font designer knows what they are doing (otherwise it can
1287
+ * break Indic stuff when a matra wants to ligate with a conjunct,
1288
+ *
1289
+ * o If two marks want to ligate and they belong to different components of the
1290
+ * same ligature glyph, and said ligature glyph is to be ignored according to
1291
+ * mark-filtering rules, then allow.
1292
+ * https://github.com/harfbuzz/harfbuzz/issues/545
1293
+ */
1294
+
1295
+ unsigned int total_component_count = 0;
1296
+
1297
+ unsigned int first_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
1298
+ unsigned int first_lig_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
1299
+
1300
+ enum {
1301
+ LIGBASE_NOT_CHECKED,
1302
+ LIGBASE_MAY_NOT_SKIP,
1303
+ LIGBASE_MAY_SKIP
1304
+ } ligbase = LIGBASE_NOT_CHECKED;
1305
+
1306
+ for (unsigned int i = 1; i < count; i++)
1307
+ {
1308
+ unsigned unsafe_to;
1309
+ if (!skippy_iter.next (&unsafe_to))
1310
+ {
1311
+ *end_position = unsafe_to;
1312
+ return_trace (false);
1313
+ }
1314
+
1315
+ match_positions[i] = skippy_iter.idx;
1316
+
1317
+ unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]);
1318
+ unsigned int this_lig_comp = _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]);
1319
+
1320
+ if (first_lig_id && first_lig_comp)
1321
+ {
1322
+ /* If first component was attached to a previous ligature component,
1323
+ * all subsequent components should be attached to the same ligature
1324
+ * component, otherwise we shouldn't ligate them... */
1325
+ if (first_lig_id != this_lig_id || first_lig_comp != this_lig_comp)
1326
+ {
1327
+ /* ...unless, we are attached to a base ligature and that base
1328
+ * ligature is ignorable. */
1329
+ if (ligbase == LIGBASE_NOT_CHECKED)
1330
+ {
1331
+ bool found = false;
1332
+ const auto *out = buffer->out_info;
1333
+ unsigned int j = buffer->out_len;
1334
+ while (j && _hb_glyph_info_get_lig_id (&out[j - 1]) == first_lig_id)
1335
+ {
1336
+ if (_hb_glyph_info_get_lig_comp (&out[j - 1]) == 0)
1337
+ {
1338
+ j--;
1339
+ found = true;
1340
+ break;
1341
+ }
1342
+ j--;
1343
+ }
1344
+
1345
+ if (found && skippy_iter.may_skip (out[j]) == hb_ot_apply_context_t::matcher_t::SKIP_YES)
1346
+ ligbase = LIGBASE_MAY_SKIP;
1347
+ else
1348
+ ligbase = LIGBASE_MAY_NOT_SKIP;
1349
+ }
1350
+
1351
+ if (ligbase == LIGBASE_MAY_NOT_SKIP)
1352
+ return_trace (false);
1353
+ }
1354
+ }
1355
+ else
1356
+ {
1357
+ /* If first component was NOT attached to a previous ligature component,
1358
+ * all subsequent components should also NOT be attached to any ligature
1359
+ * component, unless they are attached to the first component itself! */
1360
+ if (this_lig_id && this_lig_comp && (this_lig_id != first_lig_id))
1361
+ return_trace (false);
1362
+ }
1363
+
1364
+ total_component_count += _hb_glyph_info_get_lig_num_comps (&buffer->info[skippy_iter.idx]);
1365
+ }
1366
+
1367
+ *end_position = skippy_iter.idx + 1;
1368
+
1369
+ if (p_total_component_count)
1370
+ {
1371
+ total_component_count += _hb_glyph_info_get_lig_num_comps (&buffer->cur());
1372
+ *p_total_component_count = total_component_count;
1373
+ }
1374
+
1375
+ match_positions[0] = buffer->idx;
1376
+
1377
+ return_trace (true);
1378
+ }
1379
+ static inline bool ligate_input (hb_ot_apply_context_t *c,
1380
+ unsigned int count, /* Including the first glyph */
1381
+ const unsigned int *match_positions, /* Including the first glyph */
1382
+ unsigned int match_end,
1383
+ hb_codepoint_t lig_glyph,
1384
+ unsigned int total_component_count)
1385
+ {
1386
+ TRACE_APPLY (nullptr);
1387
+
1388
+ hb_buffer_t *buffer = c->buffer;
1389
+
1390
+ buffer->merge_clusters (buffer->idx, match_end);
1391
+
1392
+ /* - If a base and one or more marks ligate, consider that as a base, NOT
1393
+ * ligature, such that all following marks can still attach to it.
1394
+ * https://github.com/harfbuzz/harfbuzz/issues/1109
1395
+ *
1396
+ * - If all components of the ligature were marks, we call this a mark ligature.
1397
+ * If it *is* a mark ligature, we don't allocate a new ligature id, and leave
1398
+ * the ligature to keep its old ligature id. This will allow it to attach to
1399
+ * a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
1400
+ * and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a
1401
+ * ligature id and component value of 2. Then if SHADDA,FATHA form a ligature
1402
+ * later, we don't want them to lose their ligature id/component, otherwise
1403
+ * GPOS will fail to correctly position the mark ligature on top of the
1404
+ * LAM,LAM,HEH ligature. See:
1405
+ * https://bugzilla.gnome.org/show_bug.cgi?id=676343
1406
+ *
1407
+ * - If a ligature is formed of components that some of which are also ligatures
1408
+ * themselves, and those ligature components had marks attached to *their*
1409
+ * components, we have to attach the marks to the new ligature component
1410
+ * positions! Now *that*'s tricky! And these marks may be following the
1411
+ * last component of the whole sequence, so we should loop forward looking
1412
+ * for them and update them.
1413
+ *
1414
+ * Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a
1415
+ * 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature
1416
+ * id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature
1417
+ * form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to
1418
+ * the new ligature with a component value of 2.
1419
+ *
1420
+ * This in fact happened to a font... See:
1421
+ * https://bugzilla.gnome.org/show_bug.cgi?id=437633
1422
+ */
1423
+
1424
+ bool is_base_ligature = _hb_glyph_info_is_base_glyph (&buffer->info[match_positions[0]]);
1425
+ bool is_mark_ligature = _hb_glyph_info_is_mark (&buffer->info[match_positions[0]]);
1426
+ for (unsigned int i = 1; i < count; i++)
1427
+ if (!_hb_glyph_info_is_mark (&buffer->info[match_positions[i]]))
1428
+ {
1429
+ is_base_ligature = false;
1430
+ is_mark_ligature = false;
1431
+ break;
1432
+ }
1433
+ bool is_ligature = !is_base_ligature && !is_mark_ligature;
1434
+
1435
+ unsigned int klass = is_ligature ? HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE : 0;
1436
+ unsigned int lig_id = is_ligature ? _hb_allocate_lig_id (buffer) : 0;
1437
+ unsigned int last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
1438
+ unsigned int last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
1439
+ unsigned int components_so_far = last_num_components;
1440
+
1441
+ if (is_ligature)
1442
+ {
1443
+ _hb_glyph_info_set_lig_props_for_ligature (&buffer->cur(), lig_id, total_component_count);
1444
+ if (_hb_glyph_info_get_general_category (&buffer->cur()) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
1445
+ {
1446
+ _hb_glyph_info_set_general_category (&buffer->cur(), HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER);
1447
+ }
1448
+ }
1449
+ c->replace_glyph_with_ligature (lig_glyph, klass);
1450
+
1451
+ for (unsigned int i = 1; i < count; i++)
1452
+ {
1453
+ while (buffer->idx < match_positions[i] && buffer->successful)
1454
+ {
1455
+ if (is_ligature)
1456
+ {
1457
+ unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
1458
+ if (this_comp == 0)
1459
+ this_comp = last_num_components;
1460
+ unsigned int new_lig_comp = components_so_far - last_num_components +
1461
+ hb_min (this_comp, last_num_components);
1462
+ _hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig_comp);
1463
+ }
1464
+ (void) buffer->next_glyph ();
1465
+ }
1466
+
1467
+ last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
1468
+ last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
1469
+ components_so_far += last_num_components;
1470
+
1471
+ /* Skip the base glyph */
1472
+ buffer->idx++;
1473
+ }
1474
+
1475
+ if (!is_mark_ligature && last_lig_id)
1476
+ {
1477
+ /* Re-adjust components for any marks following. */
1478
+ for (unsigned i = buffer->idx; i < buffer->len; ++i)
1479
+ {
1480
+ if (last_lig_id != _hb_glyph_info_get_lig_id (&buffer->info[i])) break;
1481
+
1482
+ unsigned this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]);
1483
+ if (!this_comp) break;
1484
+
1485
+ unsigned new_lig_comp = components_so_far - last_num_components +
1486
+ hb_min (this_comp, last_num_components);
1487
+ _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp);
1488
+ }
1489
+ }
1490
+ return_trace (true);
1491
+ }
1492
+
1493
+ template <typename HBUINT>
1494
+ #ifndef HB_OPTIMIZE_SIZE
1495
+ HB_ALWAYS_INLINE
1496
+ #endif
1497
+ static bool match_backtrack (hb_ot_apply_context_t *c,
1498
+ unsigned int count,
1499
+ const HBUINT backtrack[],
1500
+ match_func_t match_func,
1501
+ const void *match_data,
1502
+ unsigned int *match_start)
1503
+ {
1504
+ TRACE_APPLY (nullptr);
1505
+
1506
+ hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
1507
+ skippy_iter.reset (c->buffer->backtrack_len ());
1508
+ skippy_iter.set_match_func (match_func, match_data);
1509
+ skippy_iter.set_glyph_data (backtrack);
1510
+
1511
+ for (unsigned int i = 0; i < count; i++)
1512
+ {
1513
+ unsigned unsafe_from;
1514
+ if (!skippy_iter.prev (&unsafe_from))
1515
+ {
1516
+ *match_start = unsafe_from;
1517
+ return_trace (false);
1518
+ }
1519
+ }
1520
+
1521
+ *match_start = skippy_iter.idx;
1522
+ return_trace (true);
1523
+ }
1524
+
1525
+ template <typename HBUINT>
1526
+ #ifndef HB_OPTIMIZE_SIZE
1527
+ HB_ALWAYS_INLINE
1528
+ #endif
1529
+ static bool match_lookahead (hb_ot_apply_context_t *c,
1530
+ unsigned int count,
1531
+ const HBUINT lookahead[],
1532
+ match_func_t match_func,
1533
+ const void *match_data,
1534
+ unsigned int start_index,
1535
+ unsigned int *end_index)
1536
+ {
1537
+ TRACE_APPLY (nullptr);
1538
+
1539
+ hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
1540
+ skippy_iter.reset (start_index - 1);
1541
+ skippy_iter.set_match_func (match_func, match_data);
1542
+ skippy_iter.set_glyph_data (lookahead);
1543
+
1544
+ for (unsigned int i = 0; i < count; i++)
1545
+ {
1546
+ unsigned unsafe_to;
1547
+ if (!skippy_iter.next (&unsafe_to))
1548
+ {
1549
+ *end_index = unsafe_to;
1550
+ return_trace (false);
1551
+ }
1552
+ }
1553
+
1554
+ *end_index = skippy_iter.idx + 1;
1555
+ return_trace (true);
1556
+ }
1557
+
1558
+
1559
+
1560
+ struct LookupRecord
1561
+ {
1562
+ bool serialize (hb_serialize_context_t *c,
1563
+ const hb_map_t *lookup_map) const
1564
+ {
1565
+ TRACE_SERIALIZE (this);
1566
+ auto *out = c->embed (*this);
1567
+ if (unlikely (!out)) return_trace (false);
1568
+
1569
+ return_trace (c->check_assign (out->lookupListIndex, lookup_map->get (lookupListIndex), HB_SERIALIZE_ERROR_INT_OVERFLOW));
1570
+ }
1571
+
1572
+ bool sanitize (hb_sanitize_context_t *c) const
1573
+ {
1574
+ TRACE_SANITIZE (this);
1575
+ return_trace (c->check_struct (this));
1576
+ }
1577
+
1578
+ HBUINT16 sequenceIndex; /* Index into current glyph
1579
+ * sequence--first glyph = 0 */
1580
+ HBUINT16 lookupListIndex; /* Lookup to apply to that
1581
+ * position--zero--based */
1582
+ public:
1583
+ DEFINE_SIZE_STATIC (4);
1584
+ };
1585
+
1586
+ static unsigned serialize_lookuprecord_array (hb_serialize_context_t *c,
1587
+ const hb_array_t<const LookupRecord> lookupRecords,
1588
+ const hb_map_t *lookup_map)
1589
+ {
1590
+ unsigned count = 0;
1591
+ for (const LookupRecord& r : lookupRecords)
1592
+ {
1593
+ if (!lookup_map->has (r.lookupListIndex))
1594
+ continue;
1595
+
1596
+ if (!r.serialize (c, lookup_map))
1597
+ return 0;
1598
+
1599
+ count++;
1600
+ }
1601
+ return count;
1602
+ }
1603
+
1604
+ enum ContextFormat { SimpleContext = 1, ClassBasedContext = 2, CoverageBasedContext = 3 };
1605
+
1606
+ template <typename HBUINT>
1607
+ static void context_closure_recurse_lookups (hb_closure_context_t *c,
1608
+ unsigned inputCount, const HBUINT input[],
1609
+ unsigned lookupCount,
1610
+ const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */,
1611
+ unsigned value,
1612
+ ContextFormat context_format,
1613
+ const void *data,
1614
+ intersected_glyphs_func_t intersected_glyphs_func,
1615
+ void *cache)
1616
+ {
1617
+ hb_set_t covered_seq_indicies;
1618
+ hb_set_t pos_glyphs;
1619
+ for (unsigned int i = 0; i < lookupCount; i++)
1620
+ {
1621
+ unsigned seqIndex = lookupRecord[i].sequenceIndex;
1622
+ if (seqIndex >= inputCount) continue;
1623
+
1624
+ bool has_pos_glyphs = false;
1625
+
1626
+ if (!covered_seq_indicies.has (seqIndex))
1627
+ {
1628
+ has_pos_glyphs = true;
1629
+ pos_glyphs.clear ();
1630
+ if (seqIndex == 0)
1631
+ {
1632
+ switch (context_format) {
1633
+ case ContextFormat::SimpleContext:
1634
+ pos_glyphs.add (value);
1635
+ break;
1636
+ case ContextFormat::ClassBasedContext:
1637
+ intersected_glyphs_func (&c->parent_active_glyphs (), data, value, &pos_glyphs, cache);
1638
+ break;
1639
+ case ContextFormat::CoverageBasedContext:
1640
+ pos_glyphs.set (c->parent_active_glyphs ());
1641
+ break;
1642
+ }
1643
+ }
1644
+ else
1645
+ {
1646
+ const void *input_data = input;
1647
+ unsigned input_value = seqIndex - 1;
1648
+ if (context_format != ContextFormat::SimpleContext)
1649
+ {
1650
+ input_data = data;
1651
+ input_value = input[seqIndex - 1];
1652
+ }
1653
+
1654
+ intersected_glyphs_func (c->glyphs, input_data, input_value, &pos_glyphs, cache);
1655
+ }
1656
+ }
1657
+
1658
+ covered_seq_indicies.add (seqIndex);
1659
+ hb_set_t *cur_active_glyphs = c->push_cur_active_glyphs ();
1660
+ if (unlikely (!cur_active_glyphs))
1661
+ return;
1662
+ if (has_pos_glyphs) {
1663
+ *cur_active_glyphs = std::move (pos_glyphs);
1664
+ } else {
1665
+ *cur_active_glyphs = *c->glyphs;
1666
+ }
1667
+
1668
+ unsigned endIndex = inputCount;
1669
+ if (context_format == ContextFormat::CoverageBasedContext)
1670
+ endIndex += 1;
1671
+
1672
+ c->recurse (lookupRecord[i].lookupListIndex, &covered_seq_indicies, seqIndex, endIndex);
1673
+
1674
+ c->pop_cur_done_glyphs ();
1675
+ }
1676
+ }
1677
+
1678
+ template <typename context_t>
1679
+ static inline void recurse_lookups (context_t *c,
1680
+ unsigned int lookupCount,
1681
+ const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */)
1682
+ {
1683
+ for (unsigned int i = 0; i < lookupCount; i++)
1684
+ c->recurse (lookupRecord[i].lookupListIndex);
1685
+ }
1686
+
1687
+ static inline void apply_lookup (hb_ot_apply_context_t *c,
1688
+ unsigned int count, /* Including the first glyph */
1689
+ unsigned int *match_positions, /* Including the first glyph */
1690
+ unsigned int lookupCount,
1691
+ const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
1692
+ unsigned int match_end)
1693
+ {
1694
+ hb_buffer_t *buffer = c->buffer;
1695
+ int end;
1696
+
1697
+ unsigned int *match_positions_input = match_positions;
1698
+ unsigned int match_positions_count = count;
1699
+
1700
+ /* All positions are distance from beginning of *output* buffer.
1701
+ * Adjust. */
1702
+ {
1703
+ unsigned int bl = buffer->backtrack_len ();
1704
+ end = bl + match_end - buffer->idx;
1705
+
1706
+ int delta = bl - buffer->idx;
1707
+ /* Convert positions to new indexing. */
1708
+ for (unsigned int j = 0; j < count; j++)
1709
+ match_positions[j] += delta;
1710
+ }
1711
+
1712
+ for (unsigned int i = 0; i < lookupCount && buffer->successful; i++)
1713
+ {
1714
+ unsigned int idx = lookupRecord[i].sequenceIndex;
1715
+ if (idx >= count)
1716
+ continue;
1717
+
1718
+ unsigned int orig_len = buffer->backtrack_len () + buffer->lookahead_len ();
1719
+
1720
+ /* This can happen if earlier recursed lookups deleted many entries. */
1721
+ if (unlikely (match_positions[idx] >= orig_len))
1722
+ continue;
1723
+
1724
+ if (unlikely (!buffer->move_to (match_positions[idx])))
1725
+ break;
1726
+
1727
+ if (unlikely (buffer->max_ops <= 0))
1728
+ break;
1729
+
1730
+ if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
1731
+ {
1732
+ if (buffer->have_output)
1733
+ c->buffer->sync_so_far ();
1734
+ c->buffer->message (c->font,
1735
+ "recursing to lookup %u at %u",
1736
+ (unsigned) lookupRecord[i].lookupListIndex,
1737
+ buffer->idx);
1738
+ }
1739
+
1740
+ if (!c->recurse (lookupRecord[i].lookupListIndex))
1741
+ continue;
1742
+
1743
+ if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
1744
+ {
1745
+ if (buffer->have_output)
1746
+ c->buffer->sync_so_far ();
1747
+ c->buffer->message (c->font,
1748
+ "recursed to lookup %u",
1749
+ (unsigned) lookupRecord[i].lookupListIndex);
1750
+ }
1751
+
1752
+ unsigned int new_len = buffer->backtrack_len () + buffer->lookahead_len ();
1753
+ int delta = new_len - orig_len;
1754
+
1755
+ if (!delta)
1756
+ continue;
1757
+
1758
+ /* Recursed lookup changed buffer len. Adjust.
1759
+ *
1760
+ * TODO:
1761
+ *
1762
+ * Right now, if buffer length increased by n, we assume n new glyphs
1763
+ * were added right after the current position, and if buffer length
1764
+ * was decreased by n, we assume n match positions after the current
1765
+ * one where removed. The former (buffer length increased) case is
1766
+ * fine, but the decrease case can be improved in at least two ways,
1767
+ * both of which are significant:
1768
+ *
1769
+ * - If recursed-to lookup is MultipleSubst and buffer length
1770
+ * decreased, then it's current match position that was deleted,
1771
+ * NOT the one after it.
1772
+ *
1773
+ * - If buffer length was decreased by n, it does not necessarily
1774
+ * mean that n match positions where removed, as there recursed-to
1775
+ * lookup might had a different LookupFlag. Here's a constructed
1776
+ * case of that:
1777
+ * https://github.com/harfbuzz/harfbuzz/discussions/3538
1778
+ *
1779
+ * It should be possible to construct tests for both of these cases.
1780
+ */
1781
+
1782
+ end += delta;
1783
+ if (end < int (match_positions[idx]))
1784
+ {
1785
+ /* End might end up being smaller than match_positions[idx] if the recursed
1786
+ * lookup ended up removing many items.
1787
+ * Just never rewind end beyond start of current position, since that is
1788
+ * not possible in the recursed lookup. Also adjust delta as such.
1789
+ *
1790
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=659496
1791
+ * https://github.com/harfbuzz/harfbuzz/issues/1611
1792
+ */
1793
+ delta += match_positions[idx] - end;
1794
+ end = match_positions[idx];
1795
+ }
1796
+
1797
+ unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */
1798
+
1799
+ if (delta > 0)
1800
+ {
1801
+ if (unlikely (delta + count > HB_MAX_CONTEXT_LENGTH))
1802
+ break;
1803
+ if (unlikely (delta + count > match_positions_count))
1804
+ {
1805
+ unsigned new_match_positions_count = hb_max (delta + count, hb_max(match_positions_count, 4u) * 1.5);
1806
+ if (match_positions == match_positions_input)
1807
+ {
1808
+ match_positions = (unsigned int *) hb_malloc (new_match_positions_count * sizeof (match_positions[0]));
1809
+ if (unlikely (!match_positions))
1810
+ break;
1811
+ memcpy (match_positions, match_positions_input, count * sizeof (match_positions[0]));
1812
+ match_positions_count = new_match_positions_count;
1813
+ }
1814
+ else
1815
+ {
1816
+ unsigned int *new_match_positions = (unsigned int *) hb_realloc (match_positions, new_match_positions_count * sizeof (match_positions[0]));
1817
+ if (unlikely (!new_match_positions))
1818
+ break;
1819
+ match_positions = new_match_positions;
1820
+ match_positions_count = new_match_positions_count;
1821
+ }
1822
+ }
1823
+
1824
+ }
1825
+ else
1826
+ {
1827
+ /* NOTE: delta is non-positive. */
1828
+ delta = hb_max (delta, (int) next - (int) count);
1829
+ next -= delta;
1830
+ }
1831
+
1832
+ /* Shift! */
1833
+ memmove (match_positions + next + delta, match_positions + next,
1834
+ (count - next) * sizeof (match_positions[0]));
1835
+ next += delta;
1836
+ count += delta;
1837
+
1838
+ /* Fill in new entries. */
1839
+ for (unsigned int j = idx + 1; j < next; j++)
1840
+ match_positions[j] = match_positions[j - 1] + 1;
1841
+
1842
+ /* And fixup the rest. */
1843
+ for (; next < count; next++)
1844
+ match_positions[next] += delta;
1845
+ }
1846
+
1847
+ if (match_positions != match_positions_input)
1848
+ hb_free (match_positions);
1849
+
1850
+ (void) buffer->move_to (end);
1851
+ }
1852
+
1853
+
1854
+
1855
+ /* Contextual lookups */
1856
+
1857
+ struct ContextClosureLookupContext
1858
+ {
1859
+ ContextClosureFuncs funcs;
1860
+ ContextFormat context_format;
1861
+ const void *intersects_data;
1862
+ void *intersects_cache;
1863
+ void *intersected_glyphs_cache;
1864
+ };
1865
+
1866
+ struct ContextCollectGlyphsLookupContext
1867
+ {
1868
+ ContextCollectGlyphsFuncs funcs;
1869
+ const void *collect_data;
1870
+ };
1871
+
1872
+ struct ContextApplyLookupContext
1873
+ {
1874
+ ContextApplyFuncs funcs;
1875
+ const void *match_data;
1876
+ };
1877
+
1878
+ template <typename HBUINT>
1879
+ static inline bool context_intersects (const hb_set_t *glyphs,
1880
+ unsigned int inputCount, /* Including the first glyph (not matched) */
1881
+ const HBUINT input[], /* Array of input values--start with second glyph */
1882
+ ContextClosureLookupContext &lookup_context)
1883
+ {
1884
+ return array_is_subset_of (glyphs,
1885
+ inputCount ? inputCount - 1 : 0, input,
1886
+ lookup_context.funcs.intersects,
1887
+ lookup_context.intersects_data,
1888
+ lookup_context.intersects_cache);
1889
+ }
1890
+
1891
+ template <typename HBUINT>
1892
+ static inline void context_closure_lookup (hb_closure_context_t *c,
1893
+ unsigned int inputCount, /* Including the first glyph (not matched) */
1894
+ const HBUINT input[], /* Array of input values--start with second glyph */
1895
+ unsigned int lookupCount,
1896
+ const LookupRecord lookupRecord[],
1897
+ unsigned value, /* Index of first glyph in Coverage or Class value in ClassDef table */
1898
+ ContextClosureLookupContext &lookup_context)
1899
+ {
1900
+ if (context_intersects (c->glyphs,
1901
+ inputCount, input,
1902
+ lookup_context))
1903
+ context_closure_recurse_lookups (c,
1904
+ inputCount, input,
1905
+ lookupCount, lookupRecord,
1906
+ value,
1907
+ lookup_context.context_format,
1908
+ lookup_context.intersects_data,
1909
+ lookup_context.funcs.intersected_glyphs,
1910
+ lookup_context.intersected_glyphs_cache);
1911
+ }
1912
+
1913
+ template <typename HBUINT>
1914
+ static inline void context_collect_glyphs_lookup (hb_collect_glyphs_context_t *c,
1915
+ unsigned int inputCount, /* Including the first glyph (not matched) */
1916
+ const HBUINT input[], /* Array of input values--start with second glyph */
1917
+ unsigned int lookupCount,
1918
+ const LookupRecord lookupRecord[],
1919
+ ContextCollectGlyphsLookupContext &lookup_context)
1920
+ {
1921
+ collect_array (c, c->input,
1922
+ inputCount ? inputCount - 1 : 0, input,
1923
+ lookup_context.funcs.collect, lookup_context.collect_data);
1924
+ recurse_lookups (c,
1925
+ lookupCount, lookupRecord);
1926
+ }
1927
+
1928
+ template <typename HBUINT>
1929
+ static inline bool context_would_apply_lookup (hb_would_apply_context_t *c,
1930
+ unsigned int inputCount, /* Including the first glyph (not matched) */
1931
+ const HBUINT input[], /* Array of input values--start with second glyph */
1932
+ unsigned int lookupCount HB_UNUSED,
1933
+ const LookupRecord lookupRecord[] HB_UNUSED,
1934
+ const ContextApplyLookupContext &lookup_context)
1935
+ {
1936
+ return would_match_input (c,
1937
+ inputCount, input,
1938
+ lookup_context.funcs.match, lookup_context.match_data);
1939
+ }
1940
+
1941
+ template <typename HBUINT>
1942
+ HB_ALWAYS_INLINE
1943
+ static bool context_apply_lookup (hb_ot_apply_context_t *c,
1944
+ unsigned int inputCount, /* Including the first glyph (not matched) */
1945
+ const HBUINT input[], /* Array of input values--start with second glyph */
1946
+ unsigned int lookupCount,
1947
+ const LookupRecord lookupRecord[],
1948
+ const ContextApplyLookupContext &lookup_context)
1949
+ {
1950
+ if (unlikely (inputCount > HB_MAX_CONTEXT_LENGTH)) return false;
1951
+ unsigned match_positions_stack[4];
1952
+ unsigned *match_positions = match_positions_stack;
1953
+ if (unlikely (inputCount > ARRAY_LENGTH (match_positions_stack)))
1954
+ {
1955
+ match_positions = (unsigned *) hb_malloc (hb_max (inputCount, 1u) * sizeof (match_positions[0]));
1956
+ if (unlikely (!match_positions))
1957
+ return false;
1958
+ }
1959
+
1960
+ unsigned match_end = 0;
1961
+ bool ret = false;
1962
+ if (match_input (c,
1963
+ inputCount, input,
1964
+ lookup_context.funcs.match, lookup_context.match_data,
1965
+ &match_end, match_positions))
1966
+ {
1967
+ c->buffer->unsafe_to_break (c->buffer->idx, match_end);
1968
+ apply_lookup (c,
1969
+ inputCount, match_positions,
1970
+ lookupCount, lookupRecord,
1971
+ match_end);
1972
+ ret = true;
1973
+ }
1974
+ else
1975
+ {
1976
+ c->buffer->unsafe_to_concat (c->buffer->idx, match_end);
1977
+ ret = false;
1978
+ }
1979
+
1980
+ if (unlikely (match_positions != match_positions_stack))
1981
+ hb_free (match_positions);
1982
+
1983
+ return ret;
1984
+ }
1985
+
1986
+ template <typename Types>
1987
+ struct Rule
1988
+ {
1989
+ template <typename T>
1990
+ friend struct RuleSet;
1991
+
1992
+ bool intersects (const hb_set_t *glyphs, ContextClosureLookupContext &lookup_context) const
1993
+ {
1994
+ return context_intersects (glyphs,
1995
+ inputCount, inputZ.arrayZ,
1996
+ lookup_context);
1997
+ }
1998
+
1999
+ void closure (hb_closure_context_t *c, unsigned value, ContextClosureLookupContext &lookup_context) const
2000
+ {
2001
+ if (unlikely (c->lookup_limit_exceeded ())) return;
2002
+
2003
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2004
+ (inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
2005
+ context_closure_lookup (c,
2006
+ inputCount, inputZ.arrayZ,
2007
+ lookupCount, lookupRecord.arrayZ,
2008
+ value, lookup_context);
2009
+ }
2010
+
2011
+ void closure_lookups (hb_closure_lookups_context_t *c,
2012
+ ContextClosureLookupContext &lookup_context) const
2013
+ {
2014
+ if (unlikely (c->lookup_limit_exceeded ())) return;
2015
+ if (!intersects (c->glyphs, lookup_context)) return;
2016
+
2017
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2018
+ (inputZ.as_array (inputCount ? inputCount - 1 : 0));
2019
+ recurse_lookups (c, lookupCount, lookupRecord.arrayZ);
2020
+ }
2021
+
2022
+ void collect_glyphs (hb_collect_glyphs_context_t *c,
2023
+ ContextCollectGlyphsLookupContext &lookup_context) const
2024
+ {
2025
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2026
+ (inputZ.as_array (inputCount ? inputCount - 1 : 0));
2027
+ context_collect_glyphs_lookup (c,
2028
+ inputCount, inputZ.arrayZ,
2029
+ lookupCount, lookupRecord.arrayZ,
2030
+ lookup_context);
2031
+ }
2032
+
2033
+ bool would_apply (hb_would_apply_context_t *c,
2034
+ const ContextApplyLookupContext &lookup_context) const
2035
+ {
2036
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2037
+ (inputZ.as_array (inputCount ? inputCount - 1 : 0));
2038
+ return context_would_apply_lookup (c,
2039
+ inputCount, inputZ.arrayZ,
2040
+ lookupCount, lookupRecord.arrayZ,
2041
+ lookup_context);
2042
+ }
2043
+
2044
+ bool apply (hb_ot_apply_context_t *c,
2045
+ const ContextApplyLookupContext &lookup_context) const
2046
+ {
2047
+ TRACE_APPLY (this);
2048
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2049
+ (inputZ.as_array (inputCount ? inputCount - 1 : 0));
2050
+ return_trace (context_apply_lookup (c, inputCount, inputZ.arrayZ, lookupCount, lookupRecord.arrayZ, lookup_context));
2051
+ }
2052
+
2053
+ bool serialize (hb_serialize_context_t *c,
2054
+ const hb_map_t *input_mapping, /* old->new glyphid or class mapping */
2055
+ const hb_map_t *lookup_map) const
2056
+ {
2057
+ TRACE_SERIALIZE (this);
2058
+ auto *out = c->start_embed (this);
2059
+ if (unlikely (!c->extend_min (out))) return_trace (false);
2060
+
2061
+ out->inputCount = inputCount;
2062
+ const auto input = inputZ.as_array (inputCount - 1);
2063
+ for (const auto org : input)
2064
+ {
2065
+ HBUINT16 d;
2066
+ d = input_mapping->get (org);
2067
+ c->copy (d);
2068
+ }
2069
+
2070
+ const auto &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
2071
+ (inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
2072
+
2073
+ unsigned count = serialize_lookuprecord_array (c, lookupRecord.as_array (lookupCount), lookup_map);
2074
+ return_trace (c->check_assign (out->lookupCount, count, HB_SERIALIZE_ERROR_INT_OVERFLOW));
2075
+ }
2076
+
2077
+ bool subset (hb_subset_context_t *c,
2078
+ const hb_map_t *lookup_map,
2079
+ const hb_map_t *klass_map = nullptr) const
2080
+ {
2081
+ TRACE_SUBSET (this);
2082
+ if (unlikely (!inputCount)) return_trace (false);
2083
+ const auto input = inputZ.as_array (inputCount - 1);
2084
+
2085
+ const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
2086
+ if (!hb_all (input, mapping)) return_trace (false);
2087
+ return_trace (serialize (c->serializer, mapping, lookup_map));
2088
+ }
2089
+
2090
+ public:
2091
+ bool sanitize (hb_sanitize_context_t *c) const
2092
+ {
2093
+ TRACE_SANITIZE (this);
2094
+ return_trace (c->check_struct (this) &&
2095
+ hb_barrier () &&
2096
+ c->check_range (inputZ.arrayZ,
2097
+ inputZ.item_size * (inputCount ? inputCount - 1 : 0) +
2098
+ LookupRecord::static_size * lookupCount));
2099
+ }
2100
+
2101
+ protected:
2102
+ HBUINT16 inputCount; /* Total number of glyphs in input
2103
+ * glyph sequence--includes the first
2104
+ * glyph */
2105
+ HBUINT16 lookupCount; /* Number of LookupRecords */
2106
+ UnsizedArrayOf<typename Types::HBUINT>
2107
+ inputZ; /* Array of match inputs--start with
2108
+ * second glyph */
2109
+ /*UnsizedArrayOf<LookupRecord>
2110
+ lookupRecordX;*/ /* Array of LookupRecords--in
2111
+ * design order */
2112
+ public:
2113
+ DEFINE_SIZE_ARRAY (4, inputZ);
2114
+ };
2115
+
2116
+ template <typename Types>
2117
+ struct RuleSet
2118
+ {
2119
+ using Rule = OT::Rule<Types>;
2120
+
2121
+ bool intersects (const hb_set_t *glyphs,
2122
+ ContextClosureLookupContext &lookup_context) const
2123
+ {
2124
+ return
2125
+ + hb_iter (rule)
2126
+ | hb_map (hb_add (this))
2127
+ | hb_map ([&] (const Rule &_) { return _.intersects (glyphs, lookup_context); })
2128
+ | hb_any
2129
+ ;
2130
+ }
2131
+
2132
+ void closure (hb_closure_context_t *c, unsigned value,
2133
+ ContextClosureLookupContext &lookup_context) const
2134
+ {
2135
+ if (unlikely (c->lookup_limit_exceeded ())) return;
2136
+
2137
+ return
2138
+ + hb_iter (rule)
2139
+ | hb_map (hb_add (this))
2140
+ | hb_apply ([&] (const Rule &_) { _.closure (c, value, lookup_context); })
2141
+ ;
2142
+ }
2143
+
2144
+ void closure_lookups (hb_closure_lookups_context_t *c,
2145
+ ContextClosureLookupContext &lookup_context) const
2146
+ {
2147
+ if (unlikely (c->lookup_limit_exceeded ())) return;
2148
+ + hb_iter (rule)
2149
+ | hb_map (hb_add (this))
2150
+ | hb_apply ([&] (const Rule &_) { _.closure_lookups (c, lookup_context); })
2151
+ ;
2152
+ }
2153
+
2154
+ void collect_glyphs (hb_collect_glyphs_context_t *c,
2155
+ ContextCollectGlyphsLookupContext &lookup_context) const
2156
+ {
2157
+ return
2158
+ + hb_iter (rule)
2159
+ | hb_map (hb_add (this))
2160
+ | hb_apply ([&] (const Rule &_) { _.collect_glyphs (c, lookup_context); })
2161
+ ;
2162
+ }
2163
+
2164
+ bool would_apply (hb_would_apply_context_t *c,
2165
+ const ContextApplyLookupContext &lookup_context) const
2166
+ {
2167
+ return
2168
+ + hb_iter (rule)
2169
+ | hb_map (hb_add (this))
2170
+ | hb_map ([&] (const Rule &_) { return _.would_apply (c, lookup_context); })
2171
+ | hb_any
2172
+ ;
2173
+ }
2174
+
2175
+ bool apply (hb_ot_apply_context_t *c,
2176
+ const ContextApplyLookupContext &lookup_context) const
2177
+ {
2178
+ TRACE_APPLY (this);
2179
+
2180
+ unsigned num_rules = rule.len;
2181
+
2182
+ #ifndef HB_NO_OT_RULESETS_FAST_PATH
2183
+ if (HB_OPTIMIZE_SIZE_VAL || num_rules <= 4)
2184
+ #endif
2185
+ {
2186
+ slow:
2187
+ return_trace (
2188
+ + hb_iter (rule)
2189
+ | hb_map (hb_add (this))
2190
+ | hb_map ([&] (const Rule &_) { return _.apply (c, lookup_context); })
2191
+ | hb_any
2192
+ )
2193
+ ;
2194
+ }
2195
+
2196
+ /* This version is optimized for speed by matching the first & second
2197
+ * components of the rule here, instead of calling into the matching code.
2198
+ *
2199
+ * Replicated from LigatureSet::apply(). */
2200
+
2201
+ hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
2202
+ skippy_iter.reset (c->buffer->idx);
2203
+ skippy_iter.set_match_func (match_always, nullptr);
2204
+ skippy_iter.set_glyph_data ((HBUINT16 *) nullptr);
2205
+ unsigned unsafe_to = (unsigned) -1, unsafe_to1 = 0, unsafe_to2 = 0;
2206
+ hb_glyph_info_t *first = nullptr, *second = nullptr;
2207
+ bool matched = skippy_iter.next ();
2208
+ if (likely (matched))
2209
+ {
2210
+ first = &c->buffer->info[skippy_iter.idx];
2211
+ unsafe_to = skippy_iter.idx + 1;
2212
+
2213
+ if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx]))
2214
+ {
2215
+ /* Can't use the fast path if eg. the next char is a default-ignorable
2216
+ * or other skippable. */
2217
+ goto slow;
2218
+ }
2219
+ }
2220
+ else
2221
+ {
2222
+ /* Failed to match a next glyph. Only try applying rules that have
2223
+ * no further input. */
2224
+ return_trace (
2225
+ + hb_iter (rule)
2226
+ | hb_map (hb_add (this))
2227
+ | hb_filter ([&] (const Rule &_) { return _.inputCount <= 1; })
2228
+ | hb_map ([&] (const Rule &_) { return _.apply (c, lookup_context); })
2229
+ | hb_any
2230
+ )
2231
+ ;
2232
+ }
2233
+ matched = skippy_iter.next ();
2234
+ if (likely (matched && !skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])))
2235
+ {
2236
+ second = &c->buffer->info[skippy_iter.idx];
2237
+ unsafe_to2 = skippy_iter.idx + 1;
2238
+ }
2239
+
2240
+ auto match_input = lookup_context.funcs.match;
2241
+ auto *input_data = lookup_context.match_data;
2242
+ for (unsigned int i = 0; i < num_rules; i++)
2243
+ {
2244
+ const auto &r = this+rule.arrayZ[i];
2245
+
2246
+ const auto &input = r.inputZ;
2247
+
2248
+ if (r.inputCount <= 1 ||
2249
+ (!match_input ||
2250
+ match_input (*first, input.arrayZ[0], input_data)))
2251
+ {
2252
+ if (!second ||
2253
+ (r.inputCount <= 2 ||
2254
+ (!match_input ||
2255
+ match_input (*second, input.arrayZ[1], input_data)))
2256
+ )
2257
+ {
2258
+ if (r.apply (c, lookup_context))
2259
+ {
2260
+ if (unsafe_to != (unsigned) -1)
2261
+ c->buffer->unsafe_to_concat (c->buffer->idx, unsafe_to);
2262
+ return_trace (true);
2263
+ }
2264
+ }
2265
+ else
2266
+ unsafe_to = unsafe_to2;
2267
+ }
2268
+ else
2269
+ {
2270
+ if (unsafe_to == (unsigned) -1)
2271
+ unsafe_to = unsafe_to1;
2272
+ }
2273
+ }
2274
+ if (likely (unsafe_to != (unsigned) -1))
2275
+ c->buffer->unsafe_to_concat (c->buffer->idx, unsafe_to);
2276
+
2277
+ return_trace (false);
2278
+ }
2279
+
2280
+ bool subset (hb_subset_context_t *c,
2281
+ const hb_map_t *lookup_map,
2282
+ const hb_map_t *klass_map = nullptr) const
2283
+ {
2284
+ TRACE_SUBSET (this);
2285
+
2286
+ auto snap = c->serializer->snapshot ();
2287
+ auto *out = c->serializer->start_embed (*this);
2288
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2289
+
2290
+ for (const Offset16To<Rule>& _ : rule)
2291
+ {
2292
+ if (!_) continue;
2293
+ auto o_snap = c->serializer->snapshot ();
2294
+ auto *o = out->rule.serialize_append (c->serializer);
2295
+ if (unlikely (!o)) continue;
2296
+
2297
+ if (!o->serialize_subset (c, _, this, lookup_map, klass_map))
2298
+ {
2299
+ out->rule.pop ();
2300
+ c->serializer->revert (o_snap);
2301
+ }
2302
+ }
2303
+
2304
+ bool ret = bool (out->rule);
2305
+ if (!ret) c->serializer->revert (snap);
2306
+
2307
+ return_trace (ret);
2308
+ }
2309
+
2310
+ bool sanitize (hb_sanitize_context_t *c) const
2311
+ {
2312
+ TRACE_SANITIZE (this);
2313
+ return_trace (rule.sanitize (c, this));
2314
+ }
2315
+
2316
+ protected:
2317
+ Array16OfOffset16To<Rule>
2318
+ rule; /* Array of Rule tables
2319
+ * ordered by preference */
2320
+ public:
2321
+ DEFINE_SIZE_ARRAY (2, rule);
2322
+ };
2323
+
2324
+
2325
+ template <typename Types>
2326
+ struct ContextFormat1_4
2327
+ {
2328
+ using RuleSet = OT::RuleSet<Types>;
2329
+
2330
+ bool intersects (const hb_set_t *glyphs) const
2331
+ {
2332
+ struct ContextClosureLookupContext lookup_context = {
2333
+ {intersects_glyph, intersected_glyph},
2334
+ ContextFormat::SimpleContext,
2335
+ nullptr
2336
+ };
2337
+
2338
+ return
2339
+ + hb_zip (this+coverage, ruleSet)
2340
+ | hb_filter (*glyphs, hb_first)
2341
+ | hb_map (hb_second)
2342
+ | hb_map (hb_add (this))
2343
+ | hb_map ([&] (const RuleSet &_) { return _.intersects (glyphs, lookup_context); })
2344
+ | hb_any
2345
+ ;
2346
+ }
2347
+
2348
+ bool may_have_non_1to1 () const
2349
+ { return true; }
2350
+
2351
+ void closure (hb_closure_context_t *c) const
2352
+ {
2353
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
2354
+ if (unlikely (!cur_active_glyphs)) return;
2355
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (), *cur_active_glyphs);
2356
+
2357
+ struct ContextClosureLookupContext lookup_context = {
2358
+ {intersects_glyph, intersected_glyph},
2359
+ ContextFormat::SimpleContext,
2360
+ nullptr
2361
+ };
2362
+
2363
+ + hb_zip (this+coverage, hb_range ((unsigned) ruleSet.len))
2364
+ | hb_filter ([&] (hb_codepoint_t _) {
2365
+ return c->previous_parent_active_glyphs ().has (_);
2366
+ }, hb_first)
2367
+ | hb_map ([&](const hb_pair_t<hb_codepoint_t, unsigned> _) { return hb_pair_t<unsigned, const RuleSet&> (_.first, this+ruleSet[_.second]); })
2368
+ | hb_apply ([&] (const hb_pair_t<unsigned, const RuleSet&>& _) { _.second.closure (c, _.first, lookup_context); })
2369
+ ;
2370
+
2371
+ c->pop_cur_done_glyphs ();
2372
+ }
2373
+
2374
+ void closure_lookups (hb_closure_lookups_context_t *c) const
2375
+ {
2376
+ struct ContextClosureLookupContext lookup_context = {
2377
+ {intersects_glyph, nullptr},
2378
+ ContextFormat::SimpleContext,
2379
+ nullptr
2380
+ };
2381
+
2382
+ + hb_zip (this+coverage, ruleSet)
2383
+ | hb_filter (*c->glyphs, hb_first)
2384
+ | hb_map (hb_second)
2385
+ | hb_map (hb_add (this))
2386
+ | hb_apply ([&] (const RuleSet &_) { _.closure_lookups (c, lookup_context); })
2387
+ ;
2388
+ }
2389
+
2390
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
2391
+
2392
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
2393
+ {
2394
+ (this+coverage).collect_coverage (c->input);
2395
+
2396
+ struct ContextCollectGlyphsLookupContext lookup_context = {
2397
+ {collect_glyph},
2398
+ nullptr
2399
+ };
2400
+
2401
+ + hb_iter (ruleSet)
2402
+ | hb_map (hb_add (this))
2403
+ | hb_apply ([&] (const RuleSet &_) { _.collect_glyphs (c, lookup_context); })
2404
+ ;
2405
+ }
2406
+
2407
+ bool would_apply (hb_would_apply_context_t *c) const
2408
+ {
2409
+ const RuleSet &rule_set = this+ruleSet[(this+coverage).get_coverage (c->glyphs[0])];
2410
+ struct ContextApplyLookupContext lookup_context = {
2411
+ {match_glyph},
2412
+ nullptr
2413
+ };
2414
+ return rule_set.would_apply (c, lookup_context);
2415
+ }
2416
+
2417
+ const Coverage &get_coverage () const { return this+coverage; }
2418
+
2419
+ bool apply (hb_ot_apply_context_t *c) const
2420
+ {
2421
+ TRACE_APPLY (this);
2422
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
2423
+ if (likely (index == NOT_COVERED))
2424
+ return_trace (false);
2425
+
2426
+ const RuleSet &rule_set = this+ruleSet[index];
2427
+ struct ContextApplyLookupContext lookup_context = {
2428
+ {match_glyph},
2429
+ nullptr
2430
+ };
2431
+ return_trace (rule_set.apply (c, lookup_context));
2432
+ }
2433
+
2434
+ bool subset (hb_subset_context_t *c) const
2435
+ {
2436
+ TRACE_SUBSET (this);
2437
+ const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
2438
+ const hb_map_t &glyph_map = *c->plan->glyph_map;
2439
+
2440
+ auto *out = c->serializer->start_embed (*this);
2441
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2442
+ out->format = format;
2443
+
2444
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
2445
+ hb_sorted_vector_t<hb_codepoint_t> new_coverage;
2446
+ + hb_zip (this+coverage, ruleSet)
2447
+ | hb_filter (glyphset, hb_first)
2448
+ | hb_filter (subset_offset_array (c, out->ruleSet, this, lookup_map), hb_second)
2449
+ | hb_map (hb_first)
2450
+ | hb_map (glyph_map)
2451
+ | hb_sink (new_coverage)
2452
+ ;
2453
+
2454
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
2455
+ return_trace (bool (new_coverage));
2456
+ }
2457
+
2458
+ bool sanitize (hb_sanitize_context_t *c) const
2459
+ {
2460
+ TRACE_SANITIZE (this);
2461
+ return_trace (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
2462
+ }
2463
+
2464
+ protected:
2465
+ HBUINT16 format; /* Format identifier--format = 1 */
2466
+ typename Types::template OffsetTo<Coverage>
2467
+ coverage; /* Offset to Coverage table--from
2468
+ * beginning of table */
2469
+ Array16Of<typename Types::template OffsetTo<RuleSet>>
2470
+ ruleSet; /* Array of RuleSet tables
2471
+ * ordered by Coverage Index */
2472
+ public:
2473
+ DEFINE_SIZE_ARRAY (2 + 2 * Types::size, ruleSet);
2474
+ };
2475
+
2476
+
2477
+ template <typename Types>
2478
+ struct ContextFormat2_5
2479
+ {
2480
+ using RuleSet = OT::RuleSet<SmallTypes>;
2481
+
2482
+ bool intersects (const hb_set_t *glyphs) const
2483
+ {
2484
+ if (!(this+coverage).intersects (glyphs))
2485
+ return false;
2486
+
2487
+ const ClassDef &class_def = this+classDef;
2488
+
2489
+ hb_map_t cache;
2490
+ struct ContextClosureLookupContext lookup_context = {
2491
+ {intersects_class, nullptr},
2492
+ ContextFormat::ClassBasedContext,
2493
+ &class_def,
2494
+ &cache
2495
+ };
2496
+
2497
+ hb_set_t retained_coverage_glyphs;
2498
+ (this+coverage).intersect_set (*glyphs, retained_coverage_glyphs);
2499
+
2500
+ hb_set_t coverage_glyph_classes;
2501
+ class_def.intersected_classes (&retained_coverage_glyphs, &coverage_glyph_classes);
2502
+
2503
+
2504
+ return
2505
+ + hb_iter (ruleSet)
2506
+ | hb_map (hb_add (this))
2507
+ | hb_enumerate
2508
+ | hb_map ([&] (const hb_pair_t<unsigned, const RuleSet &> p)
2509
+ { return class_def.intersects_class (glyphs, p.first) &&
2510
+ coverage_glyph_classes.has (p.first) &&
2511
+ p.second.intersects (glyphs, lookup_context); })
2512
+ | hb_any
2513
+ ;
2514
+ }
2515
+
2516
+ bool may_have_non_1to1 () const
2517
+ { return true; }
2518
+
2519
+ void closure (hb_closure_context_t *c) const
2520
+ {
2521
+ if (!(this+coverage).intersects (c->glyphs))
2522
+ return;
2523
+
2524
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
2525
+ if (unlikely (!cur_active_glyphs)) return;
2526
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (),
2527
+ *cur_active_glyphs);
2528
+
2529
+ const ClassDef &class_def = this+classDef;
2530
+
2531
+ hb_map_t cache;
2532
+ intersected_class_cache_t intersected_cache;
2533
+ struct ContextClosureLookupContext lookup_context = {
2534
+ {intersects_class, intersected_class_glyphs},
2535
+ ContextFormat::ClassBasedContext,
2536
+ &class_def,
2537
+ &cache,
2538
+ &intersected_cache
2539
+ };
2540
+
2541
+ + hb_enumerate (ruleSet)
2542
+ | hb_filter ([&] (unsigned _)
2543
+ { return class_def.intersects_class (&c->parent_active_glyphs (), _); },
2544
+ hb_first)
2545
+ | hb_apply ([&] (const hb_pair_t<unsigned, const typename Types::template OffsetTo<RuleSet>&> _)
2546
+ {
2547
+ const RuleSet& rule_set = this+_.second;
2548
+ rule_set.closure (c, _.first, lookup_context);
2549
+ })
2550
+ ;
2551
+
2552
+ c->pop_cur_done_glyphs ();
2553
+ }
2554
+
2555
+ void closure_lookups (hb_closure_lookups_context_t *c) const
2556
+ {
2557
+ if (!(this+coverage).intersects (c->glyphs))
2558
+ return;
2559
+
2560
+ const ClassDef &class_def = this+classDef;
2561
+
2562
+ hb_map_t cache;
2563
+ struct ContextClosureLookupContext lookup_context = {
2564
+ {intersects_class, nullptr},
2565
+ ContextFormat::ClassBasedContext,
2566
+ &class_def,
2567
+ &cache
2568
+ };
2569
+
2570
+ + hb_iter (ruleSet)
2571
+ | hb_map (hb_add (this))
2572
+ | hb_enumerate
2573
+ | hb_filter ([&] (const hb_pair_t<unsigned, const RuleSet &> p)
2574
+ { return class_def.intersects_class (c->glyphs, p.first); })
2575
+ | hb_map (hb_second)
2576
+ | hb_apply ([&] (const RuleSet & _)
2577
+ { _.closure_lookups (c, lookup_context); });
2578
+ }
2579
+
2580
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
2581
+
2582
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
2583
+ {
2584
+ (this+coverage).collect_coverage (c->input);
2585
+
2586
+ const ClassDef &class_def = this+classDef;
2587
+ struct ContextCollectGlyphsLookupContext lookup_context = {
2588
+ {collect_class},
2589
+ &class_def
2590
+ };
2591
+
2592
+ + hb_iter (ruleSet)
2593
+ | hb_map (hb_add (this))
2594
+ | hb_apply ([&] (const RuleSet &_) { _.collect_glyphs (c, lookup_context); })
2595
+ ;
2596
+ }
2597
+
2598
+ bool would_apply (hb_would_apply_context_t *c) const
2599
+ {
2600
+ const ClassDef &class_def = this+classDef;
2601
+ unsigned int index = class_def.get_class (c->glyphs[0]);
2602
+ const RuleSet &rule_set = this+ruleSet[index];
2603
+ struct ContextApplyLookupContext lookup_context = {
2604
+ {match_class},
2605
+ &class_def
2606
+ };
2607
+ return rule_set.would_apply (c, lookup_context);
2608
+ }
2609
+
2610
+ const Coverage &get_coverage () const { return this+coverage; }
2611
+
2612
+ unsigned cache_cost () const
2613
+ {
2614
+ unsigned c = (this+classDef).cost () * ruleSet.len;
2615
+ return c >= 4 ? c : 0;
2616
+ }
2617
+ bool cache_func (hb_ot_apply_context_t *c, bool enter) const
2618
+ {
2619
+ if (enter)
2620
+ {
2621
+ if (!HB_BUFFER_TRY_ALLOCATE_VAR (c->buffer, syllable))
2622
+ return false;
2623
+ auto &info = c->buffer->info;
2624
+ unsigned count = c->buffer->len;
2625
+ for (unsigned i = 0; i < count; i++)
2626
+ info[i].syllable() = 255;
2627
+ c->new_syllables = 255;
2628
+ return true;
2629
+ }
2630
+ else
2631
+ {
2632
+ c->new_syllables = (unsigned) -1;
2633
+ HB_BUFFER_DEALLOCATE_VAR (c->buffer, syllable);
2634
+ return true;
2635
+ }
2636
+ }
2637
+
2638
+ bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); }
2639
+ bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); }
2640
+ bool _apply (hb_ot_apply_context_t *c, bool cached) const
2641
+ {
2642
+ TRACE_APPLY (this);
2643
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
2644
+ if (likely (index == NOT_COVERED)) return_trace (false);
2645
+
2646
+ const ClassDef &class_def = this+classDef;
2647
+
2648
+ struct ContextApplyLookupContext lookup_context = {
2649
+ {cached ? match_class_cached : match_class},
2650
+ &class_def
2651
+ };
2652
+
2653
+ if (cached && c->buffer->cur().syllable() < 255)
2654
+ index = c->buffer->cur().syllable ();
2655
+ else
2656
+ index = class_def.get_class (c->buffer->cur().codepoint);
2657
+ const RuleSet &rule_set = this+ruleSet[index];
2658
+ return_trace (rule_set.apply (c, lookup_context));
2659
+ }
2660
+
2661
+ bool subset (hb_subset_context_t *c) const
2662
+ {
2663
+ TRACE_SUBSET (this);
2664
+ auto *out = c->serializer->start_embed (*this);
2665
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2666
+ out->format = format;
2667
+ if (unlikely (!out->coverage.serialize_subset (c, coverage, this)))
2668
+ return_trace (false);
2669
+
2670
+ hb_map_t klass_map;
2671
+ out->classDef.serialize_subset (c, classDef, this, &klass_map);
2672
+
2673
+ const hb_set_t* glyphset = c->plan->glyphset_gsub ();
2674
+ hb_set_t retained_coverage_glyphs;
2675
+ (this+coverage).intersect_set (*glyphset, retained_coverage_glyphs);
2676
+
2677
+ hb_set_t coverage_glyph_classes;
2678
+ (this+classDef).intersected_classes (&retained_coverage_glyphs, &coverage_glyph_classes);
2679
+
2680
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
2681
+ bool ret = true;
2682
+ int non_zero_index = -1, index = 0;
2683
+ auto snapshot = c->serializer->snapshot();
2684
+ for (const auto& _ : + hb_enumerate (ruleSet)
2685
+ | hb_filter (klass_map, hb_first))
2686
+ {
2687
+ auto *o = out->ruleSet.serialize_append (c->serializer);
2688
+ if (unlikely (!o))
2689
+ {
2690
+ ret = false;
2691
+ break;
2692
+ }
2693
+
2694
+ if (coverage_glyph_classes.has (_.first) &&
2695
+ o->serialize_subset (c, _.second, this, lookup_map, &klass_map)) {
2696
+ non_zero_index = index;
2697
+ snapshot = c->serializer->snapshot();
2698
+ }
2699
+
2700
+ index++;
2701
+ }
2702
+
2703
+ if (!ret || non_zero_index == -1) return_trace (false);
2704
+
2705
+ //prune empty trailing ruleSets
2706
+ --index;
2707
+ while (index > non_zero_index)
2708
+ {
2709
+ out->ruleSet.pop ();
2710
+ index--;
2711
+ }
2712
+ c->serializer->revert (snapshot);
2713
+
2714
+ return_trace (bool (out->ruleSet));
2715
+ }
2716
+
2717
+ bool sanitize (hb_sanitize_context_t *c) const
2718
+ {
2719
+ TRACE_SANITIZE (this);
2720
+ return_trace (coverage.sanitize (c, this) && classDef.sanitize (c, this) && ruleSet.sanitize (c, this));
2721
+ }
2722
+
2723
+ protected:
2724
+ HBUINT16 format; /* Format identifier--format = 2 */
2725
+ typename Types::template OffsetTo<Coverage>
2726
+ coverage; /* Offset to Coverage table--from
2727
+ * beginning of table */
2728
+ typename Types::template OffsetTo<ClassDef>
2729
+ classDef; /* Offset to glyph ClassDef table--from
2730
+ * beginning of table */
2731
+ Array16Of<typename Types::template OffsetTo<RuleSet>>
2732
+ ruleSet; /* Array of RuleSet tables
2733
+ * ordered by class */
2734
+ public:
2735
+ DEFINE_SIZE_ARRAY (4 + 2 * Types::size, ruleSet);
2736
+ };
2737
+
2738
+
2739
+ struct ContextFormat3
2740
+ {
2741
+ using RuleSet = OT::RuleSet<SmallTypes>;
2742
+
2743
+ bool intersects (const hb_set_t *glyphs) const
2744
+ {
2745
+ if (!(this+coverageZ[0]).intersects (glyphs))
2746
+ return false;
2747
+
2748
+ struct ContextClosureLookupContext lookup_context = {
2749
+ {intersects_coverage, nullptr},
2750
+ ContextFormat::CoverageBasedContext,
2751
+ this
2752
+ };
2753
+ return context_intersects (glyphs,
2754
+ glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
2755
+ lookup_context);
2756
+ }
2757
+
2758
+ bool may_have_non_1to1 () const
2759
+ { return true; }
2760
+
2761
+ void closure (hb_closure_context_t *c) const
2762
+ {
2763
+ if (!(this+coverageZ[0]).intersects (c->glyphs))
2764
+ return;
2765
+
2766
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
2767
+ if (unlikely (!cur_active_glyphs)) return;
2768
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (),
2769
+ *cur_active_glyphs);
2770
+
2771
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2772
+ struct ContextClosureLookupContext lookup_context = {
2773
+ {intersects_coverage, intersected_coverage_glyphs},
2774
+ ContextFormat::CoverageBasedContext,
2775
+ this
2776
+ };
2777
+ context_closure_lookup (c,
2778
+ glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
2779
+ lookupCount, lookupRecord,
2780
+ 0, lookup_context);
2781
+
2782
+ c->pop_cur_done_glyphs ();
2783
+ }
2784
+
2785
+ void closure_lookups (hb_closure_lookups_context_t *c) const
2786
+ {
2787
+ if (!intersects (c->glyphs))
2788
+ return;
2789
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2790
+ recurse_lookups (c, lookupCount, lookupRecord);
2791
+ }
2792
+
2793
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
2794
+
2795
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
2796
+ {
2797
+ (this+coverageZ[0]).collect_coverage (c->input);
2798
+
2799
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2800
+ struct ContextCollectGlyphsLookupContext lookup_context = {
2801
+ {collect_coverage},
2802
+ this
2803
+ };
2804
+
2805
+ context_collect_glyphs_lookup (c,
2806
+ glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
2807
+ lookupCount, lookupRecord,
2808
+ lookup_context);
2809
+ }
2810
+
2811
+ bool would_apply (hb_would_apply_context_t *c) const
2812
+ {
2813
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2814
+ struct ContextApplyLookupContext lookup_context = {
2815
+ {match_coverage},
2816
+ this
2817
+ };
2818
+ return context_would_apply_lookup (c,
2819
+ glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
2820
+ lookupCount, lookupRecord,
2821
+ lookup_context);
2822
+ }
2823
+
2824
+ const Coverage &get_coverage () const { return this+coverageZ[0]; }
2825
+
2826
+ bool apply (hb_ot_apply_context_t *c) const
2827
+ {
2828
+ TRACE_APPLY (this);
2829
+ unsigned int index = (this+coverageZ[0]).get_coverage (c->buffer->cur().codepoint);
2830
+ if (likely (index == NOT_COVERED)) return_trace (false);
2831
+
2832
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2833
+ struct ContextApplyLookupContext lookup_context = {
2834
+ {match_coverage},
2835
+ this
2836
+ };
2837
+ return_trace (context_apply_lookup (c, glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1), lookupCount, lookupRecord, lookup_context));
2838
+ }
2839
+
2840
+ bool subset (hb_subset_context_t *c) const
2841
+ {
2842
+ TRACE_SUBSET (this);
2843
+ auto *out = c->serializer->start_embed (this);
2844
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2845
+
2846
+ out->format = format;
2847
+ out->glyphCount = glyphCount;
2848
+
2849
+ auto coverages = coverageZ.as_array (glyphCount);
2850
+
2851
+ for (const Offset16To<Coverage>& offset : coverages)
2852
+ {
2853
+ /* TODO(subset) This looks like should not be necessary to write this way. */
2854
+ auto *o = c->serializer->allocate_size<Offset16To<Coverage>> (Offset16To<Coverage>::static_size);
2855
+ if (unlikely (!o)) return_trace (false);
2856
+ if (!o->serialize_subset (c, offset, this)) return_trace (false);
2857
+ }
2858
+
2859
+ const auto& lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>> (coverageZ.as_array (glyphCount));
2860
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
2861
+
2862
+
2863
+ unsigned count = serialize_lookuprecord_array (c->serializer, lookupRecord.as_array (lookupCount), lookup_map);
2864
+ return_trace (c->serializer->check_assign (out->lookupCount, count, HB_SERIALIZE_ERROR_INT_OVERFLOW));
2865
+ }
2866
+
2867
+ bool sanitize (hb_sanitize_context_t *c) const
2868
+ {
2869
+ TRACE_SANITIZE (this);
2870
+ if (unlikely (!c->check_struct (this))) return_trace (false);
2871
+ hb_barrier ();
2872
+ unsigned int count = glyphCount;
2873
+ if (unlikely (!count)) return_trace (false); /* We want to access coverageZ[0] freely. */
2874
+ if (unlikely (!c->check_array (coverageZ.arrayZ, count))) return_trace (false);
2875
+ for (unsigned int i = 0; i < count; i++)
2876
+ if (unlikely (!coverageZ[i].sanitize (c, this))) return_trace (false);
2877
+ const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2878
+ return_trace (likely (c->check_array (lookupRecord, lookupCount)));
2879
+ }
2880
+
2881
+ protected:
2882
+ HBUINT16 format; /* Format identifier--format = 3 */
2883
+ HBUINT16 glyphCount; /* Number of glyphs in the input glyph
2884
+ * sequence */
2885
+ HBUINT16 lookupCount; /* Number of LookupRecords */
2886
+ UnsizedArrayOf<Offset16To<Coverage>>
2887
+ coverageZ; /* Array of offsets to Coverage
2888
+ * table in glyph sequence order */
2889
+ /*UnsizedArrayOf<LookupRecord>
2890
+ lookupRecordX;*/ /* Array of LookupRecords--in
2891
+ * design order */
2892
+ public:
2893
+ DEFINE_SIZE_ARRAY (6, coverageZ);
2894
+ };
2895
+
2896
+ struct Context
2897
+ {
2898
+ template <typename context_t, typename ...Ts>
2899
+ typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
2900
+ {
2901
+ if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value ();
2902
+ TRACE_DISPATCH (this, u.format);
2903
+ switch (u.format) {
2904
+ case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
2905
+ case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
2906
+ case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
2907
+ #ifndef HB_NO_BEYOND_64K
2908
+ case 4: return_trace (c->dispatch (u.format4, std::forward<Ts> (ds)...));
2909
+ case 5: return_trace (c->dispatch (u.format5, std::forward<Ts> (ds)...));
2910
+ #endif
2911
+ default:return_trace (c->default_return_value ());
2912
+ }
2913
+ }
2914
+
2915
+ protected:
2916
+ union {
2917
+ HBUINT16 format; /* Format identifier */
2918
+ ContextFormat1_4<SmallTypes> format1;
2919
+ ContextFormat2_5<SmallTypes> format2;
2920
+ ContextFormat3 format3;
2921
+ #ifndef HB_NO_BEYOND_64K
2922
+ ContextFormat1_4<MediumTypes> format4;
2923
+ ContextFormat2_5<MediumTypes> format5;
2924
+ #endif
2925
+ } u;
2926
+ };
2927
+
2928
+
2929
+ /* Chaining Contextual lookups */
2930
+
2931
+ struct ChainContextClosureLookupContext
2932
+ {
2933
+ ContextClosureFuncs funcs;
2934
+ ContextFormat context_format;
2935
+ const void *intersects_data[3];
2936
+ void *intersects_cache[3];
2937
+ void *intersected_glyphs_cache;
2938
+ };
2939
+
2940
+ struct ChainContextCollectGlyphsLookupContext
2941
+ {
2942
+ ContextCollectGlyphsFuncs funcs;
2943
+ const void *collect_data[3];
2944
+ };
2945
+
2946
+ struct ChainContextApplyLookupContext
2947
+ {
2948
+ ChainContextApplyFuncs funcs;
2949
+ const void *match_data[3];
2950
+ };
2951
+
2952
+ template <typename HBUINT>
2953
+ static inline bool chain_context_intersects (const hb_set_t *glyphs,
2954
+ unsigned int backtrackCount,
2955
+ const HBUINT backtrack[],
2956
+ unsigned int inputCount, /* Including the first glyph (not matched) */
2957
+ const HBUINT input[], /* Array of input values--start with second glyph */
2958
+ unsigned int lookaheadCount,
2959
+ const HBUINT lookahead[],
2960
+ ChainContextClosureLookupContext &lookup_context)
2961
+ {
2962
+ return array_is_subset_of (glyphs,
2963
+ backtrackCount, backtrack,
2964
+ lookup_context.funcs.intersects,
2965
+ lookup_context.intersects_data[0],
2966
+ lookup_context.intersects_cache[0])
2967
+ && array_is_subset_of (glyphs,
2968
+ inputCount ? inputCount - 1 : 0, input,
2969
+ lookup_context.funcs.intersects,
2970
+ lookup_context.intersects_data[1],
2971
+ lookup_context.intersects_cache[1])
2972
+ && array_is_subset_of (glyphs,
2973
+ lookaheadCount, lookahead,
2974
+ lookup_context.funcs.intersects,
2975
+ lookup_context.intersects_data[2],
2976
+ lookup_context.intersects_cache[2]);
2977
+ }
2978
+
2979
+ template <typename HBUINT>
2980
+ static inline void chain_context_closure_lookup (hb_closure_context_t *c,
2981
+ unsigned int backtrackCount,
2982
+ const HBUINT backtrack[],
2983
+ unsigned int inputCount, /* Including the first glyph (not matched) */
2984
+ const HBUINT input[], /* Array of input values--start with second glyph */
2985
+ unsigned int lookaheadCount,
2986
+ const HBUINT lookahead[],
2987
+ unsigned int lookupCount,
2988
+ const LookupRecord lookupRecord[],
2989
+ unsigned value,
2990
+ ChainContextClosureLookupContext &lookup_context)
2991
+ {
2992
+ if (chain_context_intersects (c->glyphs,
2993
+ backtrackCount, backtrack,
2994
+ inputCount, input,
2995
+ lookaheadCount, lookahead,
2996
+ lookup_context))
2997
+ context_closure_recurse_lookups (c,
2998
+ inputCount, input,
2999
+ lookupCount, lookupRecord,
3000
+ value,
3001
+ lookup_context.context_format,
3002
+ lookup_context.intersects_data[1],
3003
+ lookup_context.funcs.intersected_glyphs,
3004
+ lookup_context.intersected_glyphs_cache);
3005
+ }
3006
+
3007
+ template <typename HBUINT>
3008
+ static inline void chain_context_collect_glyphs_lookup (hb_collect_glyphs_context_t *c,
3009
+ unsigned int backtrackCount,
3010
+ const HBUINT backtrack[],
3011
+ unsigned int inputCount, /* Including the first glyph (not matched) */
3012
+ const HBUINT input[], /* Array of input values--start with second glyph */
3013
+ unsigned int lookaheadCount,
3014
+ const HBUINT lookahead[],
3015
+ unsigned int lookupCount,
3016
+ const LookupRecord lookupRecord[],
3017
+ ChainContextCollectGlyphsLookupContext &lookup_context)
3018
+ {
3019
+ collect_array (c, c->before,
3020
+ backtrackCount, backtrack,
3021
+ lookup_context.funcs.collect, lookup_context.collect_data[0]);
3022
+ collect_array (c, c->input,
3023
+ inputCount ? inputCount - 1 : 0, input,
3024
+ lookup_context.funcs.collect, lookup_context.collect_data[1]);
3025
+ collect_array (c, c->after,
3026
+ lookaheadCount, lookahead,
3027
+ lookup_context.funcs.collect, lookup_context.collect_data[2]);
3028
+ recurse_lookups (c,
3029
+ lookupCount, lookupRecord);
3030
+ }
3031
+
3032
+ template <typename HBUINT>
3033
+ static inline bool chain_context_would_apply_lookup (hb_would_apply_context_t *c,
3034
+ unsigned int backtrackCount,
3035
+ const HBUINT backtrack[] HB_UNUSED,
3036
+ unsigned int inputCount, /* Including the first glyph (not matched) */
3037
+ const HBUINT input[], /* Array of input values--start with second glyph */
3038
+ unsigned int lookaheadCount,
3039
+ const HBUINT lookahead[] HB_UNUSED,
3040
+ unsigned int lookupCount HB_UNUSED,
3041
+ const LookupRecord lookupRecord[] HB_UNUSED,
3042
+ const ChainContextApplyLookupContext &lookup_context)
3043
+ {
3044
+ return (c->zero_context ? !backtrackCount && !lookaheadCount : true)
3045
+ && would_match_input (c,
3046
+ inputCount, input,
3047
+ lookup_context.funcs.match[1], lookup_context.match_data[1]);
3048
+ }
3049
+
3050
+ template <typename HBUINT>
3051
+ HB_ALWAYS_INLINE
3052
+ static bool chain_context_apply_lookup (hb_ot_apply_context_t *c,
3053
+ unsigned int backtrackCount,
3054
+ const HBUINT backtrack[],
3055
+ unsigned int inputCount, /* Including the first glyph (not matched) */
3056
+ const HBUINT input[], /* Array of input values--start with second glyph */
3057
+ unsigned int lookaheadCount,
3058
+ const HBUINT lookahead[],
3059
+ unsigned int lookupCount,
3060
+ const LookupRecord lookupRecord[],
3061
+ const ChainContextApplyLookupContext &lookup_context)
3062
+ {
3063
+ if (unlikely (inputCount > HB_MAX_CONTEXT_LENGTH)) return false;
3064
+ unsigned match_positions_stack[4];
3065
+ unsigned *match_positions = match_positions_stack;
3066
+ if (unlikely (inputCount > ARRAY_LENGTH (match_positions_stack)))
3067
+ {
3068
+ match_positions = (unsigned *) hb_malloc (hb_max (inputCount, 1u) * sizeof (match_positions[0]));
3069
+ if (unlikely (!match_positions))
3070
+ return false;
3071
+ }
3072
+
3073
+ unsigned start_index = c->buffer->out_len;
3074
+ unsigned end_index = c->buffer->idx;
3075
+ unsigned match_end = 0;
3076
+ bool ret = true;
3077
+ if (!(match_input (c,
3078
+ inputCount, input,
3079
+ lookup_context.funcs.match[1], lookup_context.match_data[1],
3080
+ &match_end, match_positions) && (end_index = match_end)
3081
+ && match_lookahead (c,
3082
+ lookaheadCount, lookahead,
3083
+ lookup_context.funcs.match[2], lookup_context.match_data[2],
3084
+ match_end, &end_index)))
3085
+ {
3086
+ c->buffer->unsafe_to_concat (c->buffer->idx, end_index);
3087
+ ret = false;
3088
+ goto done;
3089
+ }
3090
+
3091
+ if (!match_backtrack (c,
3092
+ backtrackCount, backtrack,
3093
+ lookup_context.funcs.match[0], lookup_context.match_data[0],
3094
+ &start_index))
3095
+ {
3096
+ c->buffer->unsafe_to_concat_from_outbuffer (start_index, end_index);
3097
+ ret = false;
3098
+ goto done;
3099
+ }
3100
+
3101
+ c->buffer->unsafe_to_break_from_outbuffer (start_index, end_index);
3102
+ apply_lookup (c,
3103
+ inputCount, match_positions,
3104
+ lookupCount, lookupRecord,
3105
+ match_end);
3106
+ done:
3107
+
3108
+ if (unlikely (match_positions != match_positions_stack))
3109
+ hb_free (match_positions);
3110
+
3111
+ return ret;
3112
+ }
3113
+
3114
+ template <typename Types>
3115
+ struct ChainRule
3116
+ {
3117
+ template <typename T>
3118
+ friend struct ChainRuleSet;
3119
+
3120
+ bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
3121
+ {
3122
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3123
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3124
+ return chain_context_intersects (glyphs,
3125
+ backtrack.len, backtrack.arrayZ,
3126
+ input.lenP1, input.arrayZ,
3127
+ lookahead.len, lookahead.arrayZ,
3128
+ lookup_context);
3129
+ }
3130
+
3131
+ void closure (hb_closure_context_t *c, unsigned value,
3132
+ ChainContextClosureLookupContext &lookup_context) const
3133
+ {
3134
+ if (unlikely (c->lookup_limit_exceeded ())) return;
3135
+
3136
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3137
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3138
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3139
+ chain_context_closure_lookup (c,
3140
+ backtrack.len, backtrack.arrayZ,
3141
+ input.lenP1, input.arrayZ,
3142
+ lookahead.len, lookahead.arrayZ,
3143
+ lookup.len, lookup.arrayZ,
3144
+ value,
3145
+ lookup_context);
3146
+ }
3147
+
3148
+ void closure_lookups (hb_closure_lookups_context_t *c,
3149
+ ChainContextClosureLookupContext &lookup_context) const
3150
+ {
3151
+ if (unlikely (c->lookup_limit_exceeded ())) return;
3152
+ if (!intersects (c->glyphs, lookup_context)) return;
3153
+
3154
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3155
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3156
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3157
+ recurse_lookups (c, lookup.len, lookup.arrayZ);
3158
+ }
3159
+
3160
+ void collect_glyphs (hb_collect_glyphs_context_t *c,
3161
+ ChainContextCollectGlyphsLookupContext &lookup_context) const
3162
+ {
3163
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3164
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3165
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3166
+ chain_context_collect_glyphs_lookup (c,
3167
+ backtrack.len, backtrack.arrayZ,
3168
+ input.lenP1, input.arrayZ,
3169
+ lookahead.len, lookahead.arrayZ,
3170
+ lookup.len, lookup.arrayZ,
3171
+ lookup_context);
3172
+ }
3173
+
3174
+ bool would_apply (hb_would_apply_context_t *c,
3175
+ const ChainContextApplyLookupContext &lookup_context) const
3176
+ {
3177
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3178
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3179
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3180
+ return chain_context_would_apply_lookup (c,
3181
+ backtrack.len, backtrack.arrayZ,
3182
+ input.lenP1, input.arrayZ,
3183
+ lookahead.len, lookahead.arrayZ, lookup.len,
3184
+ lookup.arrayZ, lookup_context);
3185
+ }
3186
+
3187
+ bool apply (hb_ot_apply_context_t *c,
3188
+ const ChainContextApplyLookupContext &lookup_context) const
3189
+ {
3190
+ TRACE_APPLY (this);
3191
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3192
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3193
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3194
+ return_trace (chain_context_apply_lookup (c,
3195
+ backtrack.len, backtrack.arrayZ,
3196
+ input.lenP1, input.arrayZ,
3197
+ lookahead.len, lookahead.arrayZ, lookup.len,
3198
+ lookup.arrayZ, lookup_context));
3199
+ }
3200
+
3201
+ template<typename Iterator,
3202
+ hb_requires (hb_is_iterator (Iterator))>
3203
+ void serialize_array (hb_serialize_context_t *c,
3204
+ HBUINT16 len,
3205
+ Iterator it) const
3206
+ {
3207
+ c->copy (len);
3208
+ for (const auto g : it)
3209
+ c->copy ((HBUINT16) g);
3210
+ }
3211
+
3212
+ bool serialize (hb_serialize_context_t *c,
3213
+ const hb_map_t *lookup_map,
3214
+ const hb_map_t *backtrack_map,
3215
+ const hb_map_t *input_map = nullptr,
3216
+ const hb_map_t *lookahead_map = nullptr) const
3217
+ {
3218
+ TRACE_SERIALIZE (this);
3219
+
3220
+ const hb_map_t *mapping = backtrack_map;
3221
+ serialize_array (c, backtrack.len, + backtrack.iter ()
3222
+ | hb_map (mapping));
3223
+
3224
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3225
+ if (input_map) mapping = input_map;
3226
+ serialize_array (c, input.lenP1, + input.iter ()
3227
+ | hb_map (mapping));
3228
+
3229
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3230
+ if (lookahead_map) mapping = lookahead_map;
3231
+ serialize_array (c, lookahead.len, + lookahead.iter ()
3232
+ | hb_map (mapping));
3233
+
3234
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3235
+
3236
+ HBUINT16* lookupCount = c->embed (&(lookup.len));
3237
+ if (!lookupCount) return_trace (false);
3238
+
3239
+ unsigned count = serialize_lookuprecord_array (c, lookup.as_array (), lookup_map);
3240
+ return_trace (c->check_assign (*lookupCount, count, HB_SERIALIZE_ERROR_INT_OVERFLOW));
3241
+ }
3242
+
3243
+ bool subset (hb_subset_context_t *c,
3244
+ const hb_map_t *lookup_map,
3245
+ const hb_map_t *backtrack_map = nullptr,
3246
+ const hb_map_t *input_map = nullptr,
3247
+ const hb_map_t *lookahead_map = nullptr) const
3248
+ {
3249
+ TRACE_SUBSET (this);
3250
+
3251
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3252
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3253
+
3254
+ if (!backtrack_map)
3255
+ {
3256
+ const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
3257
+ if (!hb_all (backtrack, glyphset) ||
3258
+ !hb_all (input, glyphset) ||
3259
+ !hb_all (lookahead, glyphset))
3260
+ return_trace (false);
3261
+
3262
+ serialize (c->serializer, lookup_map, c->plan->glyph_map);
3263
+ }
3264
+ else
3265
+ {
3266
+ if (!hb_all (backtrack, backtrack_map) ||
3267
+ !hb_all (input, input_map) ||
3268
+ !hb_all (lookahead, lookahead_map))
3269
+ return_trace (false);
3270
+
3271
+ serialize (c->serializer, lookup_map, backtrack_map, input_map, lookahead_map);
3272
+ }
3273
+
3274
+ return_trace (true);
3275
+ }
3276
+
3277
+ bool sanitize (hb_sanitize_context_t *c) const
3278
+ {
3279
+ TRACE_SANITIZE (this);
3280
+ /* Hyper-optimized sanitized because this is really hot. */
3281
+ if (unlikely (!backtrack.len.sanitize (c))) return_trace (false);
3282
+ hb_barrier ();
3283
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
3284
+ if (unlikely (!input.lenP1.sanitize (c))) return_trace (false);
3285
+ hb_barrier ();
3286
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
3287
+ if (unlikely (!lookahead.len.sanitize (c))) return_trace (false);
3288
+ hb_barrier ();
3289
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
3290
+ return_trace (likely (lookup.sanitize (c)));
3291
+ }
3292
+
3293
+ protected:
3294
+ Array16Of<typename Types::HBUINT>
3295
+ backtrack; /* Array of backtracking values
3296
+ * (to be matched before the input
3297
+ * sequence) */
3298
+ HeadlessArray16Of<typename Types::HBUINT>
3299
+ inputX; /* Array of input values (start with
3300
+ * second glyph) */
3301
+ Array16Of<typename Types::HBUINT>
3302
+ lookaheadX; /* Array of lookahead values's (to be
3303
+ * matched after the input sequence) */
3304
+ Array16Of<LookupRecord>
3305
+ lookupX; /* Array of LookupRecords--in
3306
+ * design order) */
3307
+ public:
3308
+ DEFINE_SIZE_MIN (8);
3309
+ };
3310
+
3311
+ template <typename Types>
3312
+ struct ChainRuleSet
3313
+ {
3314
+ using ChainRule = OT::ChainRule<Types>;
3315
+
3316
+ bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
3317
+ {
3318
+ return
3319
+ + hb_iter (rule)
3320
+ | hb_map (hb_add (this))
3321
+ | hb_map ([&] (const ChainRule &_) { return _.intersects (glyphs, lookup_context); })
3322
+ | hb_any
3323
+ ;
3324
+ }
3325
+ void closure (hb_closure_context_t *c, unsigned value, ChainContextClosureLookupContext &lookup_context) const
3326
+ {
3327
+ if (unlikely (c->lookup_limit_exceeded ())) return;
3328
+
3329
+ return
3330
+ + hb_iter (rule)
3331
+ | hb_map (hb_add (this))
3332
+ | hb_apply ([&] (const ChainRule &_) { _.closure (c, value, lookup_context); })
3333
+ ;
3334
+ }
3335
+
3336
+ void closure_lookups (hb_closure_lookups_context_t *c,
3337
+ ChainContextClosureLookupContext &lookup_context) const
3338
+ {
3339
+ if (unlikely (c->lookup_limit_exceeded ())) return;
3340
+
3341
+ + hb_iter (rule)
3342
+ | hb_map (hb_add (this))
3343
+ | hb_apply ([&] (const ChainRule &_) { _.closure_lookups (c, lookup_context); })
3344
+ ;
3345
+ }
3346
+
3347
+ void collect_glyphs (hb_collect_glyphs_context_t *c, ChainContextCollectGlyphsLookupContext &lookup_context) const
3348
+ {
3349
+ return
3350
+ + hb_iter (rule)
3351
+ | hb_map (hb_add (this))
3352
+ | hb_apply ([&] (const ChainRule &_) { _.collect_glyphs (c, lookup_context); })
3353
+ ;
3354
+ }
3355
+
3356
+ bool would_apply (hb_would_apply_context_t *c,
3357
+ const ChainContextApplyLookupContext &lookup_context) const
3358
+ {
3359
+ return
3360
+ + hb_iter (rule)
3361
+ | hb_map (hb_add (this))
3362
+ | hb_map ([&] (const ChainRule &_) { return _.would_apply (c, lookup_context); })
3363
+ | hb_any
3364
+ ;
3365
+ }
3366
+
3367
+ bool apply (hb_ot_apply_context_t *c,
3368
+ const ChainContextApplyLookupContext &lookup_context) const
3369
+ {
3370
+ TRACE_APPLY (this);
3371
+
3372
+ unsigned num_rules = rule.len;
3373
+
3374
+ #ifndef HB_NO_OT_RULESETS_FAST_PATH
3375
+ if (HB_OPTIMIZE_SIZE_VAL || num_rules <= 4)
3376
+ #endif
3377
+ {
3378
+ slow:
3379
+ return_trace (
3380
+ + hb_iter (rule)
3381
+ | hb_map (hb_add (this))
3382
+ | hb_map ([&] (const ChainRule &_) { return _.apply (c, lookup_context); })
3383
+ | hb_any
3384
+ )
3385
+ ;
3386
+ }
3387
+
3388
+ /* This version is optimized for speed by matching the first & second
3389
+ * components of the rule here, instead of calling into the matching code.
3390
+ *
3391
+ * Replicated from LigatureSet::apply(). */
3392
+
3393
+ hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
3394
+ skippy_iter.reset (c->buffer->idx);
3395
+ skippy_iter.set_match_func (match_always, nullptr);
3396
+ skippy_iter.set_glyph_data ((HBUINT16 *) nullptr);
3397
+ unsigned unsafe_to = (unsigned) -1, unsafe_to1 = 0, unsafe_to2 = 0;
3398
+ hb_glyph_info_t *first = nullptr, *second = nullptr;
3399
+ bool matched = skippy_iter.next ();
3400
+ if (likely (matched))
3401
+ {
3402
+ first = &c->buffer->info[skippy_iter.idx];
3403
+ unsafe_to1 = skippy_iter.idx + 1;
3404
+
3405
+ if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx]))
3406
+ {
3407
+ /* Can't use the fast path if eg. the next char is a default-ignorable
3408
+ * or other skippable. */
3409
+ goto slow;
3410
+ }
3411
+ }
3412
+ else
3413
+ {
3414
+ /* Failed to match a next glyph. Only try applying rules that have
3415
+ * no further input and lookahead. */
3416
+ return_trace (
3417
+ + hb_iter (rule)
3418
+ | hb_map (hb_add (this))
3419
+ | hb_filter ([&] (const ChainRule &_)
3420
+ {
3421
+ const auto &input = StructAfter<decltype (_.inputX)> (_.backtrack);
3422
+ const auto &lookahead = StructAfter<decltype (_.lookaheadX)> (input);
3423
+ return input.lenP1 <= 1 && lookahead.len == 0;
3424
+ })
3425
+ | hb_map ([&] (const ChainRule &_) { return _.apply (c, lookup_context); })
3426
+ | hb_any
3427
+ )
3428
+ ;
3429
+ }
3430
+ matched = skippy_iter.next ();
3431
+ if (likely (matched && !skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])))
3432
+ {
3433
+ second = &c->buffer->info[skippy_iter.idx];
3434
+ unsafe_to2 = skippy_iter.idx + 1;
3435
+ }
3436
+
3437
+ auto match_input = lookup_context.funcs.match[1];
3438
+ auto match_lookahead = lookup_context.funcs.match[2];
3439
+ auto *input_data = lookup_context.match_data[1];
3440
+ auto *lookahead_data = lookup_context.match_data[2];
3441
+ for (unsigned int i = 0; i < num_rules; i++)
3442
+ {
3443
+ const auto &r = this+rule.arrayZ[i];
3444
+
3445
+ const auto &input = StructAfter<decltype (r.inputX)> (r.backtrack);
3446
+ const auto &lookahead = StructAfter<decltype (r.lookaheadX)> (input);
3447
+
3448
+ unsigned lenP1 = hb_max ((unsigned) input.lenP1, 1u);
3449
+ if (lenP1 > 1 ?
3450
+ (!match_input ||
3451
+ match_input (*first, input.arrayZ[0], input_data))
3452
+ :
3453
+ (!lookahead.len || !match_lookahead ||
3454
+ match_lookahead (*first, lookahead.arrayZ[0], lookahead_data)))
3455
+ {
3456
+ if (!second ||
3457
+ (lenP1 > 2 ?
3458
+ (!match_input ||
3459
+ match_input (*second, input.arrayZ[1], input_data))
3460
+ :
3461
+ (lookahead.len <= 2 - lenP1 || !match_lookahead ||
3462
+ match_lookahead (*second, lookahead.arrayZ[2 - lenP1], lookahead_data))))
3463
+ {
3464
+ if (r.apply (c, lookup_context))
3465
+ {
3466
+ if (unsafe_to != (unsigned) -1)
3467
+ c->buffer->unsafe_to_concat (c->buffer->idx, unsafe_to);
3468
+ return_trace (true);
3469
+ }
3470
+ }
3471
+ else
3472
+ unsafe_to = unsafe_to2;
3473
+ }
3474
+ else
3475
+ {
3476
+ if (unsafe_to == (unsigned) -1)
3477
+ unsafe_to = unsafe_to1;
3478
+ }
3479
+ }
3480
+ if (likely (unsafe_to != (unsigned) -1))
3481
+ c->buffer->unsafe_to_concat (c->buffer->idx, unsafe_to);
3482
+
3483
+ return_trace (false);
3484
+ }
3485
+
3486
+ bool subset (hb_subset_context_t *c,
3487
+ const hb_map_t *lookup_map,
3488
+ const hb_map_t *backtrack_klass_map = nullptr,
3489
+ const hb_map_t *input_klass_map = nullptr,
3490
+ const hb_map_t *lookahead_klass_map = nullptr) const
3491
+ {
3492
+ TRACE_SUBSET (this);
3493
+
3494
+ auto snap = c->serializer->snapshot ();
3495
+ auto *out = c->serializer->start_embed (*this);
3496
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
3497
+
3498
+ for (const Offset16To<ChainRule>& _ : rule)
3499
+ {
3500
+ if (!_) continue;
3501
+ auto o_snap = c->serializer->snapshot ();
3502
+ auto *o = out->rule.serialize_append (c->serializer);
3503
+ if (unlikely (!o)) continue;
3504
+
3505
+ if (!o->serialize_subset (c, _, this,
3506
+ lookup_map,
3507
+ backtrack_klass_map,
3508
+ input_klass_map,
3509
+ lookahead_klass_map))
3510
+ {
3511
+ out->rule.pop ();
3512
+ c->serializer->revert (o_snap);
3513
+ }
3514
+ }
3515
+
3516
+ bool ret = bool (out->rule);
3517
+ if (!ret) c->serializer->revert (snap);
3518
+
3519
+ return_trace (ret);
3520
+ }
3521
+
3522
+ bool sanitize (hb_sanitize_context_t *c) const
3523
+ {
3524
+ TRACE_SANITIZE (this);
3525
+ return_trace (rule.sanitize (c, this));
3526
+ }
3527
+
3528
+ protected:
3529
+ Array16OfOffset16To<ChainRule>
3530
+ rule; /* Array of ChainRule tables
3531
+ * ordered by preference */
3532
+ public:
3533
+ DEFINE_SIZE_ARRAY (2, rule);
3534
+ };
3535
+
3536
+ template <typename Types>
3537
+ struct ChainContextFormat1_4
3538
+ {
3539
+ using ChainRuleSet = OT::ChainRuleSet<Types>;
3540
+
3541
+ bool intersects (const hb_set_t *glyphs) const
3542
+ {
3543
+ struct ChainContextClosureLookupContext lookup_context = {
3544
+ {intersects_glyph, intersected_glyph},
3545
+ ContextFormat::SimpleContext,
3546
+ {nullptr, nullptr, nullptr}
3547
+ };
3548
+
3549
+ return
3550
+ + hb_zip (this+coverage, ruleSet)
3551
+ | hb_filter (*glyphs, hb_first)
3552
+ | hb_map (hb_second)
3553
+ | hb_map (hb_add (this))
3554
+ | hb_map ([&] (const ChainRuleSet &_) { return _.intersects (glyphs, lookup_context); })
3555
+ | hb_any
3556
+ ;
3557
+ }
3558
+
3559
+ bool may_have_non_1to1 () const
3560
+ { return true; }
3561
+
3562
+ void closure (hb_closure_context_t *c) const
3563
+ {
3564
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
3565
+ if (unlikely (!cur_active_glyphs)) return;
3566
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (),
3567
+ *cur_active_glyphs);
3568
+
3569
+ struct ChainContextClosureLookupContext lookup_context = {
3570
+ {intersects_glyph, intersected_glyph},
3571
+ ContextFormat::SimpleContext,
3572
+ {nullptr, nullptr, nullptr}
3573
+ };
3574
+
3575
+ + hb_zip (this+coverage, hb_range ((unsigned) ruleSet.len))
3576
+ | hb_filter ([&] (hb_codepoint_t _) {
3577
+ return c->previous_parent_active_glyphs ().has (_);
3578
+ }, hb_first)
3579
+ | hb_map ([&](const hb_pair_t<hb_codepoint_t, unsigned> _) { return hb_pair_t<unsigned, const ChainRuleSet&> (_.first, this+ruleSet[_.second]); })
3580
+ | hb_apply ([&] (const hb_pair_t<unsigned, const ChainRuleSet&>& _) { _.second.closure (c, _.first, lookup_context); })
3581
+ ;
3582
+
3583
+ c->pop_cur_done_glyphs ();
3584
+ }
3585
+
3586
+ void closure_lookups (hb_closure_lookups_context_t *c) const
3587
+ {
3588
+ struct ChainContextClosureLookupContext lookup_context = {
3589
+ {intersects_glyph, nullptr},
3590
+ ContextFormat::SimpleContext,
3591
+ {nullptr, nullptr, nullptr}
3592
+ };
3593
+
3594
+ + hb_zip (this+coverage, ruleSet)
3595
+ | hb_filter (*c->glyphs, hb_first)
3596
+ | hb_map (hb_second)
3597
+ | hb_map (hb_add (this))
3598
+ | hb_apply ([&] (const ChainRuleSet &_) { _.closure_lookups (c, lookup_context); })
3599
+ ;
3600
+ }
3601
+
3602
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
3603
+
3604
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
3605
+ {
3606
+ (this+coverage).collect_coverage (c->input);
3607
+
3608
+ struct ChainContextCollectGlyphsLookupContext lookup_context = {
3609
+ {collect_glyph},
3610
+ {nullptr, nullptr, nullptr}
3611
+ };
3612
+
3613
+ + hb_iter (ruleSet)
3614
+ | hb_map (hb_add (this))
3615
+ | hb_apply ([&] (const ChainRuleSet &_) { _.collect_glyphs (c, lookup_context); })
3616
+ ;
3617
+ }
3618
+
3619
+ bool would_apply (hb_would_apply_context_t *c) const
3620
+ {
3621
+ const ChainRuleSet &rule_set = this+ruleSet[(this+coverage).get_coverage (c->glyphs[0])];
3622
+ struct ChainContextApplyLookupContext lookup_context = {
3623
+ {{match_glyph, match_glyph, match_glyph}},
3624
+ {nullptr, nullptr, nullptr}
3625
+ };
3626
+ return rule_set.would_apply (c, lookup_context);
3627
+ }
3628
+
3629
+ const Coverage &get_coverage () const { return this+coverage; }
3630
+
3631
+ bool apply (hb_ot_apply_context_t *c) const
3632
+ {
3633
+ TRACE_APPLY (this);
3634
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
3635
+ if (likely (index == NOT_COVERED)) return_trace (false);
3636
+
3637
+ const ChainRuleSet &rule_set = this+ruleSet[index];
3638
+ struct ChainContextApplyLookupContext lookup_context = {
3639
+ {{match_glyph, match_glyph, match_glyph}},
3640
+ {nullptr, nullptr, nullptr}
3641
+ };
3642
+ return_trace (rule_set.apply (c, lookup_context));
3643
+ }
3644
+
3645
+ bool subset (hb_subset_context_t *c) const
3646
+ {
3647
+ TRACE_SUBSET (this);
3648
+ const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
3649
+ const hb_map_t &glyph_map = *c->plan->glyph_map;
3650
+
3651
+ auto *out = c->serializer->start_embed (*this);
3652
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
3653
+ out->format = format;
3654
+
3655
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
3656
+ hb_sorted_vector_t<hb_codepoint_t> new_coverage;
3657
+ + hb_zip (this+coverage, ruleSet)
3658
+ | hb_filter (glyphset, hb_first)
3659
+ | hb_filter (subset_offset_array (c, out->ruleSet, this, lookup_map), hb_second)
3660
+ | hb_map (hb_first)
3661
+ | hb_map (glyph_map)
3662
+ | hb_sink (new_coverage)
3663
+ ;
3664
+
3665
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
3666
+ return_trace (bool (new_coverage));
3667
+ }
3668
+
3669
+ bool sanitize (hb_sanitize_context_t *c) const
3670
+ {
3671
+ TRACE_SANITIZE (this);
3672
+ return_trace (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
3673
+ }
3674
+
3675
+ protected:
3676
+ HBUINT16 format; /* Format identifier--format = 1 */
3677
+ typename Types::template OffsetTo<Coverage>
3678
+ coverage; /* Offset to Coverage table--from
3679
+ * beginning of table */
3680
+ Array16Of<typename Types::template OffsetTo<ChainRuleSet>>
3681
+ ruleSet; /* Array of ChainRuleSet tables
3682
+ * ordered by Coverage Index */
3683
+ public:
3684
+ DEFINE_SIZE_ARRAY (2 + 2 * Types::size, ruleSet);
3685
+ };
3686
+
3687
+ template <typename Types>
3688
+ struct ChainContextFormat2_5
3689
+ {
3690
+ using ChainRuleSet = OT::ChainRuleSet<SmallTypes>;
3691
+
3692
+ bool intersects (const hb_set_t *glyphs) const
3693
+ {
3694
+ if (!(this+coverage).intersects (glyphs))
3695
+ return false;
3696
+
3697
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3698
+ const ClassDef &input_class_def = this+inputClassDef;
3699
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3700
+
3701
+ hb_map_t caches[3] = {};
3702
+ struct ChainContextClosureLookupContext lookup_context = {
3703
+ {intersects_class, nullptr},
3704
+ ContextFormat::ClassBasedContext,
3705
+ {&backtrack_class_def,
3706
+ &input_class_def,
3707
+ &lookahead_class_def},
3708
+ {&caches[0], &caches[1], &caches[2]}
3709
+ };
3710
+
3711
+ hb_set_t retained_coverage_glyphs;
3712
+ (this+coverage).intersect_set (*glyphs, retained_coverage_glyphs);
3713
+
3714
+ hb_set_t coverage_glyph_classes;
3715
+ input_class_def.intersected_classes (&retained_coverage_glyphs, &coverage_glyph_classes);
3716
+
3717
+ return
3718
+ + hb_iter (ruleSet)
3719
+ | hb_map (hb_add (this))
3720
+ | hb_enumerate
3721
+ | hb_map ([&] (const hb_pair_t<unsigned, const ChainRuleSet &> p)
3722
+ { return input_class_def.intersects_class (glyphs, p.first) &&
3723
+ coverage_glyph_classes.has (p.first) &&
3724
+ p.second.intersects (glyphs, lookup_context); })
3725
+ | hb_any
3726
+ ;
3727
+ }
3728
+
3729
+ bool may_have_non_1to1 () const
3730
+ { return true; }
3731
+
3732
+ void closure (hb_closure_context_t *c) const
3733
+ {
3734
+ if (!(this+coverage).intersects (c->glyphs))
3735
+ return;
3736
+
3737
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
3738
+ if (unlikely (!cur_active_glyphs)) return;
3739
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (),
3740
+ *cur_active_glyphs);
3741
+
3742
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3743
+ const ClassDef &input_class_def = this+inputClassDef;
3744
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3745
+
3746
+ hb_map_t caches[3] = {};
3747
+ intersected_class_cache_t intersected_cache;
3748
+ struct ChainContextClosureLookupContext lookup_context = {
3749
+ {intersects_class, intersected_class_glyphs},
3750
+ ContextFormat::ClassBasedContext,
3751
+ {&backtrack_class_def,
3752
+ &input_class_def,
3753
+ &lookahead_class_def},
3754
+ {&caches[0], &caches[1], &caches[2]},
3755
+ &intersected_cache
3756
+ };
3757
+
3758
+ + hb_enumerate (ruleSet)
3759
+ | hb_filter ([&] (unsigned _)
3760
+ { return input_class_def.intersects_class (&c->parent_active_glyphs (), _); },
3761
+ hb_first)
3762
+ | hb_apply ([&] (const hb_pair_t<unsigned, const typename Types::template OffsetTo<ChainRuleSet>&> _)
3763
+ {
3764
+ const ChainRuleSet& chainrule_set = this+_.second;
3765
+ chainrule_set.closure (c, _.first, lookup_context);
3766
+ })
3767
+ ;
3768
+
3769
+ c->pop_cur_done_glyphs ();
3770
+ }
3771
+
3772
+ void closure_lookups (hb_closure_lookups_context_t *c) const
3773
+ {
3774
+ if (!(this+coverage).intersects (c->glyphs))
3775
+ return;
3776
+
3777
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3778
+ const ClassDef &input_class_def = this+inputClassDef;
3779
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3780
+
3781
+ hb_map_t caches[3] = {};
3782
+ struct ChainContextClosureLookupContext lookup_context = {
3783
+ {intersects_class, nullptr},
3784
+ ContextFormat::ClassBasedContext,
3785
+ {&backtrack_class_def,
3786
+ &input_class_def,
3787
+ &lookahead_class_def},
3788
+ {&caches[0], &caches[1], &caches[2]}
3789
+ };
3790
+
3791
+ + hb_iter (ruleSet)
3792
+ | hb_map (hb_add (this))
3793
+ | hb_enumerate
3794
+ | hb_filter([&] (unsigned klass)
3795
+ { return input_class_def.intersects_class (c->glyphs, klass); }, hb_first)
3796
+ | hb_map (hb_second)
3797
+ | hb_apply ([&] (const ChainRuleSet &_)
3798
+ { _.closure_lookups (c, lookup_context); })
3799
+ ;
3800
+ }
3801
+
3802
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
3803
+
3804
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
3805
+ {
3806
+ (this+coverage).collect_coverage (c->input);
3807
+
3808
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3809
+ const ClassDef &input_class_def = this+inputClassDef;
3810
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3811
+
3812
+ struct ChainContextCollectGlyphsLookupContext lookup_context = {
3813
+ {collect_class},
3814
+ {&backtrack_class_def,
3815
+ &input_class_def,
3816
+ &lookahead_class_def}
3817
+ };
3818
+
3819
+ + hb_iter (ruleSet)
3820
+ | hb_map (hb_add (this))
3821
+ | hb_apply ([&] (const ChainRuleSet &_) { _.collect_glyphs (c, lookup_context); })
3822
+ ;
3823
+ }
3824
+
3825
+ bool would_apply (hb_would_apply_context_t *c) const
3826
+ {
3827
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3828
+ const ClassDef &input_class_def = this+inputClassDef;
3829
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3830
+
3831
+ unsigned int index = input_class_def.get_class (c->glyphs[0]);
3832
+ const ChainRuleSet &rule_set = this+ruleSet[index];
3833
+ struct ChainContextApplyLookupContext lookup_context = {
3834
+ {{match_class, match_class, match_class}},
3835
+ {&backtrack_class_def,
3836
+ &input_class_def,
3837
+ &lookahead_class_def}
3838
+ };
3839
+ return rule_set.would_apply (c, lookup_context);
3840
+ }
3841
+
3842
+ const Coverage &get_coverage () const { return this+coverage; }
3843
+
3844
+ unsigned cache_cost () const
3845
+ {
3846
+ unsigned c = (this+lookaheadClassDef).cost () * ruleSet.len;
3847
+ return c >= 4 ? c : 0;
3848
+ }
3849
+ bool cache_func (hb_ot_apply_context_t *c, bool enter) const
3850
+ {
3851
+ if (enter)
3852
+ {
3853
+ if (!HB_BUFFER_TRY_ALLOCATE_VAR (c->buffer, syllable))
3854
+ return false;
3855
+ auto &info = c->buffer->info;
3856
+ unsigned count = c->buffer->len;
3857
+ for (unsigned i = 0; i < count; i++)
3858
+ info[i].syllable() = 255;
3859
+ c->new_syllables = 255;
3860
+ return true;
3861
+ }
3862
+ else
3863
+ {
3864
+ c->new_syllables = (unsigned) -1;
3865
+ HB_BUFFER_DEALLOCATE_VAR (c->buffer, syllable);
3866
+ return true;
3867
+ }
3868
+ }
3869
+
3870
+ bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); }
3871
+ bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); }
3872
+ bool _apply (hb_ot_apply_context_t *c, bool cached) const
3873
+ {
3874
+ TRACE_APPLY (this);
3875
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
3876
+ if (likely (index == NOT_COVERED)) return_trace (false);
3877
+
3878
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
3879
+ const ClassDef &input_class_def = this+inputClassDef;
3880
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
3881
+
3882
+ /* match_class_caches1 is slightly faster. Use it for lookahead,
3883
+ * which is typically longer. */
3884
+ struct ChainContextApplyLookupContext lookup_context = {
3885
+ {{cached && &backtrack_class_def == &lookahead_class_def ? match_class_cached1 : match_class,
3886
+ cached ? match_class_cached2 : match_class,
3887
+ cached ? match_class_cached1 : match_class}},
3888
+ {&backtrack_class_def,
3889
+ &input_class_def,
3890
+ &lookahead_class_def}
3891
+ };
3892
+
3893
+ // Note: Corresponds to match_class_cached2
3894
+ if (cached && ((c->buffer->cur().syllable() & 0xF0) >> 4) < 15)
3895
+ index = (c->buffer->cur().syllable () & 0xF0) >> 4;
3896
+ else
3897
+ index = input_class_def.get_class (c->buffer->cur().codepoint);
3898
+ const ChainRuleSet &rule_set = this+ruleSet[index];
3899
+ return_trace (rule_set.apply (c, lookup_context));
3900
+ }
3901
+
3902
+ bool subset (hb_subset_context_t *c) const
3903
+ {
3904
+ TRACE_SUBSET (this);
3905
+ auto *out = c->serializer->start_embed (*this);
3906
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
3907
+ out->format = format;
3908
+ out->coverage.serialize_subset (c, coverage, this);
3909
+
3910
+ hb_map_t backtrack_klass_map;
3911
+ hb_map_t input_klass_map;
3912
+ hb_map_t lookahead_klass_map;
3913
+
3914
+ out->backtrackClassDef.serialize_subset (c, backtrackClassDef, this, &backtrack_klass_map);
3915
+ // TODO: subset inputClassDef based on glyphs survived in Coverage subsetting
3916
+ out->inputClassDef.serialize_subset (c, inputClassDef, this, &input_klass_map);
3917
+ out->lookaheadClassDef.serialize_subset (c, lookaheadClassDef, this, &lookahead_klass_map);
3918
+
3919
+ if (unlikely (!c->serializer->propagate_error (backtrack_klass_map,
3920
+ input_klass_map,
3921
+ lookahead_klass_map)))
3922
+ return_trace (false);
3923
+
3924
+ const hb_set_t* glyphset = c->plan->glyphset_gsub ();
3925
+ hb_set_t retained_coverage_glyphs;
3926
+ (this+coverage).intersect_set (*glyphset, retained_coverage_glyphs);
3927
+
3928
+ hb_set_t coverage_glyph_classes;
3929
+ (this+inputClassDef).intersected_classes (&retained_coverage_glyphs, &coverage_glyph_classes);
3930
+
3931
+ int non_zero_index = -1, index = 0;
3932
+ bool ret = true;
3933
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
3934
+ auto last_non_zero = c->serializer->snapshot ();
3935
+ for (const auto& _ : + hb_enumerate (ruleSet)
3936
+ | hb_filter (input_klass_map, hb_first))
3937
+ {
3938
+ auto *o = out->ruleSet.serialize_append (c->serializer);
3939
+ if (unlikely (!o))
3940
+ {
3941
+ ret = false;
3942
+ break;
3943
+ }
3944
+ if (coverage_glyph_classes.has (_.first) &&
3945
+ o->serialize_subset (c, _.second, this,
3946
+ lookup_map,
3947
+ &backtrack_klass_map,
3948
+ &input_klass_map,
3949
+ &lookahead_klass_map))
3950
+ {
3951
+ last_non_zero = c->serializer->snapshot ();
3952
+ non_zero_index = index;
3953
+ }
3954
+
3955
+ index++;
3956
+ }
3957
+
3958
+ if (!ret || non_zero_index == -1) return_trace (false);
3959
+
3960
+ // prune empty trailing ruleSets
3961
+ if (index > non_zero_index) {
3962
+ c->serializer->revert (last_non_zero);
3963
+ out->ruleSet.len = non_zero_index + 1;
3964
+ }
3965
+
3966
+ return_trace (bool (out->ruleSet));
3967
+ }
3968
+
3969
+ bool sanitize (hb_sanitize_context_t *c) const
3970
+ {
3971
+ TRACE_SANITIZE (this);
3972
+ return_trace (coverage.sanitize (c, this) &&
3973
+ backtrackClassDef.sanitize (c, this) &&
3974
+ inputClassDef.sanitize (c, this) &&
3975
+ lookaheadClassDef.sanitize (c, this) &&
3976
+ ruleSet.sanitize (c, this));
3977
+ }
3978
+
3979
+ protected:
3980
+ HBUINT16 format; /* Format identifier--format = 2 */
3981
+ typename Types::template OffsetTo<Coverage>
3982
+ coverage; /* Offset to Coverage table--from
3983
+ * beginning of table */
3984
+ typename Types::template OffsetTo<ClassDef>
3985
+ backtrackClassDef; /* Offset to glyph ClassDef table
3986
+ * containing backtrack sequence
3987
+ * data--from beginning of table */
3988
+ typename Types::template OffsetTo<ClassDef>
3989
+ inputClassDef; /* Offset to glyph ClassDef
3990
+ * table containing input sequence
3991
+ * data--from beginning of table */
3992
+ typename Types::template OffsetTo<ClassDef>
3993
+ lookaheadClassDef; /* Offset to glyph ClassDef table
3994
+ * containing lookahead sequence
3995
+ * data--from beginning of table */
3996
+ Array16Of<typename Types::template OffsetTo<ChainRuleSet>>
3997
+ ruleSet; /* Array of ChainRuleSet tables
3998
+ * ordered by class */
3999
+ public:
4000
+ DEFINE_SIZE_ARRAY (4 + 4 * Types::size, ruleSet);
4001
+ };
4002
+
4003
+ struct ChainContextFormat3
4004
+ {
4005
+ using RuleSet = OT::RuleSet<SmallTypes>;
4006
+
4007
+ bool intersects (const hb_set_t *glyphs) const
4008
+ {
4009
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4010
+
4011
+ if (!(this+input[0]).intersects (glyphs))
4012
+ return false;
4013
+
4014
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4015
+ struct ChainContextClosureLookupContext lookup_context = {
4016
+ {intersects_coverage, nullptr},
4017
+ ContextFormat::CoverageBasedContext,
4018
+ {this, this, this}
4019
+ };
4020
+ return chain_context_intersects (glyphs,
4021
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
4022
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
4023
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
4024
+ lookup_context);
4025
+ }
4026
+
4027
+ bool may_have_non_1to1 () const
4028
+ { return true; }
4029
+
4030
+ void closure (hb_closure_context_t *c) const
4031
+ {
4032
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4033
+
4034
+ if (!(this+input[0]).intersects (c->glyphs))
4035
+ return;
4036
+
4037
+ hb_set_t* cur_active_glyphs = c->push_cur_active_glyphs ();
4038
+ if (unlikely (!cur_active_glyphs))
4039
+ return;
4040
+ get_coverage ().intersect_set (c->previous_parent_active_glyphs (),
4041
+ *cur_active_glyphs);
4042
+
4043
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4044
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4045
+ struct ChainContextClosureLookupContext lookup_context = {
4046
+ {intersects_coverage, intersected_coverage_glyphs},
4047
+ ContextFormat::CoverageBasedContext,
4048
+ {this, this, this}
4049
+ };
4050
+ chain_context_closure_lookup (c,
4051
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
4052
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
4053
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
4054
+ lookup.len, lookup.arrayZ,
4055
+ 0, lookup_context);
4056
+
4057
+ c->pop_cur_done_glyphs ();
4058
+ }
4059
+
4060
+ void closure_lookups (hb_closure_lookups_context_t *c) const
4061
+ {
4062
+ if (!intersects (c->glyphs))
4063
+ return;
4064
+
4065
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4066
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4067
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4068
+ recurse_lookups (c, lookup.len, lookup.arrayZ);
4069
+ }
4070
+
4071
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const {}
4072
+
4073
+ void collect_glyphs (hb_collect_glyphs_context_t *c) const
4074
+ {
4075
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4076
+
4077
+ (this+input[0]).collect_coverage (c->input);
4078
+
4079
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4080
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4081
+
4082
+ struct ChainContextCollectGlyphsLookupContext lookup_context = {
4083
+ {collect_coverage},
4084
+ {this, this, this}
4085
+ };
4086
+ chain_context_collect_glyphs_lookup (c,
4087
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
4088
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
4089
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
4090
+ lookup.len, lookup.arrayZ,
4091
+ lookup_context);
4092
+ }
4093
+
4094
+ bool would_apply (hb_would_apply_context_t *c) const
4095
+ {
4096
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4097
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4098
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4099
+ struct ChainContextApplyLookupContext lookup_context = {
4100
+ {{match_coverage, match_coverage, match_coverage}},
4101
+ {this, this, this}
4102
+ };
4103
+ return chain_context_would_apply_lookup (c,
4104
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
4105
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
4106
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
4107
+ lookup.len, lookup.arrayZ, lookup_context);
4108
+ }
4109
+
4110
+ const Coverage &get_coverage () const
4111
+ {
4112
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4113
+ return this+input[0];
4114
+ }
4115
+
4116
+ bool apply (hb_ot_apply_context_t *c) const
4117
+ {
4118
+ TRACE_APPLY (this);
4119
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4120
+
4121
+ unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
4122
+ if (likely (index == NOT_COVERED)) return_trace (false);
4123
+
4124
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4125
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4126
+ struct ChainContextApplyLookupContext lookup_context = {
4127
+ {{match_coverage, match_coverage, match_coverage}},
4128
+ {this, this, this}
4129
+ };
4130
+ return_trace (chain_context_apply_lookup (c,
4131
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
4132
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
4133
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
4134
+ lookup.len, lookup.arrayZ, lookup_context));
4135
+ }
4136
+
4137
+ template<typename Iterator,
4138
+ hb_requires (hb_is_iterator (Iterator))>
4139
+ bool serialize_coverage_offsets (hb_subset_context_t *c, Iterator it, const void* base) const
4140
+ {
4141
+ TRACE_SERIALIZE (this);
4142
+ auto *out = c->serializer->start_embed<Array16OfOffset16To<Coverage>> ();
4143
+
4144
+ if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size)))
4145
+ return_trace (false);
4146
+
4147
+ for (auto& offset : it) {
4148
+ auto *o = out->serialize_append (c->serializer);
4149
+ if (unlikely (!o) || !o->serialize_subset (c, offset, base))
4150
+ return_trace (false);
4151
+ }
4152
+
4153
+ return_trace (true);
4154
+ }
4155
+
4156
+ bool subset (hb_subset_context_t *c) const
4157
+ {
4158
+ TRACE_SUBSET (this);
4159
+
4160
+ if (unlikely (!c->serializer->embed (this->format))) return_trace (false);
4161
+
4162
+ if (!serialize_coverage_offsets (c, backtrack.iter (), this))
4163
+ return_trace (false);
4164
+
4165
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4166
+ if (!serialize_coverage_offsets (c, input.iter (), this))
4167
+ return_trace (false);
4168
+
4169
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4170
+ if (!serialize_coverage_offsets (c, lookahead.iter (), this))
4171
+ return_trace (false);
4172
+
4173
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4174
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups;
4175
+
4176
+ HBUINT16 *lookupCount = c->serializer->copy<HBUINT16> (lookup.len);
4177
+ if (!lookupCount) return_trace (false);
4178
+
4179
+ unsigned count = serialize_lookuprecord_array (c->serializer, lookup.as_array (), lookup_map);
4180
+ return_trace (c->serializer->check_assign (*lookupCount, count, HB_SERIALIZE_ERROR_INT_OVERFLOW));
4181
+ }
4182
+
4183
+ bool sanitize (hb_sanitize_context_t *c) const
4184
+ {
4185
+ TRACE_SANITIZE (this);
4186
+ if (unlikely (!backtrack.sanitize (c, this))) return_trace (false);
4187
+ hb_barrier ();
4188
+ const auto &input = StructAfter<decltype (inputX)> (backtrack);
4189
+ if (unlikely (!input.sanitize (c, this))) return_trace (false);
4190
+ hb_barrier ();
4191
+ if (unlikely (!input.len)) return_trace (false); /* To be consistent with Context. */
4192
+ const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
4193
+ if (unlikely (!lookahead.sanitize (c, this))) return_trace (false);
4194
+ hb_barrier ();
4195
+ const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
4196
+ return_trace (likely (lookup.sanitize (c)));
4197
+ }
4198
+
4199
+ protected:
4200
+ HBUINT16 format; /* Format identifier--format = 3 */
4201
+ Array16OfOffset16To<Coverage>
4202
+ backtrack; /* Array of coverage tables
4203
+ * in backtracking sequence, in glyph
4204
+ * sequence order */
4205
+ Array16OfOffset16To<Coverage>
4206
+ inputX ; /* Array of coverage
4207
+ * tables in input sequence, in glyph
4208
+ * sequence order */
4209
+ Array16OfOffset16To<Coverage>
4210
+ lookaheadX; /* Array of coverage tables
4211
+ * in lookahead sequence, in glyph
4212
+ * sequence order */
4213
+ Array16Of<LookupRecord>
4214
+ lookupX; /* Array of LookupRecords--in
4215
+ * design order) */
4216
+ public:
4217
+ DEFINE_SIZE_MIN (10);
4218
+ };
4219
+
4220
+ struct ChainContext
4221
+ {
4222
+ template <typename context_t, typename ...Ts>
4223
+ typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
4224
+ {
4225
+ if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value ();
4226
+ TRACE_DISPATCH (this, u.format);
4227
+ switch (u.format) {
4228
+ case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
4229
+ case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
4230
+ case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
4231
+ #ifndef HB_NO_BEYOND_64K
4232
+ case 4: return_trace (c->dispatch (u.format4, std::forward<Ts> (ds)...));
4233
+ case 5: return_trace (c->dispatch (u.format5, std::forward<Ts> (ds)...));
4234
+ #endif
4235
+ default:return_trace (c->default_return_value ());
4236
+ }
4237
+ }
4238
+
4239
+ protected:
4240
+ union {
4241
+ HBUINT16 format; /* Format identifier */
4242
+ ChainContextFormat1_4<SmallTypes> format1;
4243
+ ChainContextFormat2_5<SmallTypes> format2;
4244
+ ChainContextFormat3 format3;
4245
+ #ifndef HB_NO_BEYOND_64K
4246
+ ChainContextFormat1_4<MediumTypes> format4;
4247
+ ChainContextFormat2_5<MediumTypes> format5;
4248
+ #endif
4249
+ } u;
4250
+ };
4251
+
4252
+
4253
+ template <typename T>
4254
+ struct ExtensionFormat1
4255
+ {
4256
+ unsigned int get_type () const { return extensionLookupType; }
4257
+
4258
+ template <typename X>
4259
+ const X& get_subtable () const
4260
+ { return this + reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset); }
4261
+
4262
+ template <typename context_t, typename ...Ts>
4263
+ typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
4264
+ {
4265
+ if (unlikely (!c->may_dispatch (this, this))) return c->no_dispatch_return_value ();
4266
+ TRACE_DISPATCH (this, format);
4267
+ return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type (), std::forward<Ts> (ds)...));
4268
+ }
4269
+
4270
+ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const
4271
+ { dispatch (c); }
4272
+
4273
+ /* This is called from may_dispatch() above with hb_sanitize_context_t. */
4274
+ bool sanitize (hb_sanitize_context_t *c) const
4275
+ {
4276
+ TRACE_SANITIZE (this);
4277
+ return_trace (c->check_struct (this) &&
4278
+ hb_barrier () &&
4279
+ extensionLookupType != T::SubTable::Extension);
4280
+ }
4281
+
4282
+ bool subset (hb_subset_context_t *c) const
4283
+ {
4284
+ TRACE_SUBSET (this);
4285
+
4286
+ auto *out = c->serializer->start_embed (this);
4287
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
4288
+
4289
+ out->format = format;
4290
+ out->extensionLookupType = extensionLookupType;
4291
+
4292
+ const auto& src_offset =
4293
+ reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset);
4294
+ auto& dest_offset =
4295
+ reinterpret_cast<Offset32To<typename T::SubTable> &> (out->extensionOffset);
4296
+
4297
+ return_trace (dest_offset.serialize_subset (c, src_offset, this, get_type ()));
4298
+ }
4299
+
4300
+ protected:
4301
+ HBUINT16 format; /* Format identifier. Set to 1. */
4302
+ HBUINT16 extensionLookupType; /* Lookup type of subtable referenced
4303
+ * by ExtensionOffset (i.e. the
4304
+ * extension subtable). */
4305
+ Offset32 extensionOffset; /* Offset to the extension subtable,
4306
+ * of lookup type subtable. */
4307
+ public:
4308
+ DEFINE_SIZE_STATIC (8);
4309
+ };
4310
+
4311
+ template <typename T>
4312
+ struct Extension
4313
+ {
4314
+ unsigned int get_type () const
4315
+ {
4316
+ switch (u.format) {
4317
+ case 1: return u.format1.get_type ();
4318
+ default:return 0;
4319
+ }
4320
+ }
4321
+ template <typename X>
4322
+ const X& get_subtable () const
4323
+ {
4324
+ switch (u.format) {
4325
+ case 1: return u.format1.template get_subtable<typename T::SubTable> ();
4326
+ default:return Null (typename T::SubTable);
4327
+ }
4328
+ }
4329
+
4330
+ // Specialization of dispatch for subset. dispatch() normally just
4331
+ // dispatches to the sub table this points too, but for subset
4332
+ // we need to run subset on this subtable too.
4333
+ template <typename ...Ts>
4334
+ typename hb_subset_context_t::return_t dispatch (hb_subset_context_t *c, Ts&&... ds) const
4335
+ {
4336
+ switch (u.format) {
4337
+ case 1: return u.format1.subset (c);
4338
+ default: return c->default_return_value ();
4339
+ }
4340
+ }
4341
+
4342
+ template <typename context_t, typename ...Ts>
4343
+ typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
4344
+ {
4345
+ if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value ();
4346
+ TRACE_DISPATCH (this, u.format);
4347
+ switch (u.format) {
4348
+ case 1: return_trace (u.format1.dispatch (c, std::forward<Ts> (ds)...));
4349
+ default:return_trace (c->default_return_value ());
4350
+ }
4351
+ }
4352
+
4353
+ protected:
4354
+ union {
4355
+ HBUINT16 format; /* Format identifier */
4356
+ ExtensionFormat1<T> format1;
4357
+ } u;
4358
+ };
4359
+
4360
+
4361
+ /*
4362
+ * GSUB/GPOS Common
4363
+ */
4364
+
4365
+ struct hb_ot_layout_lookup_accelerator_t
4366
+ {
4367
+ template <typename TLookup>
4368
+ static hb_ot_layout_lookup_accelerator_t *create (const TLookup &lookup)
4369
+ {
4370
+ unsigned count = lookup.get_subtable_count ();
4371
+
4372
+ unsigned size = sizeof (hb_ot_layout_lookup_accelerator_t) -
4373
+ HB_VAR_ARRAY * sizeof (hb_accelerate_subtables_context_t::hb_applicable_t) +
4374
+ count * sizeof (hb_accelerate_subtables_context_t::hb_applicable_t);
4375
+
4376
+ /* The following is a calloc because when we are collecting subtables,
4377
+ * some of them might be invalid and hence not collect; as a result,
4378
+ * we might not fill in all the count entries of the subtables array.
4379
+ * Zeroing it allows the set digest to gatekeep it without having to
4380
+ * initialize it further. */
4381
+ auto *thiz = (hb_ot_layout_lookup_accelerator_t *) hb_calloc (1, size);
4382
+ if (unlikely (!thiz))
4383
+ return nullptr;
4384
+
4385
+ hb_accelerate_subtables_context_t c_accelerate_subtables (thiz->subtables);
4386
+ lookup.dispatch (&c_accelerate_subtables);
4387
+
4388
+ thiz->digest.init ();
4389
+ for (auto& subtable : hb_iter (thiz->subtables, count))
4390
+ thiz->digest.union_ (subtable.digest);
4391
+
4392
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
4393
+ thiz->cache_user_idx = c_accelerate_subtables.cache_user_idx;
4394
+ for (unsigned i = 0; i < count; i++)
4395
+ if (i != thiz->cache_user_idx)
4396
+ thiz->subtables[i].apply_cached_func = thiz->subtables[i].apply_func;
4397
+ #endif
4398
+
4399
+ return thiz;
4400
+ }
4401
+
4402
+ bool may_have (hb_codepoint_t g) const
4403
+ { return digest.may_have (g); }
4404
+
4405
+ #ifndef HB_OPTIMIZE_SIZE
4406
+ HB_ALWAYS_INLINE
4407
+ #endif
4408
+ bool apply (hb_ot_apply_context_t *c, unsigned subtables_count, bool use_cache) const
4409
+ {
4410
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
4411
+ if (use_cache)
4412
+ {
4413
+ return
4414
+ + hb_iter (hb_iter (subtables, subtables_count))
4415
+ | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply_cached (c); })
4416
+ | hb_any
4417
+ ;
4418
+ }
4419
+ else
4420
+ #endif
4421
+ {
4422
+ return
4423
+ + hb_iter (hb_iter (subtables, subtables_count))
4424
+ | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply (c); })
4425
+ | hb_any
4426
+ ;
4427
+ }
4428
+ return false;
4429
+ }
4430
+
4431
+ bool cache_enter (hb_ot_apply_context_t *c) const
4432
+ {
4433
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
4434
+ return cache_user_idx != (unsigned) -1 &&
4435
+ subtables[cache_user_idx].cache_enter (c);
4436
+ #else
4437
+ return false;
4438
+ #endif
4439
+ }
4440
+ void cache_leave (hb_ot_apply_context_t *c) const
4441
+ {
4442
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
4443
+ subtables[cache_user_idx].cache_leave (c);
4444
+ #endif
4445
+ }
4446
+
4447
+
4448
+ hb_set_digest_t digest;
4449
+ private:
4450
+ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE
4451
+ unsigned cache_user_idx = (unsigned) -1;
4452
+ #endif
4453
+ hb_accelerate_subtables_context_t::hb_applicable_t subtables[HB_VAR_ARRAY];
4454
+ };
4455
+
4456
+ template <typename Types>
4457
+ struct GSUBGPOSVersion1_2
4458
+ {
4459
+ friend struct GSUBGPOS;
4460
+
4461
+ protected:
4462
+ FixedVersion<>version; /* Version of the GSUB/GPOS table--initially set
4463
+ * to 0x00010000u */
4464
+ typename Types:: template OffsetTo<ScriptList>
4465
+ scriptList; /* ScriptList table */
4466
+ typename Types::template OffsetTo<FeatureList>
4467
+ featureList; /* FeatureList table */
4468
+ typename Types::template OffsetTo<LookupList<Types>>
4469
+ lookupList; /* LookupList table */
4470
+ Offset32To<FeatureVariations>
4471
+ featureVars; /* Offset to Feature Variations
4472
+ table--from beginning of table
4473
+ * (may be NULL). Introduced
4474
+ * in version 0x00010001. */
4475
+ public:
4476
+ DEFINE_SIZE_MIN (4 + 3 * Types::size);
4477
+
4478
+ unsigned int get_size () const
4479
+ {
4480
+ return min_size +
4481
+ (version.to_int () >= 0x00010001u ? featureVars.static_size : 0);
4482
+ }
4483
+
4484
+ const typename Types::template OffsetTo<LookupList<Types>>* get_lookup_list_offset () const
4485
+ {
4486
+ return &lookupList;
4487
+ }
4488
+
4489
+ template <typename TLookup>
4490
+ bool sanitize (hb_sanitize_context_t *c) const
4491
+ {
4492
+ TRACE_SANITIZE (this);
4493
+ typedef List16OfOffsetTo<TLookup, typename Types::HBUINT> TLookupList;
4494
+ if (unlikely (!(scriptList.sanitize (c, this) &&
4495
+ featureList.sanitize (c, this) &&
4496
+ reinterpret_cast<const typename Types::template OffsetTo<TLookupList> &> (lookupList).sanitize (c, this))))
4497
+ return_trace (false);
4498
+
4499
+ #ifndef HB_NO_VAR
4500
+ if (unlikely (!(version.to_int () < 0x00010001u || featureVars.sanitize (c, this))))
4501
+ return_trace (false);
4502
+ #endif
4503
+
4504
+ return_trace (true);
4505
+ }
4506
+
4507
+ template <typename TLookup>
4508
+ bool subset (hb_subset_layout_context_t *c) const
4509
+ {
4510
+ TRACE_SUBSET (this);
4511
+
4512
+ auto *out = c->subset_context->serializer->start_embed (this);
4513
+ if (unlikely (!c->subset_context->serializer->extend_min (out))) return_trace (false);
4514
+
4515
+ out->version = version;
4516
+
4517
+ typedef LookupOffsetList<TLookup, typename Types::HBUINT> TLookupList;
4518
+ reinterpret_cast<typename Types::template OffsetTo<TLookupList> &> (out->lookupList)
4519
+ .serialize_subset (c->subset_context,
4520
+ reinterpret_cast<const typename Types::template OffsetTo<TLookupList> &> (lookupList),
4521
+ this,
4522
+ c);
4523
+
4524
+ reinterpret_cast<typename Types::template OffsetTo<RecordListOfFeature> &> (out->featureList)
4525
+ .serialize_subset (c->subset_context,
4526
+ reinterpret_cast<const typename Types::template OffsetTo<RecordListOfFeature> &> (featureList),
4527
+ this,
4528
+ c);
4529
+
4530
+ out->scriptList.serialize_subset (c->subset_context,
4531
+ scriptList,
4532
+ this,
4533
+ c);
4534
+
4535
+ #ifndef HB_NO_VAR
4536
+ if (version.to_int () >= 0x00010001u)
4537
+ {
4538
+ auto snapshot = c->subset_context->serializer->snapshot ();
4539
+ if (!c->subset_context->serializer->extend_min (&out->featureVars))
4540
+ return_trace (false);
4541
+
4542
+ // if all axes are pinned all feature vars are dropped.
4543
+ bool ret = !c->subset_context->plan->all_axes_pinned
4544
+ && out->featureVars.serialize_subset (c->subset_context, featureVars, this, c);
4545
+ if (!ret && version.major == 1)
4546
+ {
4547
+ c->subset_context->serializer->revert (snapshot);
4548
+ out->version.major = 1;
4549
+ out->version.minor = 0;
4550
+ }
4551
+ }
4552
+ #endif
4553
+
4554
+ return_trace (true);
4555
+ }
4556
+ };
4557
+
4558
+ struct GSUBGPOS
4559
+ {
4560
+ unsigned int get_size () const
4561
+ {
4562
+ switch (u.version.major) {
4563
+ case 1: return u.version1.get_size ();
4564
+ #ifndef HB_NO_BEYOND_64K
4565
+ case 2: return u.version2.get_size ();
4566
+ #endif
4567
+ default: return u.version.static_size;
4568
+ }
4569
+ }
4570
+
4571
+ template <typename TLookup>
4572
+ bool sanitize (hb_sanitize_context_t *c) const
4573
+ {
4574
+ TRACE_SANITIZE (this);
4575
+ if (unlikely (!u.version.sanitize (c))) return_trace (false);
4576
+ hb_barrier ();
4577
+ switch (u.version.major) {
4578
+ case 1: return_trace (u.version1.sanitize<TLookup> (c));
4579
+ #ifndef HB_NO_BEYOND_64K
4580
+ case 2: return_trace (u.version2.sanitize<TLookup> (c));
4581
+ #endif
4582
+ default: return_trace (true);
4583
+ }
4584
+ }
4585
+
4586
+ template <typename TLookup>
4587
+ bool subset (hb_subset_layout_context_t *c) const
4588
+ {
4589
+ switch (u.version.major) {
4590
+ case 1: return u.version1.subset<TLookup> (c);
4591
+ #ifndef HB_NO_BEYOND_64K
4592
+ case 2: return u.version2.subset<TLookup> (c);
4593
+ #endif
4594
+ default: return false;
4595
+ }
4596
+ }
4597
+
4598
+ const ScriptList &get_script_list () const
4599
+ {
4600
+ switch (u.version.major) {
4601
+ case 1: return this+u.version1.scriptList;
4602
+ #ifndef HB_NO_BEYOND_64K
4603
+ case 2: return this+u.version2.scriptList;
4604
+ #endif
4605
+ default: return Null (ScriptList);
4606
+ }
4607
+ }
4608
+ const FeatureList &get_feature_list () const
4609
+ {
4610
+ switch (u.version.major) {
4611
+ case 1: return this+u.version1.featureList;
4612
+ #ifndef HB_NO_BEYOND_64K
4613
+ case 2: return this+u.version2.featureList;
4614
+ #endif
4615
+ default: return Null (FeatureList);
4616
+ }
4617
+ }
4618
+ unsigned int get_lookup_count () const
4619
+ {
4620
+ switch (u.version.major) {
4621
+ case 1: return (this+u.version1.lookupList).len;
4622
+ #ifndef HB_NO_BEYOND_64K
4623
+ case 2: return (this+u.version2.lookupList).len;
4624
+ #endif
4625
+ default: return 0;
4626
+ }
4627
+ }
4628
+ const Lookup& get_lookup (unsigned int i) const
4629
+ {
4630
+ switch (u.version.major) {
4631
+ case 1: return (this+u.version1.lookupList)[i];
4632
+ #ifndef HB_NO_BEYOND_64K
4633
+ case 2: return (this+u.version2.lookupList)[i];
4634
+ #endif
4635
+ default: return Null (Lookup);
4636
+ }
4637
+ }
4638
+ const FeatureVariations &get_feature_variations () const
4639
+ {
4640
+ switch (u.version.major) {
4641
+ case 1: return (u.version.to_int () >= 0x00010001u ? this+u.version1.featureVars : Null (FeatureVariations));
4642
+ #ifndef HB_NO_BEYOND_64K
4643
+ case 2: return this+u.version2.featureVars;
4644
+ #endif
4645
+ default: return Null (FeatureVariations);
4646
+ }
4647
+ }
4648
+
4649
+ bool has_data () const { return u.version.to_int (); }
4650
+ unsigned int get_script_count () const
4651
+ { return get_script_list ().len; }
4652
+ const Tag& get_script_tag (unsigned int i) const
4653
+ { return get_script_list ().get_tag (i); }
4654
+ unsigned int get_script_tags (unsigned int start_offset,
4655
+ unsigned int *script_count /* IN/OUT */,
4656
+ hb_tag_t *script_tags /* OUT */) const
4657
+ { return get_script_list ().get_tags (start_offset, script_count, script_tags); }
4658
+ const Script& get_script (unsigned int i) const
4659
+ { return get_script_list ()[i]; }
4660
+ bool find_script_index (hb_tag_t tag, unsigned int *index) const
4661
+ { return get_script_list ().find_index (tag, index); }
4662
+
4663
+ unsigned int get_feature_count () const
4664
+ { return get_feature_list ().len; }
4665
+ hb_tag_t get_feature_tag (unsigned int i) const
4666
+ { return i == Index::NOT_FOUND_INDEX ? HB_TAG_NONE : get_feature_list ().get_tag (i); }
4667
+ unsigned int get_feature_tags (unsigned int start_offset,
4668
+ unsigned int *feature_count /* IN/OUT */,
4669
+ hb_tag_t *feature_tags /* OUT */) const
4670
+ { return get_feature_list ().get_tags (start_offset, feature_count, feature_tags); }
4671
+ const Feature& get_feature (unsigned int i) const
4672
+ { return get_feature_list ()[i]; }
4673
+ bool find_feature_index (hb_tag_t tag, unsigned int *index) const
4674
+ { return get_feature_list ().find_index (tag, index); }
4675
+
4676
+ bool find_variations_index (const int *coords, unsigned int num_coords,
4677
+ unsigned int *index,
4678
+ ItemVarStoreInstancer *instancer) const
4679
+ {
4680
+ #ifdef HB_NO_VAR
4681
+ *index = FeatureVariations::NOT_FOUND_INDEX;
4682
+ return false;
4683
+ #endif
4684
+ return get_feature_variations ().find_index (coords, num_coords, index, instancer);
4685
+ }
4686
+ const Feature& get_feature_variation (unsigned int feature_index,
4687
+ unsigned int variations_index) const
4688
+ {
4689
+ #ifndef HB_NO_VAR
4690
+ if (FeatureVariations::NOT_FOUND_INDEX != variations_index &&
4691
+ u.version.to_int () >= 0x00010001u)
4692
+ {
4693
+ const Feature *feature = get_feature_variations ().find_substitute (variations_index,
4694
+ feature_index);
4695
+ if (feature)
4696
+ return *feature;
4697
+ }
4698
+ #endif
4699
+ return get_feature (feature_index);
4700
+ }
4701
+
4702
+ void feature_variation_collect_lookups (const hb_set_t *feature_indexes,
4703
+ const hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map,
4704
+ hb_set_t *lookup_indexes /* OUT */) const
4705
+ {
4706
+ #ifndef HB_NO_VAR
4707
+ get_feature_variations ().collect_lookups (feature_indexes, feature_record_cond_idx_map, lookup_indexes);
4708
+ #endif
4709
+ }
4710
+
4711
+ #ifndef HB_NO_VAR
4712
+ void collect_feature_substitutes_with_variations (hb_collect_feature_substitutes_with_var_context_t *c) const
4713
+ { get_feature_variations ().collect_feature_substitutes_with_variations (c); }
4714
+ #endif
4715
+
4716
+ template <typename TLookup>
4717
+ void closure_lookups (hb_face_t *face,
4718
+ const hb_set_t *glyphs,
4719
+ hb_set_t *lookup_indexes /* IN/OUT */) const
4720
+ {
4721
+ hb_set_t visited_lookups, inactive_lookups;
4722
+ hb_closure_lookups_context_t c (face, glyphs, &visited_lookups, &inactive_lookups);
4723
+
4724
+ c.set_recurse_func (TLookup::template dispatch_recurse_func<hb_closure_lookups_context_t>);
4725
+
4726
+ for (unsigned lookup_index : *lookup_indexes)
4727
+ reinterpret_cast<const TLookup &> (get_lookup (lookup_index)).closure_lookups (&c, lookup_index);
4728
+
4729
+ hb_set_union (lookup_indexes, &visited_lookups);
4730
+ hb_set_subtract (lookup_indexes, &inactive_lookups);
4731
+ }
4732
+
4733
+ void prune_langsys (const hb_map_t *duplicate_feature_map,
4734
+ const hb_set_t *layout_scripts,
4735
+ hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *script_langsys_map,
4736
+ hb_set_t *new_feature_indexes /* OUT */) const
4737
+ {
4738
+ hb_prune_langsys_context_t c (this, script_langsys_map, duplicate_feature_map, new_feature_indexes);
4739
+
4740
+ unsigned count = get_script_count ();
4741
+ for (unsigned script_index = 0; script_index < count; script_index++)
4742
+ {
4743
+ const Tag& tag = get_script_tag (script_index);
4744
+ if (!layout_scripts->has (tag)) continue;
4745
+ const Script& s = get_script (script_index);
4746
+ s.prune_langsys (&c, script_index);
4747
+ }
4748
+ }
4749
+
4750
+ void prune_features (const hb_map_t *lookup_indices, /* IN */
4751
+ const hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map, /* IN */
4752
+ const hb_hashmap_t<unsigned, const Feature*> *feature_substitutes_map, /* IN */
4753
+ hb_set_t *feature_indices /* IN/OUT */) const
4754
+ {
4755
+ #ifndef HB_NO_VAR
4756
+ // This is the set of feature indices which have alternate versions defined
4757
+ // if the FeatureVariation's table and the alternate version(s) intersect the
4758
+ // set of lookup indices.
4759
+ hb_set_t alternate_feature_indices;
4760
+ get_feature_variations ().closure_features (lookup_indices, feature_record_cond_idx_map, &alternate_feature_indices);
4761
+ if (unlikely (alternate_feature_indices.in_error()))
4762
+ {
4763
+ feature_indices->err ();
4764
+ return;
4765
+ }
4766
+ #endif
4767
+
4768
+ for (unsigned i : hb_iter (feature_indices))
4769
+ {
4770
+ hb_tag_t tag = get_feature_tag (i);
4771
+ if (tag == HB_TAG ('p', 'r', 'e', 'f'))
4772
+ // Note: Never ever drop feature 'pref', even if it's empty.
4773
+ // HarfBuzz chooses shaper for Khmer based on presence of this
4774
+ // feature. See thread at:
4775
+ // http://lists.freedesktop.org/archives/harfbuzz/2012-November/002660.html
4776
+ continue;
4777
+
4778
+
4779
+ const Feature *f = &(get_feature (i));
4780
+ const Feature** p = nullptr;
4781
+ if (feature_substitutes_map->has (i, &p))
4782
+ f = *p;
4783
+
4784
+ if (!f->featureParams.is_null () &&
4785
+ tag == HB_TAG ('s', 'i', 'z', 'e'))
4786
+ continue;
4787
+
4788
+ if (!f->intersects_lookup_indexes (lookup_indices)
4789
+ #ifndef HB_NO_VAR
4790
+ && !alternate_feature_indices.has (i)
4791
+ #endif
4792
+ )
4793
+ feature_indices->del (i);
4794
+ }
4795
+ }
4796
+
4797
+ void collect_name_ids (const hb_map_t *feature_index_map,
4798
+ hb_set_t *nameids_to_retain /* OUT */) const
4799
+ {
4800
+ unsigned count = get_feature_count ();
4801
+ for (unsigned i = 0 ; i < count; i++)
4802
+ {
4803
+ if (!feature_index_map->has (i)) continue;
4804
+ hb_tag_t tag = get_feature_tag (i);
4805
+ get_feature (i).collect_name_ids (tag, nameids_to_retain);
4806
+ }
4807
+ }
4808
+
4809
+ template <typename T>
4810
+ struct accelerator_t
4811
+ {
4812
+ accelerator_t (hb_face_t *face)
4813
+ {
4814
+ hb_sanitize_context_t sc;
4815
+ sc.lazy_some_gpos = true;
4816
+ this->table = sc.reference_table<T> (face);
4817
+
4818
+ if (unlikely (this->table->is_blocklisted (this->table.get_blob (), face)))
4819
+ {
4820
+ hb_blob_destroy (this->table.get_blob ());
4821
+ this->table = hb_blob_get_empty ();
4822
+ }
4823
+
4824
+ this->lookup_count = table->get_lookup_count ();
4825
+
4826
+ this->accels = (hb_atomic_ptr_t<hb_ot_layout_lookup_accelerator_t> *) hb_calloc (this->lookup_count, sizeof (*accels));
4827
+ if (unlikely (!this->accels))
4828
+ {
4829
+ this->lookup_count = 0;
4830
+ this->table.destroy ();
4831
+ this->table = hb_blob_get_empty ();
4832
+ }
4833
+ }
4834
+ ~accelerator_t ()
4835
+ {
4836
+ for (unsigned int i = 0; i < this->lookup_count; i++)
4837
+ hb_free (this->accels[i]);
4838
+ hb_free (this->accels);
4839
+ this->table.destroy ();
4840
+ }
4841
+
4842
+ hb_blob_t *get_blob () const { return table.get_blob (); }
4843
+
4844
+ hb_ot_layout_lookup_accelerator_t *get_accel (unsigned lookup_index) const
4845
+ {
4846
+ if (unlikely (lookup_index >= lookup_count)) return nullptr;
4847
+
4848
+ retry:
4849
+ auto *accel = accels[lookup_index].get_acquire ();
4850
+ if (unlikely (!accel))
4851
+ {
4852
+ accel = hb_ot_layout_lookup_accelerator_t::create (table->get_lookup (lookup_index));
4853
+ if (unlikely (!accel))
4854
+ return nullptr;
4855
+
4856
+ if (unlikely (!accels[lookup_index].cmpexch (nullptr, accel)))
4857
+ {
4858
+ hb_free (accel);
4859
+ goto retry;
4860
+ }
4861
+ }
4862
+
4863
+ return accel;
4864
+ }
4865
+
4866
+ hb_blob_ptr_t<T> table;
4867
+ unsigned int lookup_count;
4868
+ hb_atomic_ptr_t<hb_ot_layout_lookup_accelerator_t> *accels;
4869
+ };
4870
+
4871
+ protected:
4872
+ union {
4873
+ FixedVersion<> version; /* Version identifier */
4874
+ GSUBGPOSVersion1_2<SmallTypes> version1;
4875
+ #ifndef HB_NO_BEYOND_64K
4876
+ GSUBGPOSVersion1_2<MediumTypes> version2;
4877
+ #endif
4878
+ } u;
4879
+ public:
4880
+ DEFINE_SIZE_MIN (4);
4881
+ };
4882
+
4883
+
4884
+ } /* namespace OT */
4885
+
4886
+
4887
+ #endif /* HB_OT_LAYOUT_GSUBGPOS_HH */