@mentra/bluetooth-sdk 0.1.0

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 (278) hide show
  1. package/README.md +278 -0
  2. package/android/build.gradle +167 -0
  3. package/android/lc3Lib/CMakeLists.txt +6 -0
  4. package/android/lc3Lib/build.gradle +109 -0
  5. package/android/lc3Lib/proguard-rules.pro +33 -0
  6. package/android/lc3Lib/src/main/AndroidManifest.xml +2 -0
  7. package/android/lc3Lib/src/main/cpp/CMakeLists.txt +8 -0
  8. package/android/lc3Lib/src/main/cpp/google_opus_stuff/CMakeLists.txt +30 -0
  9. package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/CMakeLists.txt +7 -0
  10. package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.cc +96 -0
  11. package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.h +53 -0
  12. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/Makefile.am +6 -0
  13. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h +26 -0
  14. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h.in +26 -0
  15. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/ogg.h +209 -0
  16. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/os_types.h +158 -0
  17. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus.h +981 -0
  18. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_custom.h +342 -0
  19. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_defines.h +799 -0
  20. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_multistream.h +660 -0
  21. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_projection.h +568 -0
  22. package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_types.h +166 -0
  23. package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.cc +268 -0
  24. package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.h +115 -0
  25. package/android/lc3Lib/src/main/cpp/google_opus_stuff/opus_tools/opus_header.h +59 -0
  26. package/android/lc3Lib/src/main/cpp/liblc3/CMakeLists.txt +38 -0
  27. package/android/lc3Lib/src/main/cpp/liblc3/include/lc3.h +309 -0
  28. package/android/lc3Lib/src/main/cpp/liblc3/include/lc3_private.h +162 -0
  29. package/android/lc3Lib/src/main/cpp/liblc3/include/rnnoise.h +114 -0
  30. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/CMakeLists.txt +19 -0
  31. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.c +92 -0
  32. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.h +44 -0
  33. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.c +375 -0
  34. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.h +315 -0
  35. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.c +129 -0
  36. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.h +69 -0
  37. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/common.h +148 -0
  38. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.c +70 -0
  39. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.h +43 -0
  40. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/fastmath.h +158 -0
  41. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/lc3.c +702 -0
  42. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.c +893 -0
  43. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.h +111 -0
  44. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_arm.h +506 -0
  45. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_neon.h +281 -0
  46. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/makefile.mk +35 -0
  47. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.c +452 -0
  48. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.h +57 -0
  49. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct_neon.h +296 -0
  50. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/meson.build +46 -0
  51. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.c +61 -0
  52. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.h +57 -0
  53. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.c +880 -0
  54. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.h +103 -0
  55. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.c +904 -0
  56. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.h +119 -0
  57. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.c +3457 -0
  58. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.h +94 -0
  59. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.c +457 -0
  60. package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.h +99 -0
  61. package/android/lc3Lib/src/main/cpp/liblc3/liblc3.cpp +159 -0
  62. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/_kiss_fft_guts.h +182 -0
  63. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/arch.h +261 -0
  64. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.c +279 -0
  65. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.h +59 -0
  66. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/common.h +48 -0
  67. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/compile.sh +3 -0
  68. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/denoise.c +646 -0
  69. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.c +601 -0
  70. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.h +203 -0
  71. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/opus_types.h +159 -0
  72. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.c +526 -0
  73. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.h +149 -0
  74. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.c +178 -0
  75. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.h +69 -0
  76. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.c +11051 -0
  77. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.h +34 -0
  78. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_reader.c +168 -0
  79. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_train.py +66 -0
  80. package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/tansig_table.h +45 -0
  81. package/android/lc3Lib/src/main/java/com/mentra/lc3Lib/Lc3Cpp.java +38 -0
  82. package/android/lc3Lib/third_party/CMakeLists.txt +23 -0
  83. package/android/lc3Lib/third_party/CMakeLists_libogg.txt +18 -0
  84. package/android/lc3Lib/third_party/CMakeLists_libopus.txt +18 -0
  85. package/android/lc3Lib/third_party/CMakeLists_opus-tools.txt +23 -0
  86. package/android/lc3Lib/third_party/opus_tools/src/AUTHORS +5 -0
  87. package/android/lc3Lib/third_party/opus_tools/src/CMakeLists.txt +4 -0
  88. package/android/lc3Lib/third_party/opus_tools/src/COPYING +371 -0
  89. package/android/lc3Lib/third_party/opus_tools/src/ChangeLog +3 -0
  90. package/android/lc3Lib/third_party/opus_tools/src/Makefile.am +42 -0
  91. package/android/lc3Lib/third_party/opus_tools/src/Makefile.unix +23 -0
  92. package/android/lc3Lib/third_party/opus_tools/src/NEWS +0 -0
  93. package/android/lc3Lib/third_party/opus_tools/src/README +0 -0
  94. package/android/lc3Lib/third_party/opus_tools/src/autogen.sh +115 -0
  95. package/android/lc3Lib/third_party/opus_tools/src/configure.ac +293 -0
  96. package/android/lc3Lib/third_party/opus_tools/src/src/arch.h +239 -0
  97. package/android/lc3Lib/third_party/opus_tools/src/src/audio-in.c +1046 -0
  98. package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.c +245 -0
  99. package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.h +28 -0
  100. package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.c +320 -0
  101. package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.h +51 -0
  102. package/android/lc3Lib/third_party/opus_tools/src/src/lpc.c +157 -0
  103. package/android/lc3Lib/third_party/opus_tools/src/src/lpc.h +27 -0
  104. package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.c +286 -0
  105. package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.h +59 -0
  106. package/android/lc3Lib/third_party/opus_tools/src/src/opusdec.c +884 -0
  107. package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.c +1021 -0
  108. package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.h +101 -0
  109. package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.c +639 -0
  110. package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.h +51 -0
  111. package/android/lc3Lib/third_party/opus_tools/src/src/os_support.h +167 -0
  112. package/android/lc3Lib/third_party/opus_tools/src/src/resample.c +1137 -0
  113. package/android/lc3Lib/third_party/opus_tools/src/src/speex_resampler.h +344 -0
  114. package/android/lc3Lib/third_party/opus_tools/src/src/stack_alloc.h +115 -0
  115. package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.c +125 -0
  116. package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.h +62 -0
  117. package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.c +223 -0
  118. package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.h +60 -0
  119. package/android/settings.gradle +1 -0
  120. package/android/src/main/AndroidManifest.xml +40 -0
  121. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +528 -0
  122. package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +610 -0
  123. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +1616 -0
  124. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +314 -0
  125. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothModels.kt +1710 -0
  126. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +554 -0
  127. package/android/src/main/java/com/mentra/bluetoothsdk/ObservableStore.kt +68 -0
  128. package/android/src/main/java/com/mentra/bluetoothsdk/controllers/ControllerManager.kt +158 -0
  129. package/android/src/main/java/com/mentra/bluetoothsdk/controllers/R1.kt +934 -0
  130. package/android/src/main/java/com/mentra/bluetoothsdk/services/Foreground.kt +175 -0
  131. package/android/src/main/java/com/mentra/bluetoothsdk/services/PhoneMic.kt +1109 -0
  132. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G1.java +3974 -0
  133. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +3551 -0
  134. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Mach1.java +1327 -0
  135. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.java +6959 -0
  136. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraNex.kt +1655 -0
  137. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraosBle.java +53675 -0
  138. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +202 -0
  139. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Simulated.kt +224 -0
  140. package/android/src/main/java/com/mentra/bluetoothsdk/stt/STTTools.kt +340 -0
  141. package/android/src/main/java/com/mentra/bluetoothsdk/stt/SherpaOnnxTranscriber.kt +465 -0
  142. package/android/src/main/java/com/mentra/bluetoothsdk/stt/VadGateSpeechPolicy.kt +221 -0
  143. package/android/src/main/java/com/mentra/bluetoothsdk/utils/AES.java +106 -0
  144. package/android/src/main/java/com/mentra/bluetoothsdk/utils/AudioSessionMonitor.kt +189 -0
  145. package/android/src/main/java/com/mentra/bluetoothsdk/utils/BitmapJavaUtils.java +169 -0
  146. package/android/src/main/java/com/mentra/bluetoothsdk/utils/BlePhotoUploadService.java +179 -0
  147. package/android/src/main/java/com/mentra/bluetoothsdk/utils/Constants.kt +44 -0
  148. package/android/src/main/java/com/mentra/bluetoothsdk/utils/G1Text.kt +436 -0
  149. package/android/src/main/java/com/mentra/bluetoothsdk/utils/IncidentLogBleRelayNaming.java +29 -0
  150. package/android/src/main/java/com/mentra/bluetoothsdk/utils/IncidentLogBleUploadService.java +76 -0
  151. package/android/src/main/java/com/mentra/bluetoothsdk/utils/K900ProtocolUtils.java +791 -0
  152. package/android/src/main/java/com/mentra/bluetoothsdk/utils/MessageChunker.java +186 -0
  153. package/android/src/main/java/com/mentra/bluetoothsdk/utils/NexSGCUtils.kt +589 -0
  154. package/android/src/main/java/com/mentra/bluetoothsdk/utils/PhoneAudioMonitor.kt +303 -0
  155. package/android/src/main/java/com/mentra/bluetoothsdk/utils/SmartGlassesConnectionState.java +9 -0
  156. package/android/src/main/java/com/mentra/bluetoothsdk/utils/audio/ByteUtilAudioPlayer.java +655 -0
  157. package/android/src/main/java/com/mentra/bluetoothsdk/utils/audio/Lc3Player.java +441 -0
  158. package/android/src/main/java/com/mentra/bluetoothsdk/utils/audio/PCMAudioPlayer.java +431 -0
  159. package/android/src/main/res/values/strings.xml +4 -0
  160. package/app.plugin.js +1 -0
  161. package/build/BluetoothSdk.types.d.ts +498 -0
  162. package/build/BluetoothSdk.types.d.ts.map +1 -0
  163. package/build/BluetoothSdk.types.js +23 -0
  164. package/build/BluetoothSdk.types.js.map +1 -0
  165. package/build/BluetoothSdkModule.d.ts +71 -0
  166. package/build/BluetoothSdkModule.d.ts.map +1 -0
  167. package/build/BluetoothSdkModule.js +106 -0
  168. package/build/BluetoothSdkModule.js.map +1 -0
  169. package/build/index.d.ts +3 -0
  170. package/build/index.d.ts.map +1 -0
  171. package/build/index.js +5 -0
  172. package/build/index.js.map +1 -0
  173. package/expo-module.config.json +9 -0
  174. package/ios/BluetoothSdkModule.swift +665 -0
  175. package/ios/MentraBluetoothSDK.podspec +77 -0
  176. package/ios/Packages/CoreObjC/CoreObjC.xcodeproj/project.pbxproj +213 -0
  177. package/ios/Packages/CoreObjC/PcmConverter.h +22 -0
  178. package/ios/Packages/CoreObjC/PcmConverter.m +266 -0
  179. package/ios/Packages/CoreObjC/attdet.c +92 -0
  180. package/ios/Packages/CoreObjC/attdet.h +44 -0
  181. package/ios/Packages/CoreObjC/bits.c +375 -0
  182. package/ios/Packages/CoreObjC/bits.h +315 -0
  183. package/ios/Packages/CoreObjC/bwdet.c +129 -0
  184. package/ios/Packages/CoreObjC/bwdet.h +69 -0
  185. package/ios/Packages/CoreObjC/common.h +151 -0
  186. package/ios/Packages/CoreObjC/energy.c +70 -0
  187. package/ios/Packages/CoreObjC/energy.h +43 -0
  188. package/ios/Packages/CoreObjC/fastmath.h +158 -0
  189. package/ios/Packages/CoreObjC/lc3.c +704 -0
  190. package/ios/Packages/CoreObjC/lc3.h +313 -0
  191. package/ios/Packages/CoreObjC/lc3_cpp.h +283 -0
  192. package/ios/Packages/CoreObjC/lc3_private.h +163 -0
  193. package/ios/Packages/CoreObjC/ltpf.c +905 -0
  194. package/ios/Packages/CoreObjC/ltpf.h +111 -0
  195. package/ios/Packages/CoreObjC/ltpf_arm.h +506 -0
  196. package/ios/Packages/CoreObjC/ltpf_neon.h +281 -0
  197. package/ios/Packages/CoreObjC/makefile.mk +35 -0
  198. package/ios/Packages/CoreObjC/mdct.c +469 -0
  199. package/ios/Packages/CoreObjC/mdct.h +57 -0
  200. package/ios/Packages/CoreObjC/mdct_neon.h +296 -0
  201. package/ios/Packages/CoreObjC/meson.build +61 -0
  202. package/ios/Packages/CoreObjC/plc.c +61 -0
  203. package/ios/Packages/CoreObjC/plc.h +57 -0
  204. package/ios/Packages/CoreObjC/rnnoise.h +114 -0
  205. package/ios/Packages/CoreObjC/sns.c +880 -0
  206. package/ios/Packages/CoreObjC/sns.h +103 -0
  207. package/ios/Packages/CoreObjC/spec.c +907 -0
  208. package/ios/Packages/CoreObjC/spec.h +119 -0
  209. package/ios/Packages/CoreObjC/tables.c +3457 -0
  210. package/ios/Packages/CoreObjC/tables.h +94 -0
  211. package/ios/Packages/CoreObjC/tns.c +457 -0
  212. package/ios/Packages/CoreObjC/tns.h +99 -0
  213. package/ios/Packages/SherpaOnnx/Model/joiner.onnx +0 -0
  214. package/ios/Packages/SherpaOnnx/Model/tokens.txt +502 -0
  215. package/ios/Packages/SherpaOnnx/SherpaOnnx.swift +1659 -0
  216. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Headers/cargs.h +162 -0
  217. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Headers/sherpa-onnx/c-api/c-api.h +1852 -0
  218. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Headers/sherpa-onnx/c-api/cxx-api.h +674 -0
  219. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Info.plist +44 -0
  220. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/libsherpa-onnx.a +0 -0
  221. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/sherpa-onnx.a +0 -0
  222. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/libsherpa-onnx.a +0 -0
  223. package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/sherpa-onnx.a +0 -0
  224. package/ios/Packages/VAD/Common/VAD/VADQuality.swift +41 -0
  225. package/ios/Packages/VAD/Common/VAD/VADState.swift +26 -0
  226. package/ios/Packages/VAD/Common/VAD/VADStrategy.swift +29 -0
  227. package/ios/Packages/VAD/Common/VAD/VADType.swift +14 -0
  228. package/ios/Packages/VAD/Data/Configuration.swift +68 -0
  229. package/ios/Packages/VAD/Data/FrameSize.swift +39 -0
  230. package/ios/Packages/VAD/Data/Record.swift +13 -0
  231. package/ios/Packages/VAD/Data/Result.swift +22 -0
  232. package/ios/Packages/VAD/Data/SampleRate.swift +48 -0
  233. package/ios/Packages/VAD/Silero/Model/silero_vad.onnx +0 -0
  234. package/ios/Packages/VAD/Silero/SileroVAD.swift +284 -0
  235. package/ios/Packages/VAD/Silero/SileroVADStrategy.swift +64 -0
  236. package/ios/Packages/libbz2/module.modulemap +5 -0
  237. package/ios/Packages/libbz2/shim.h +1 -0
  238. package/ios/Source/Bridge.swift +353 -0
  239. package/ios/Source/Bridging-Header.h +16 -0
  240. package/ios/Source/DeviceManager.swift +1478 -0
  241. package/ios/Source/DeviceStore.swift +295 -0
  242. package/ios/Source/MentraBluetoothSDK.swift +2439 -0
  243. package/ios/Source/ObservableStore.swift +88 -0
  244. package/ios/Source/PrivacyInfo.xcprivacy +23 -0
  245. package/ios/Source/controllers/ControllerManager.swift +187 -0
  246. package/ios/Source/controllers/R1.swift +827 -0
  247. package/ios/Source/services/PhoneMic.swift +662 -0
  248. package/ios/Source/sgcs/Frame.swift +651 -0
  249. package/ios/Source/sgcs/G1.swift +2505 -0
  250. package/ios/Source/sgcs/G2.swift +3730 -0
  251. package/ios/Source/sgcs/Mach1.swift +543 -0
  252. package/ios/Source/sgcs/MentraLive.swift +4708 -0
  253. package/ios/Source/sgcs/MentraNex.swift +2479 -0
  254. package/ios/Source/sgcs/SGCManager.swift +243 -0
  255. package/ios/Source/sgcs/Simulated.swift +270 -0
  256. package/ios/Source/sgcs/mentraos_ble.pb.swift +3811 -0
  257. package/ios/Source/stt/STTTools.swift +154 -0
  258. package/ios/Source/stt/SherpaOnnxTranscriber.swift +401 -0
  259. package/ios/Source/utils/AudioSessionMonitor.swift +283 -0
  260. package/ios/Source/utils/Constants.swift +74 -0
  261. package/ios/Source/utils/Enums.swift +95 -0
  262. package/ios/Source/utils/G1Text.swift +2067 -0
  263. package/ios/Source/utils/JSCExperiment.swift +241 -0
  264. package/ios/Source/utils/MemoryMonitor.swift +44 -0
  265. package/ios/Source/utils/MessageChunker.swift +164 -0
  266. package/ios/Source/utils/Models.swift +135 -0
  267. package/ios/Source/utils/PhoneAudioMonitor.swift +226 -0
  268. package/ios/Source/utils/TarBz2Extractor.swift +206 -0
  269. package/package.json +78 -0
  270. package/plugin/build/index.d.ts +6 -0
  271. package/plugin/build/index.js +12 -0
  272. package/plugin/build/withAndroid.d.ts +4 -0
  273. package/plugin/build/withAndroid.js +80 -0
  274. package/plugin/build/withIos.d.ts +4 -0
  275. package/plugin/build/withIos.js +64 -0
  276. package/src/BluetoothSdk.types.ts +581 -0
  277. package/src/BluetoothSdkModule.ts +259 -0
  278. package/src/index.ts +4 -0
@@ -0,0 +1,2067 @@
1
+ //
2
+ // G1Text.swift
3
+ // MentraOS_Manager
4
+ //
5
+ // Created by Matthew Fosse on 3/5/25.
6
+ //
7
+
8
+ import CoreGraphics
9
+ import Foundation
10
+
11
+ class G1Text {
12
+ // Constants for text wall display
13
+ private static let TEXT_COMMAND: UInt8 = 0x4E // Text command
14
+ private static let DISPLAY_WIDTH = 488
15
+ private static let DISPLAY_USE_WIDTH = 488 // How much of the display to use
16
+ private static let FONT_MULTIPLIER: Float = 1 / 50.0
17
+ private static let OLD_FONT_SIZE = 21 // Font size
18
+ private static let FONT_DIVIDER: Float = 2.0
19
+ private static let LINES_PER_SCREEN = 5 // Lines per screen
20
+ private static let MAX_CHUNK_SIZE = 176 // Maximum chunk size for BLE packets
21
+
22
+ private var textSeqNum = 0 // Sequence number for text packets
23
+ private var fontLoader = G1FontLoader()
24
+
25
+ init() {}
26
+
27
+ // MARK: - Text Wall Methods
28
+
29
+ // func displayTextWall(_ text: String) {
30
+ // let chunks = createTextWallChunks(text)
31
+ // sendChunks(chunks)
32
+ // }
33
+
34
+ // func displayDoubleTextWall(textTop: String, textBottom: String) {
35
+ // let chunks = createDoubleTextWallChunks(textTop: textTop, textBottom: textBottom)
36
+ // sendChunks(chunks)
37
+ // }
38
+
39
+ /// Creates BLE chunks for pre-wrapped text.
40
+ ///
41
+ /// IMPORTANT: Text is expected to come pre-wrapped from the DisplayProcessor in React Native.
42
+ /// This function does NOT perform any text wrapping - it only chunks the text for BLE transmission.
43
+ /// The DisplayProcessor handles all pixel-accurate wrapping using @mentra/display-utils.
44
+ ///
45
+ /// - Parameter text: Pre-wrapped text with newlines already in place
46
+ /// - Returns: Array of BLE chunks ready for transmission
47
+ func createTextWallChunks(_ text: String) -> [[UInt8]] {
48
+ // Text comes pre-wrapped from DisplayProcessor - just chunk it for transmission
49
+ return chunkTextForTransmission(text)
50
+ }
51
+
52
+ /// Creates BLE chunks for pre-composed double text wall.
53
+ ///
54
+ /// NOTE: DisplayProcessor now composes double_text_wall into a single text_wall
55
+ /// with pixel-precise column alignment using ColumnComposer. This method may
56
+ /// not be called anymore for new flows, but is kept for backwards compatibility.
57
+ ///
58
+ /// Column composition is handled by DisplayProcessor in React Native.
59
+ /// This method is a "dumb pipe" - it just combines and chunks the text.
60
+ ///
61
+ /// - Parameters:
62
+ /// - textTop: Pre-composed left/top column text
63
+ /// - textBottom: Pre-composed right/bottom column text
64
+ /// - Returns: Array of BLE chunks ready for transmission
65
+ func createDoubleTextWallChunks(textTop: String, textBottom: String) -> [[UInt8]] {
66
+ // Text is already composed by DisplayProcessor's ColumnComposer
67
+ // Just combine and chunk for transmission - no custom wrapping logic needed
68
+ let combinedText = "\(textTop)\n\(textBottom)"
69
+ return chunkTextForTransmission(combinedText)
70
+ }
71
+
72
+ func chunkTextForTransmission(_ text: String) -> [[UInt8]] {
73
+ // Handle empty or whitespace-only text by sending at least a space
74
+ // This ensures the display gets updated/cleared properly
75
+ let textToSend = text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? " " : text
76
+ guard let textData = textToSend.data(using: .utf8) else { return [] }
77
+ let textBytes = [UInt8](textData)
78
+ let totalChunks = Int(ceil(Double(textBytes.count) / Double(G1Text.MAX_CHUNK_SIZE)))
79
+
80
+ var allChunks = [[UInt8]]()
81
+ for i in 0 ..< totalChunks {
82
+ let start = i * G1Text.MAX_CHUNK_SIZE
83
+ let end = min(start + G1Text.MAX_CHUNK_SIZE, textBytes.count)
84
+ let payloadChunk = Array(textBytes[start ..< end])
85
+
86
+ // Create header with protocol specifications
87
+ let screenStatus: UInt8 = 0x71 // New content (0x01) + Text Show (0x70)
88
+ let header: [UInt8] = [
89
+ G1Text.TEXT_COMMAND, // Command type
90
+ UInt8(textSeqNum), // Sequence number
91
+ UInt8(totalChunks), // Total packages
92
+ UInt8(i), // Current package number
93
+ screenStatus, // Screen status
94
+ 0x00, // new_char_pos0 (high)
95
+ 0x00, // new_char_pos1 (low)
96
+ 0x00, // Current page number (always 0 for now)
97
+ 0x01, // Max page number (always 1)
98
+ ]
99
+
100
+ // Combine header and payload
101
+ var chunk = header
102
+ chunk.append(contentsOf: payloadChunk)
103
+
104
+ allChunks.append(chunk)
105
+ }
106
+
107
+ // Increment sequence number for next page
108
+ textSeqNum = (textSeqNum + 1) % 256
109
+
110
+ return allChunks
111
+ }
112
+
113
+ private func calculateTextWidth(_ text: String) -> Int {
114
+ var width = 0
115
+ for char in text {
116
+ let glyph = fontLoader.getGlyph(char)
117
+ width += glyph.width + 1 // Add 1 pixel per character for spacing
118
+ }
119
+ return width * 2
120
+ }
121
+
122
+ private func calculateSubstringWidth(_ text: String, start: Int, end: Int) -> Int {
123
+ let startIndex = text.index(text.startIndex, offsetBy: start)
124
+ let endIndex = text.index(text.startIndex, offsetBy: end)
125
+ let substring = text[startIndex ..< endIndex]
126
+ return calculateTextWidth(String(substring))
127
+ }
128
+
129
+ private func calculateSpacesForAlignment(
130
+ currentWidth: Int, targetPosition: Int, spaceWidth: Int
131
+ ) -> Int {
132
+ // Calculate space needed in pixels
133
+ let pixelsNeeded = targetPosition - currentWidth
134
+
135
+ // Calculate spaces needed (with minimum of 1 space for separation)
136
+ if pixelsNeeded <= 0 {
137
+ return 1 // Ensure at least one space between columns
138
+ }
139
+
140
+ // Calculate the exact number of spaces needed
141
+ let spaces = Int(ceil(Double(pixelsNeeded) / Double(spaceWidth)))
142
+
143
+ // Cap at a reasonable maximum
144
+ return min(spaces, 100)
145
+ }
146
+
147
+ private func splitIntoLines(_ text: String, maxDisplayWidth: Int) -> [String] {
148
+ // Replace specific symbols
149
+ let processedText = text.replacingOccurrences(of: "⬆", with: "^").replacingOccurrences(
150
+ of: "⟶", with: "-"
151
+ )
152
+
153
+ var lines = [String]()
154
+
155
+ // Handle empty or single space case
156
+ if processedText.isEmpty || processedText == " " {
157
+ lines.append(processedText)
158
+ return lines
159
+ }
160
+
161
+ // Split by newlines first
162
+ let rawLines = processedText.components(separatedBy: "\n")
163
+
164
+ // print("Splitting text into lines...\(rawLines)")
165
+
166
+ for rawLine in rawLines {
167
+ // Add empty lines for newlines
168
+ if rawLine.isEmpty {
169
+ lines.append("")
170
+ continue
171
+ }
172
+
173
+ let lineLength = rawLine.count
174
+ var startIndex = 0
175
+
176
+ while startIndex < lineLength {
177
+ // Get maximum possible end index
178
+ let endIndex = lineLength
179
+
180
+ // Calculate width of the entire remaining text
181
+ let lineWidth = calculateSubstringWidth(rawLine, start: startIndex, end: endIndex)
182
+
183
+ // print("Line length: \(rawLine)")
184
+ // print("Calculating line width: \(lineWidth)")
185
+
186
+ // If entire line fits, add it and move to next line
187
+ if lineWidth <= maxDisplayWidth {
188
+ let startIndexChar = rawLine.index(rawLine.startIndex, offsetBy: startIndex)
189
+ lines.append(String(rawLine[startIndexChar...]))
190
+ break
191
+ }
192
+
193
+ // Binary search to find the maximum number of characters that fit
194
+ var left = startIndex + 1
195
+ var right = lineLength
196
+ var bestSplitIndex = startIndex + 1
197
+
198
+ while left <= right {
199
+ let mid = left + (right - left) / 2
200
+ let width = calculateSubstringWidth(rawLine, start: startIndex, end: mid)
201
+
202
+ if width <= maxDisplayWidth {
203
+ bestSplitIndex = mid
204
+ left = mid + 1
205
+ } else {
206
+ right = mid - 1
207
+ }
208
+ }
209
+
210
+ // Now find a good place to break (preferably at a space)
211
+ var splitIndex = bestSplitIndex
212
+
213
+ // Look for a space to break at
214
+ var foundSpace = false
215
+ for i in (startIndex + 1 ... bestSplitIndex).reversed() {
216
+ if i > 0, rawLine[rawLine.index(rawLine.startIndex, offsetBy: i - 1)] == " " {
217
+ splitIndex = i
218
+ foundSpace = true
219
+ break
220
+ }
221
+ }
222
+
223
+ // If we couldn't find a space in a reasonable range, use the calculated split point
224
+ if !foundSpace, bestSplitIndex - startIndex > 2 {
225
+ splitIndex = bestSplitIndex
226
+ }
227
+
228
+ // Add the line
229
+ let startChar = rawLine.index(rawLine.startIndex, offsetBy: startIndex)
230
+ let endChar = rawLine.index(rawLine.startIndex, offsetBy: splitIndex)
231
+ let line = String(rawLine[startChar ..< endChar]).trimmingCharacters(in: .whitespaces)
232
+ lines.append(line)
233
+
234
+ // Skip any spaces at the beginning of the next line
235
+ while splitIndex < lineLength,
236
+ rawLine[rawLine.index(rawLine.startIndex, offsetBy: splitIndex)] == " "
237
+ {
238
+ splitIndex += 1
239
+ }
240
+
241
+ startIndex = splitIndex
242
+ }
243
+ }
244
+
245
+ return lines
246
+ }
247
+ }
248
+
249
+ class G1FontLoader {
250
+ private var fontMap: [Character: FontGlyph] = [:]
251
+
252
+ init() {
253
+ // Initialize with hardcoded font data instead of loading from file
254
+ loadHardcodedFontData()
255
+ }
256
+
257
+ private func loadHardcodedFontData() {
258
+ // Hardcoded font data based on the JSON snippet
259
+ let hardcodedGlyphs: [[String: Any]] = [
260
+ [
261
+ "code_point": 32,
262
+ "char": " ",
263
+ "width": 2,
264
+ "height": 26,
265
+ ],
266
+ [
267
+ "code_point": 33,
268
+ "char": "!",
269
+ "width": 1,
270
+ "height": 26,
271
+ ],
272
+ [
273
+ "code_point": 34,
274
+ "char": "\"",
275
+ "width": 2,
276
+ "height": 26,
277
+ ],
278
+ [
279
+ "code_point": 35,
280
+ "char": "#",
281
+ "width": 6,
282
+ "height": 26,
283
+ ],
284
+ [
285
+ "code_point": 36,
286
+ "char": "$",
287
+ "width": 5,
288
+ "height": 26,
289
+ ],
290
+ [
291
+ "code_point": 37,
292
+ "char": "%",
293
+ "width": 6,
294
+ "height": 26,
295
+ ],
296
+ [
297
+ "code_point": 38,
298
+ "char": "&",
299
+ "width": 7,
300
+ "height": 26,
301
+ ],
302
+ [
303
+ "code_point": 39,
304
+ "char": "'",
305
+ "width": 1,
306
+ "height": 26,
307
+ ],
308
+ [
309
+ "code_point": 40,
310
+ "char": "(",
311
+ "width": 2,
312
+ "height": 26,
313
+ ],
314
+ [
315
+ "code_point": 41,
316
+ "char": ")",
317
+ "width": 2,
318
+ "height": 26,
319
+ ],
320
+ [
321
+ "code_point": 42,
322
+ "char": "*",
323
+ "width": 3,
324
+ "height": 26,
325
+ ],
326
+ [
327
+ "code_point": 43,
328
+ "char": "+",
329
+ "width": 4,
330
+ "height": 26,
331
+ ],
332
+ [
333
+ "code_point": 44,
334
+ "char": ",",
335
+ "width": 1,
336
+ "height": 26,
337
+ ],
338
+ [
339
+ "code_point": 45,
340
+ "char": "-",
341
+ "width": 4,
342
+ "height": 26,
343
+ ],
344
+ [
345
+ "code_point": 46,
346
+ "char": ".",
347
+ "width": 1,
348
+ "height": 26,
349
+ ],
350
+ [
351
+ "code_point": 47,
352
+ "char": "/",
353
+ "width": 3,
354
+ "height": 26,
355
+ ],
356
+ [
357
+ "code_point": 48,
358
+ "char": "0",
359
+ "width": 5,
360
+ "height": 26,
361
+ ],
362
+ [
363
+ "code_point": 49,
364
+ "char": "1",
365
+ "width": 3,
366
+ "height": 26,
367
+ ],
368
+ [
369
+ "code_point": 50,
370
+ "char": "2",
371
+ "width": 5,
372
+ "height": 26,
373
+ ],
374
+ [
375
+ "code_point": 51,
376
+ "char": "3",
377
+ "width": 5,
378
+ "height": 26,
379
+ ],
380
+ [
381
+ "code_point": 52,
382
+ "char": "4",
383
+ "width": 5,
384
+ "height": 26,
385
+ ],
386
+ [
387
+ "code_point": 53,
388
+ "char": "5",
389
+ "width": 5,
390
+ "height": 26,
391
+ ],
392
+ [
393
+ "code_point": 54,
394
+ "char": "6",
395
+ "width": 5,
396
+ "height": 26,
397
+ ],
398
+ [
399
+ "code_point": 55,
400
+ "char": "7",
401
+ "width": 5,
402
+ "height": 26,
403
+ ],
404
+ [
405
+ "code_point": 56,
406
+ "char": "8",
407
+ "width": 5,
408
+ "height": 26,
409
+ ],
410
+ [
411
+ "code_point": 57,
412
+ "char": "9",
413
+ "width": 5,
414
+ "height": 26,
415
+ ],
416
+ [
417
+ "code_point": 58,
418
+ "char": ":",
419
+ "width": 1,
420
+ "height": 26,
421
+ ],
422
+ [
423
+ "code_point": 59,
424
+ "char": ";",
425
+ "width": 1,
426
+ "height": 26,
427
+ ],
428
+ [
429
+ "code_point": 60,
430
+ "char": "<",
431
+ "width": 4,
432
+ "height": 26,
433
+ ],
434
+ [
435
+ "code_point": 61,
436
+ "char": "=",
437
+ "width": 4,
438
+ "height": 26,
439
+ ],
440
+ [
441
+ "code_point": 62,
442
+ "char": ">",
443
+ "width": 4,
444
+ "height": 26,
445
+ ],
446
+ [
447
+ "code_point": 63,
448
+ "char": "?",
449
+ "width": 5,
450
+ "height": 26,
451
+ ],
452
+ [
453
+ "code_point": 64,
454
+ "char": "@",
455
+ "width": 7,
456
+ "height": 26,
457
+ ],
458
+ [
459
+ "code_point": 65,
460
+ "char": "A",
461
+ "width": 6,
462
+ "height": 26,
463
+ ],
464
+ [
465
+ "code_point": 66,
466
+ "char": "B",
467
+ "width": 5,
468
+ "height": 26,
469
+ ],
470
+ [
471
+ "code_point": 67,
472
+ "char": "C",
473
+ "width": 5,
474
+ "height": 26,
475
+ ],
476
+ [
477
+ "code_point": 68,
478
+ "char": "D",
479
+ "width": 5,
480
+ "height": 26,
481
+ ],
482
+ [
483
+ "code_point": 69,
484
+ "char": "E",
485
+ "width": 4,
486
+ "height": 26,
487
+ ],
488
+ [
489
+ "code_point": 70,
490
+ "char": "F",
491
+ "width": 4,
492
+ "height": 26,
493
+ ],
494
+ [
495
+ "code_point": 71,
496
+ "char": "G",
497
+ "width": 5,
498
+ "height": 26,
499
+ ],
500
+ [
501
+ "code_point": 72,
502
+ "char": "H",
503
+ "width": 5,
504
+ "height": 26,
505
+ ],
506
+ [
507
+ "code_point": 73,
508
+ "char": "I",
509
+ "width": 2,
510
+ "height": 26,
511
+ ],
512
+ [
513
+ "code_point": 74,
514
+ "char": "J",
515
+ "width": 3,
516
+ "height": 26,
517
+ ],
518
+ [
519
+ "code_point": 75,
520
+ "char": "K",
521
+ "width": 5,
522
+ "height": 26,
523
+ ],
524
+ [
525
+ "code_point": 76,
526
+ "char": "L",
527
+ "width": 4,
528
+ "height": 26,
529
+ ],
530
+ [
531
+ "code_point": 77,
532
+ "char": "M",
533
+ "width": 7,
534
+ "height": 26,
535
+ ],
536
+ [
537
+ "code_point": 78,
538
+ "char": "N",
539
+ "width": 5,
540
+ "height": 26,
541
+ ],
542
+ [
543
+ "code_point": 79,
544
+ "char": "O",
545
+ "width": 5,
546
+ "height": 26,
547
+ ],
548
+ [
549
+ "code_point": 80,
550
+ "char": "P",
551
+ "width": 5,
552
+ "height": 26,
553
+ ],
554
+ [
555
+ "code_point": 81,
556
+ "char": "Q",
557
+ "width": 5,
558
+ "height": 26,
559
+ ],
560
+ [
561
+ "code_point": 82,
562
+ "char": "R",
563
+ "width": 5,
564
+ "height": 26,
565
+ ],
566
+ [
567
+ "code_point": 83,
568
+ "char": "S",
569
+ "width": 5,
570
+ "height": 26,
571
+ ],
572
+ [
573
+ "code_point": 84,
574
+ "char": "T",
575
+ "width": 5,
576
+ "height": 26,
577
+ ],
578
+ [
579
+ "code_point": 85,
580
+ "char": "U",
581
+ "width": 5,
582
+ "height": 26,
583
+ ],
584
+ [
585
+ "code_point": 86,
586
+ "char": "V",
587
+ "width": 6,
588
+ "height": 26,
589
+ ],
590
+ [
591
+ "code_point": 87,
592
+ "char": "W",
593
+ "width": 7,
594
+ "height": 26,
595
+ ],
596
+ [
597
+ "code_point": 88,
598
+ "char": "X",
599
+ "width": 6,
600
+ "height": 26,
601
+ ],
602
+ [
603
+ "code_point": 89,
604
+ "char": "Y",
605
+ "width": 6,
606
+ "height": 26,
607
+ ],
608
+ [
609
+ "code_point": 90,
610
+ "char": "Z",
611
+ "width": 5,
612
+ "height": 26,
613
+ ],
614
+ [
615
+ "code_point": 91,
616
+ "char": "[",
617
+ "width": 2,
618
+ "height": 26,
619
+ ],
620
+ [
621
+ "code_point": 92,
622
+ "char": "\\",
623
+ "width": 3,
624
+ "height": 26,
625
+ ],
626
+ [
627
+ "code_point": 93,
628
+ "char": "]",
629
+ "width": 2,
630
+ "height": 26,
631
+ ],
632
+ [
633
+ "code_point": 94,
634
+ "char": "^",
635
+ "width": 4,
636
+ "height": 26,
637
+ ],
638
+ [
639
+ "code_point": 95,
640
+ "char": "_",
641
+ "width": 3,
642
+ "height": 26,
643
+ ],
644
+ [
645
+ "code_point": 96,
646
+ "char": "`",
647
+ "width": 2,
648
+ "height": 26,
649
+ ],
650
+ [
651
+ "code_point": 97,
652
+ "char": "a",
653
+ "width": 5,
654
+ "height": 26,
655
+ ],
656
+ [
657
+ "code_point": 98,
658
+ "char": "b",
659
+ "width": 4,
660
+ "height": 26,
661
+ ],
662
+ [
663
+ "code_point": 99,
664
+ "char": "c",
665
+ "width": 4,
666
+ "height": 26,
667
+ ],
668
+ [
669
+ "code_point": 100,
670
+ "char": "d",
671
+ "width": 4,
672
+ "height": 26,
673
+ ],
674
+ [
675
+ "code_point": 101,
676
+ "char": "e",
677
+ "width": 4,
678
+ "height": 26,
679
+ ],
680
+ [
681
+ "code_point": 102,
682
+ "char": "f",
683
+ "width": 4,
684
+ "height": 26,
685
+ ],
686
+ [
687
+ "code_point": 103,
688
+ "char": "g",
689
+ "width": 4,
690
+ "height": 26,
691
+ ],
692
+ [
693
+ "code_point": 104,
694
+ "char": "h",
695
+ "width": 4,
696
+ "height": 26,
697
+ ],
698
+ [
699
+ "code_point": 105,
700
+ "char": "i",
701
+ "width": 1,
702
+ "height": 26,
703
+ ],
704
+ [
705
+ "code_point": 106,
706
+ "char": "j",
707
+ "width": 2,
708
+ "height": 26,
709
+ ],
710
+ [
711
+ "code_point": 107,
712
+ "char": "k",
713
+ "width": 4,
714
+ "height": 26,
715
+ ],
716
+ [
717
+ "code_point": 108,
718
+ "char": "l",
719
+ "width": 1,
720
+ "height": 26,
721
+ ],
722
+ [
723
+ "code_point": 109,
724
+ "char": "m",
725
+ "width": 7,
726
+ "height": 26,
727
+ ],
728
+ [
729
+ "code_point": 110,
730
+ "char": "n",
731
+ "width": 4,
732
+ "height": 26,
733
+ ],
734
+ [
735
+ "code_point": 111,
736
+ "char": "o",
737
+ "width": 4,
738
+ "height": 26,
739
+ ],
740
+ [
741
+ "code_point": 112,
742
+ "char": "p",
743
+ "width": 4,
744
+ "height": 26,
745
+ ],
746
+ [
747
+ "code_point": 113,
748
+ "char": "q",
749
+ "width": 4,
750
+ "height": 26,
751
+ ],
752
+ [
753
+ "code_point": 114,
754
+ "char": "r",
755
+ "width": 3,
756
+ "height": 26,
757
+ ],
758
+ [
759
+ "code_point": 115,
760
+ "char": "s",
761
+ "width": 4,
762
+ "height": 26,
763
+ ],
764
+ [
765
+ "code_point": 116,
766
+ "char": "t",
767
+ "width": 3,
768
+ "height": 26,
769
+ ],
770
+ [
771
+ "code_point": 117,
772
+ "char": "u",
773
+ "width": 5,
774
+ "height": 26,
775
+ ],
776
+ [
777
+ "code_point": 118,
778
+ "char": "v",
779
+ "width": 5,
780
+ "height": 26,
781
+ ],
782
+ [
783
+ "code_point": 119,
784
+ "char": "w",
785
+ "width": 7,
786
+ "height": 26,
787
+ ],
788
+ [
789
+ "code_point": 120,
790
+ "char": "x",
791
+ "width": 5,
792
+ "height": 26,
793
+ ],
794
+ [
795
+ "code_point": 121,
796
+ "char": "y",
797
+ "width": 5,
798
+ "height": 26,
799
+ ],
800
+ [
801
+ "code_point": 122,
802
+ "char": "z",
803
+ "width": 4,
804
+ "height": 26,
805
+ ],
806
+ [
807
+ "code_point": 123,
808
+ "char": "{",
809
+ "width": 3,
810
+ "height": 26,
811
+ ],
812
+ [
813
+ "code_point": 124,
814
+ "char": "|",
815
+ "width": 1,
816
+ "height": 26,
817
+ ],
818
+ [
819
+ "code_point": 125,
820
+ "char": "}",
821
+ "width": 3,
822
+ "height": 26,
823
+ ],
824
+ [
825
+ "code_point": 126,
826
+ "char": "~",
827
+ "width": 7,
828
+ "height": 26,
829
+ ],
830
+ [
831
+ "code_point": 192,
832
+ "char": "À",
833
+ "width": 6,
834
+ "height": 26,
835
+ ],
836
+ [
837
+ "code_point": 194,
838
+ "char": "Â",
839
+ "width": 6,
840
+ "height": 26,
841
+ ],
842
+ [
843
+ "code_point": 199,
844
+ "char": "Ç",
845
+ "width": 5,
846
+ "height": 26,
847
+ ],
848
+ [
849
+ "code_point": 200,
850
+ "char": "È",
851
+ "width": 4,
852
+ "height": 26,
853
+ ],
854
+ [
855
+ "code_point": 201,
856
+ "char": "É",
857
+ "width": 4,
858
+ "height": 26,
859
+ ],
860
+ [
861
+ "code_point": 202,
862
+ "char": "Ê",
863
+ "width": 4,
864
+ "height": 26,
865
+ ],
866
+ [
867
+ "code_point": 203,
868
+ "char": "Ë",
869
+ "width": 4,
870
+ "height": 26,
871
+ ],
872
+ [
873
+ "code_point": 206,
874
+ "char": "Î",
875
+ "width": 3,
876
+ "height": 26,
877
+ ],
878
+ [
879
+ "code_point": 207,
880
+ "char": "Ï",
881
+ "width": 3,
882
+ "height": 26,
883
+ ],
884
+ [
885
+ "code_point": 212,
886
+ "char": "Ô",
887
+ "width": 5,
888
+ "height": 26,
889
+ ],
890
+ [
891
+ "code_point": 217,
892
+ "char": "Ù",
893
+ "width": 5,
894
+ "height": 26,
895
+ ],
896
+ [
897
+ "code_point": 219,
898
+ "char": "Û",
899
+ "width": 5,
900
+ "height": 26,
901
+ ],
902
+ [
903
+ "code_point": 220,
904
+ "char": "Ü",
905
+ "width": 5,
906
+ "height": 26,
907
+ ],
908
+ [
909
+ "code_point": 224,
910
+ "char": "à",
911
+ "width": 5,
912
+ "height": 26,
913
+ ],
914
+ [
915
+ "code_point": 231,
916
+ "char": "ç",
917
+ "width": 4,
918
+ "height": 26,
919
+ ],
920
+ [
921
+ "code_point": 232,
922
+ "char": "è",
923
+ "width": 4,
924
+ "height": 26,
925
+ ],
926
+ [
927
+ "code_point": 233,
928
+ "char": "é",
929
+ "width": 4,
930
+ "height": 26,
931
+ ],
932
+ [
933
+ "code_point": 234,
934
+ "char": "ê",
935
+ "width": 4,
936
+ "height": 26,
937
+ ],
938
+ [
939
+ "code_point": 235,
940
+ "char": "ë",
941
+ "width": 4,
942
+ "height": 26,
943
+ ],
944
+ [
945
+ "code_point": 238,
946
+ "char": "î",
947
+ "width": 3,
948
+ "height": 26,
949
+ ],
950
+ [
951
+ "code_point": 239,
952
+ "char": "ï",
953
+ "width": 3,
954
+ "height": 26,
955
+ ],
956
+ [
957
+ "code_point": 244,
958
+ "char": "ô",
959
+ "width": 4,
960
+ "height": 26,
961
+ ],
962
+ [
963
+ "code_point": 249,
964
+ "char": "ù",
965
+ "width": 5,
966
+ "height": 26,
967
+ ],
968
+ [
969
+ "code_point": 251,
970
+ "char": "û",
971
+ "width": 5,
972
+ "height": 26,
973
+ ],
974
+ [
975
+ "code_point": 252,
976
+ "char": "ü",
977
+ "width": 5,
978
+ "height": 26,
979
+ ],
980
+ [
981
+ "code_point": 255,
982
+ "char": "ÿ",
983
+ "width": 5,
984
+ "height": 26,
985
+ ],
986
+ [
987
+ "code_point": 376,
988
+ "char": "Ÿ",
989
+ "width": 6,
990
+ "height": 26,
991
+ ],
992
+ [
993
+ "code_point": 196,
994
+ "char": "Ä",
995
+ "width": 6,
996
+ "height": 26,
997
+ ],
998
+ [
999
+ "code_point": 228,
1000
+ "char": "ä",
1001
+ "width": 5,
1002
+ "height": 26,
1003
+ ],
1004
+ [
1005
+ "code_point": 214,
1006
+ "char": "Ö",
1007
+ "width": 5,
1008
+ "height": 26,
1009
+ ],
1010
+ [
1011
+ "code_point": 246,
1012
+ "char": "ö",
1013
+ "width": 4,
1014
+ "height": 26,
1015
+ ],
1016
+ [
1017
+ "code_point": 223,
1018
+ "char": "ß",
1019
+ "width": 4,
1020
+ "height": 26,
1021
+ ],
1022
+ [
1023
+ "code_point": 7838,
1024
+ "char": "ẞ",
1025
+ "width": 5,
1026
+ "height": 26,
1027
+ ],
1028
+ [
1029
+ "code_point": 226,
1030
+ "char": "â",
1031
+ "width": 5,
1032
+ "height": 26,
1033
+ ],
1034
+ [
1035
+ "code_point": 193,
1036
+ "char": "Á",
1037
+ "width": 6,
1038
+ "height": 26,
1039
+ ],
1040
+ [
1041
+ "code_point": 225,
1042
+ "char": "á",
1043
+ "width": 5,
1044
+ "height": 26,
1045
+ ],
1046
+ [
1047
+ "code_point": 205,
1048
+ "char": "Í",
1049
+ "width": 2,
1050
+ "height": 26,
1051
+ ],
1052
+ [
1053
+ "code_point": 237,
1054
+ "char": "í",
1055
+ "width": 2,
1056
+ "height": 26,
1057
+ ],
1058
+ [
1059
+ "code_point": 209,
1060
+ "char": "Ñ",
1061
+ "width": 5,
1062
+ "height": 26,
1063
+ ],
1064
+ [
1065
+ "code_point": 241,
1066
+ "char": "ñ",
1067
+ "width": 4,
1068
+ "height": 26,
1069
+ ],
1070
+ [
1071
+ "code_point": 250,
1072
+ "char": "ú",
1073
+ "width": 5,
1074
+ "height": 26,
1075
+ ],
1076
+ [
1077
+ "code_point": 211,
1078
+ "char": "Ó",
1079
+ "width": 5,
1080
+ "height": 26,
1081
+ ],
1082
+ [
1083
+ "code_point": 243,
1084
+ "char": "ó",
1085
+ "width": 4,
1086
+ "height": 26,
1087
+ ],
1088
+ [
1089
+ "code_point": 218,
1090
+ "char": "Ú",
1091
+ "width": 5,
1092
+ "height": 26,
1093
+ ],
1094
+ [
1095
+ "code_point": 46,
1096
+ "char": ".",
1097
+ "width": 1,
1098
+ "height": 26,
1099
+ ],
1100
+ [
1101
+ "code_point": 44,
1102
+ "char": ",",
1103
+ "width": 1,
1104
+ "height": 26,
1105
+ ],
1106
+ [
1107
+ "code_point": 58,
1108
+ "char": ":",
1109
+ "width": 1,
1110
+ "height": 26,
1111
+ ],
1112
+ [
1113
+ "code_point": 59,
1114
+ "char": ";",
1115
+ "width": 1,
1116
+ "height": 26,
1117
+ ],
1118
+ [
1119
+ "code_point": 8230,
1120
+ "char": "…",
1121
+ "width": 4,
1122
+ "height": 26,
1123
+ ],
1124
+ [
1125
+ "code_point": 33,
1126
+ "char": "!",
1127
+ "width": 1,
1128
+ "height": 26,
1129
+ ],
1130
+ [
1131
+ "code_point": 63,
1132
+ "char": "?",
1133
+ "width": 5,
1134
+ "height": 26,
1135
+ ],
1136
+ [
1137
+ "code_point": 183,
1138
+ "char": "·",
1139
+ "width": 1,
1140
+ "height": 26,
1141
+ ],
1142
+ [
1143
+ "code_point": 8226,
1144
+ "char": "•",
1145
+ "width": 3,
1146
+ "height": 26,
1147
+ ],
1148
+ [
1149
+ "code_point": 42,
1150
+ "char": "*",
1151
+ "width": 3,
1152
+ "height": 26,
1153
+ ],
1154
+ [
1155
+ "code_point": 35,
1156
+ "char": "#",
1157
+ "width": 6,
1158
+ "height": 26,
1159
+ ],
1160
+ [
1161
+ "code_point": 47,
1162
+ "char": "/",
1163
+ "width": 3,
1164
+ "height": 26,
1165
+ ],
1166
+ [
1167
+ "code_point": 92,
1168
+ "char": "\\",
1169
+ "width": 3,
1170
+ "height": 26,
1171
+ ],
1172
+ [
1173
+ "code_point": 45,
1174
+ "char": "-",
1175
+ "width": 4,
1176
+ "height": 26,
1177
+ ],
1178
+ [
1179
+ "code_point": 8211,
1180
+ "char": "–",
1181
+ "width": 6,
1182
+ "height": 26,
1183
+ ],
1184
+ [
1185
+ "code_point": 8212,
1186
+ "char": "—",
1187
+ "width": 6,
1188
+ "height": 26,
1189
+ ],
1190
+ [
1191
+ "code_point": 95,
1192
+ "char": "_",
1193
+ "width": 3,
1194
+ "height": 26,
1195
+ ],
1196
+ [
1197
+ "code_point": 40,
1198
+ "char": "(",
1199
+ "width": 2,
1200
+ "height": 26,
1201
+ ],
1202
+ [
1203
+ "code_point": 41,
1204
+ "char": ")",
1205
+ "width": 2,
1206
+ "height": 26,
1207
+ ],
1208
+ [
1209
+ "code_point": 123,
1210
+ "char": "{",
1211
+ "width": 3,
1212
+ "height": 26,
1213
+ ],
1214
+ [
1215
+ "code_point": 125,
1216
+ "char": "}",
1217
+ "width": 3,
1218
+ "height": 26,
1219
+ ],
1220
+ [
1221
+ "code_point": 91,
1222
+ "char": "[",
1223
+ "width": 2,
1224
+ "height": 26,
1225
+ ],
1226
+ [
1227
+ "code_point": 93,
1228
+ "char": "]",
1229
+ "width": 2,
1230
+ "height": 26,
1231
+ ],
1232
+ [
1233
+ "code_point": 8220,
1234
+ "char": "“",
1235
+ "width": 3,
1236
+ "height": 26,
1237
+ ],
1238
+ [
1239
+ "code_point": 8221,
1240
+ "char": "”",
1241
+ "width": 3,
1242
+ "height": 26,
1243
+ ],
1244
+ [
1245
+ "code_point": 8216,
1246
+ "char": "‘",
1247
+ "width": 1,
1248
+ "height": 26,
1249
+ ],
1250
+ [
1251
+ "code_point": 8217,
1252
+ "char": "’",
1253
+ "width": 1,
1254
+ "height": 26,
1255
+ ],
1256
+ [
1257
+ "code_point": 8249,
1258
+ "char": "‹",
1259
+ "width": 3,
1260
+ "height": 26,
1261
+ ],
1262
+ [
1263
+ "code_point": 8250,
1264
+ "char": "›",
1265
+ "width": 3,
1266
+ "height": 26,
1267
+ ],
1268
+ [
1269
+ "code_point": 34,
1270
+ "char": "\"",
1271
+ "width": 2,
1272
+ "height": 26,
1273
+ ],
1274
+ [
1275
+ "code_point": 39,
1276
+ "char": "'",
1277
+ "width": 1,
1278
+ "height": 26,
1279
+ ],
1280
+ [
1281
+ "code_point": 64,
1282
+ "char": "@",
1283
+ "width": 7,
1284
+ "height": 26,
1285
+ ],
1286
+ [
1287
+ "code_point": 38,
1288
+ "char": "&",
1289
+ "width": 7,
1290
+ "height": 26,
1291
+ ],
1292
+ [
1293
+ "code_point": 124,
1294
+ "char": "|",
1295
+ "width": 1,
1296
+ "height": 26,
1297
+ ],
1298
+ [
1299
+ "code_point": 43,
1300
+ "char": "+",
1301
+ "width": 4,
1302
+ "height": 26,
1303
+ ],
1304
+ [
1305
+ "code_point": 61,
1306
+ "char": "=",
1307
+ "width": 4,
1308
+ "height": 26,
1309
+ ],
1310
+ [
1311
+ "code_point": 62,
1312
+ "char": ">",
1313
+ "width": 4,
1314
+ "height": 26,
1315
+ ],
1316
+ [
1317
+ "code_point": 60,
1318
+ "char": "<",
1319
+ "width": 4,
1320
+ "height": 26,
1321
+ ],
1322
+ [
1323
+ "code_point": 126,
1324
+ "char": "~",
1325
+ "width": 7,
1326
+ "height": 26,
1327
+ ],
1328
+ [
1329
+ "code_point": 94,
1330
+ "char": "^",
1331
+ "width": 4,
1332
+ "height": 26,
1333
+ ],
1334
+ [
1335
+ "code_point": 37,
1336
+ "char": "%",
1337
+ "width": 6,
1338
+ "height": 26,
1339
+ ],
1340
+ [
1341
+ "code_point": 8260,
1342
+ "char": "⁄",
1343
+ "width": 4,
1344
+ "height": 26,
1345
+ ],
1346
+ [
1347
+ "code_point": 189,
1348
+ "char": "½",
1349
+ "width": 6,
1350
+ "height": 26,
1351
+ ],
1352
+ [
1353
+ "code_point": 188,
1354
+ "char": "¼",
1355
+ "width": 6,
1356
+ "height": 26,
1357
+ ],
1358
+ [
1359
+ "code_point": 190,
1360
+ "char": "¾",
1361
+ "width": 7,
1362
+ "height": 26,
1363
+ ],
1364
+ [
1365
+ "code_point": 8539,
1366
+ "char": "⅛",
1367
+ "width": 6,
1368
+ "height": 26,
1369
+ ],
1370
+ [
1371
+ "code_point": 8540,
1372
+ "char": "⅜",
1373
+ "width": 7,
1374
+ "height": 26,
1375
+ ],
1376
+ [
1377
+ "code_point": 8541,
1378
+ "char": "⅝",
1379
+ "width": 7,
1380
+ "height": 26,
1381
+ ],
1382
+ [
1383
+ "code_point": 8542,
1384
+ "char": "⅞",
1385
+ "width": 6,
1386
+ "height": 26,
1387
+ ],
1388
+ [
1389
+ "code_point": 8320,
1390
+ "char": "₀",
1391
+ "width": 3,
1392
+ "height": 26,
1393
+ ],
1394
+ [
1395
+ "code_point": 8321,
1396
+ "char": "₁",
1397
+ "width": 2,
1398
+ "height": 26,
1399
+ ],
1400
+ [
1401
+ "code_point": 8322,
1402
+ "char": "₂",
1403
+ "width": 3,
1404
+ "height": 26,
1405
+ ],
1406
+ [
1407
+ "code_point": 8323,
1408
+ "char": "₃",
1409
+ "width": 3,
1410
+ "height": 26,
1411
+ ],
1412
+ [
1413
+ "code_point": 8324,
1414
+ "char": "₄",
1415
+ "width": 3,
1416
+ "height": 26,
1417
+ ],
1418
+ [
1419
+ "code_point": 8325,
1420
+ "char": "₅",
1421
+ "width": 3,
1422
+ "height": 26,
1423
+ ],
1424
+ [
1425
+ "code_point": 8326,
1426
+ "char": "₆",
1427
+ "width": 3,
1428
+ "height": 26,
1429
+ ],
1430
+ [
1431
+ "code_point": 8327,
1432
+ "char": "₇",
1433
+ "width": 3,
1434
+ "height": 26,
1435
+ ],
1436
+ [
1437
+ "code_point": 8328,
1438
+ "char": "₈",
1439
+ "width": 3,
1440
+ "height": 26,
1441
+ ],
1442
+ [
1443
+ "code_point": 8329,
1444
+ "char": "₉",
1445
+ "width": 3,
1446
+ "height": 26,
1447
+ ],
1448
+ [
1449
+ "code_point": 8304,
1450
+ "char": "⁰",
1451
+ "width": 3,
1452
+ "height": 26,
1453
+ ],
1454
+ [
1455
+ "code_point": 8305,
1456
+ "char": "ⁱ",
1457
+ "width": 6,
1458
+ "height": 26,
1459
+ ],
1460
+ [
1461
+ "code_point": 8306,
1462
+ "char": "⁲",
1463
+ "width": 6,
1464
+ "height": 26,
1465
+ ],
1466
+ [
1467
+ "code_point": 8307,
1468
+ "char": "⁳",
1469
+ "width": 6,
1470
+ "height": 26,
1471
+ ],
1472
+ [
1473
+ "code_point": 8308,
1474
+ "char": "⁴",
1475
+ "width": 3,
1476
+ "height": 26,
1477
+ ],
1478
+ [
1479
+ "code_point": 8309,
1480
+ "char": "⁵",
1481
+ "width": 3,
1482
+ "height": 26,
1483
+ ],
1484
+ [
1485
+ "code_point": 8310,
1486
+ "char": "⁶",
1487
+ "width": 3,
1488
+ "height": 26,
1489
+ ],
1490
+ [
1491
+ "code_point": 8311,
1492
+ "char": "⁷",
1493
+ "width": 3,
1494
+ "height": 26,
1495
+ ],
1496
+ [
1497
+ "code_point": 8312,
1498
+ "char": "⁸",
1499
+ "width": 3,
1500
+ "height": 26,
1501
+ ],
1502
+ [
1503
+ "code_point": 8313,
1504
+ "char": "⁹",
1505
+ "width": 3,
1506
+ "height": 26,
1507
+ ],
1508
+ [
1509
+ "code_point": 191,
1510
+ "char": "¿",
1511
+ "width": 5,
1512
+ "height": 26,
1513
+ ],
1514
+ [
1515
+ "code_point": 8218,
1516
+ "char": "‚",
1517
+ "width": 1,
1518
+ "height": 26,
1519
+ ],
1520
+ [
1521
+ "code_point": 8222,
1522
+ "char": "„",
1523
+ "width": 3,
1524
+ "height": 26,
1525
+ ],
1526
+ [
1527
+ "code_point": 171,
1528
+ "char": "«",
1529
+ "width": 5,
1530
+ "height": 26,
1531
+ ],
1532
+ [
1533
+ "code_point": 187,
1534
+ "char": "»",
1535
+ "width": 5,
1536
+ "height": 26,
1537
+ ],
1538
+ [
1539
+ "code_point": 3647,
1540
+ "char": "฿",
1541
+ "width": 5,
1542
+ "height": 26,
1543
+ ],
1544
+ [
1545
+ "code_point": 182,
1546
+ "char": "¶",
1547
+ "width": 7,
1548
+ "height": 26,
1549
+ ],
1550
+ [
1551
+ "code_point": 167,
1552
+ "char": "§",
1553
+ "width": 5,
1554
+ "height": 26,
1555
+ ],
1556
+ [
1557
+ "code_point": 169,
1558
+ "char": "©",
1559
+ "width": 8,
1560
+ "height": 26,
1561
+ ],
1562
+ [
1563
+ "code_point": 174,
1564
+ "char": "®",
1565
+ "width": 5,
1566
+ "height": 26,
1567
+ ],
1568
+ [
1569
+ "code_point": 8482,
1570
+ "char": "™",
1571
+ "width": 6,
1572
+ "height": 26,
1573
+ ],
1574
+ [
1575
+ "code_point": 176,
1576
+ "char": "°",
1577
+ "width": 2,
1578
+ "height": 26,
1579
+ ],
1580
+ [
1581
+ "code_point": 166,
1582
+ "char": "¦",
1583
+ "width": 1,
1584
+ "height": 26,
1585
+ ],
1586
+ [
1587
+ "code_point": 8224,
1588
+ "char": "†",
1589
+ "width": 5,
1590
+ "height": 26,
1591
+ ],
1592
+ [
1593
+ "code_point": 8225,
1594
+ "char": "‡",
1595
+ "width": 5,
1596
+ "height": 26,
1597
+ ],
1598
+ [
1599
+ "code_point": 8364,
1600
+ "char": "€",
1601
+ "width": 7,
1602
+ "height": 26,
1603
+ ],
1604
+ [
1605
+ "code_point": 8383,
1606
+ "char": "₿",
1607
+ "width": 5,
1608
+ "height": 26,
1609
+ ],
1610
+ [
1611
+ "code_point": 162,
1612
+ "char": "¢",
1613
+ "width": 5,
1614
+ "height": 26,
1615
+ ],
1616
+ [
1617
+ "code_point": 36,
1618
+ "char": "$",
1619
+ "width": 5,
1620
+ "height": 26,
1621
+ ],
1622
+ [
1623
+ "code_point": 163,
1624
+ "char": "£",
1625
+ "width": 6,
1626
+ "height": 26,
1627
+ ],
1628
+ [
1629
+ "code_point": 165,
1630
+ "char": "¥",
1631
+ "width": 5,
1632
+ "height": 26,
1633
+ ],
1634
+ [
1635
+ "code_point": 8722,
1636
+ "char": "−",
1637
+ "width": 4,
1638
+ "height": 26,
1639
+ ],
1640
+ [
1641
+ "code_point": 215,
1642
+ "char": "×",
1643
+ "width": 4,
1644
+ "height": 26,
1645
+ ],
1646
+ [
1647
+ "code_point": 247,
1648
+ "char": "÷",
1649
+ "width": 4,
1650
+ "height": 26,
1651
+ ],
1652
+ [
1653
+ "code_point": 8800,
1654
+ "char": "≠",
1655
+ "width": 4,
1656
+ "height": 26,
1657
+ ],
1658
+ [
1659
+ "code_point": 8805,
1660
+ "char": "≥",
1661
+ "width": 4,
1662
+ "height": 26,
1663
+ ],
1664
+ [
1665
+ "code_point": 8804,
1666
+ "char": "≤",
1667
+ "width": 4,
1668
+ "height": 26,
1669
+ ],
1670
+ [
1671
+ "code_point": 177,
1672
+ "char": "±",
1673
+ "width": 4,
1674
+ "height": 26,
1675
+ ],
1676
+ [
1677
+ "code_point": 8776,
1678
+ "char": "≈",
1679
+ "width": 5,
1680
+ "height": 26,
1681
+ ],
1682
+ [
1683
+ "code_point": 172,
1684
+ "char": "¬",
1685
+ "width": 5,
1686
+ "height": 26,
1687
+ ],
1688
+ [
1689
+ "code_point": 8734,
1690
+ "char": "∞",
1691
+ "width": 8,
1692
+ "height": 26,
1693
+ ],
1694
+ [
1695
+ "code_point": 8747,
1696
+ "char": "∫",
1697
+ "width": 5,
1698
+ "height": 26,
1699
+ ],
1700
+ [
1701
+ "code_point": 8719,
1702
+ "char": "∏",
1703
+ "width": 5,
1704
+ "height": 26,
1705
+ ],
1706
+ [
1707
+ "code_point": 8721,
1708
+ "char": "∑",
1709
+ "width": 5,
1710
+ "height": 26,
1711
+ ],
1712
+ [
1713
+ "code_point": 8730,
1714
+ "char": "√",
1715
+ "width": 5,
1716
+ "height": 26,
1717
+ ],
1718
+ [
1719
+ "code_point": 8706,
1720
+ "char": "∂",
1721
+ "width": 5,
1722
+ "height": 26,
1723
+ ],
1724
+ [
1725
+ "code_point": 8240,
1726
+ "char": "‰",
1727
+ "width": 7,
1728
+ "height": 26,
1729
+ ],
1730
+ [
1731
+ "code_point": 8593,
1732
+ "char": "↑",
1733
+ "width": 6,
1734
+ "height": 26,
1735
+ ],
1736
+ [
1737
+ "code_point": 8599,
1738
+ "char": "↗",
1739
+ "width": 6,
1740
+ "height": 26,
1741
+ ],
1742
+ [
1743
+ "code_point": 8594,
1744
+ "char": "→",
1745
+ "width": 7,
1746
+ "height": 26,
1747
+ ],
1748
+ [
1749
+ "code_point": 8600,
1750
+ "char": "↘",
1751
+ "width": 6,
1752
+ "height": 26,
1753
+ ],
1754
+ [
1755
+ "code_point": 8595,
1756
+ "char": "↓",
1757
+ "width": 6,
1758
+ "height": 26,
1759
+ ],
1760
+ [
1761
+ "code_point": 8601,
1762
+ "char": "↙",
1763
+ "width": 6,
1764
+ "height": 26,
1765
+ ],
1766
+ [
1767
+ "code_point": 8592,
1768
+ "char": "←",
1769
+ "width": 7,
1770
+ "height": 26,
1771
+ ],
1772
+ [
1773
+ "code_point": 8598,
1774
+ "char": "↖",
1775
+ "width": 6,
1776
+ "height": 26,
1777
+ ],
1778
+ [
1779
+ "code_point": 8596,
1780
+ "char": "↔",
1781
+ "width": 8,
1782
+ "height": 26,
1783
+ ],
1784
+ [
1785
+ "code_point": 8597,
1786
+ "char": "↕",
1787
+ "width": 6,
1788
+ "height": 26,
1789
+ ],
1790
+ [
1791
+ "code_point": 9676,
1792
+ "char": "◌",
1793
+ "width": 9,
1794
+ "height": 26,
1795
+ ],
1796
+ [
1797
+ "code_point": 9674,
1798
+ "char": "◊",
1799
+ "width": 5,
1800
+ "height": 26,
1801
+ ],
1802
+ [
1803
+ "code_point": 168,
1804
+ "char": "¨",
1805
+ "width": 3,
1806
+ "height": 26,
1807
+ ],
1808
+ [
1809
+ "code_point": 729,
1810
+ "char": "˙",
1811
+ "width": 1,
1812
+ "height": 26,
1813
+ ],
1814
+ [
1815
+ "code_point": 96,
1816
+ "char": "`",
1817
+ "width": 2,
1818
+ "height": 26,
1819
+ ],
1820
+ [
1821
+ "code_point": 180,
1822
+ "char": "´",
1823
+ "width": 2,
1824
+ "height": 26,
1825
+ ],
1826
+ [
1827
+ "code_point": 733,
1828
+ "char": "˝",
1829
+ "width": 4,
1830
+ "height": 26,
1831
+ ],
1832
+ [
1833
+ "code_point": 710,
1834
+ "char": "ˆ",
1835
+ "width": 3,
1836
+ "height": 26,
1837
+ ],
1838
+ [
1839
+ "code_point": 711,
1840
+ "char": "ˇ",
1841
+ "width": 3,
1842
+ "height": 26,
1843
+ ],
1844
+ [
1845
+ "code_point": 728,
1846
+ "char": "˘",
1847
+ "width": 4,
1848
+ "height": 26,
1849
+ ],
1850
+ [
1851
+ "code_point": 730,
1852
+ "char": "˚",
1853
+ "width": 2,
1854
+ "height": 26,
1855
+ ],
1856
+ [
1857
+ "code_point": 732,
1858
+ "char": "˜",
1859
+ "width": 3,
1860
+ "height": 26,
1861
+ ],
1862
+ [
1863
+ "code_point": 175,
1864
+ "char": "¯",
1865
+ "width": 3,
1866
+ "height": 26,
1867
+ ],
1868
+ [
1869
+ "code_point": 184,
1870
+ "char": "¸",
1871
+ "width": 2,
1872
+ "height": 26,
1873
+ ],
1874
+ [
1875
+ "code_point": 731,
1876
+ "char": "˛",
1877
+ "width": 2,
1878
+ "height": 26,
1879
+ ],
1880
+ [
1881
+ "code_point": 306,
1882
+ "char": "IJ",
1883
+ "width": 4,
1884
+ "height": 26,
1885
+ ],
1886
+ [
1887
+ "code_point": 307,
1888
+ "char": "ij",
1889
+ "width": 2,
1890
+ "height": 26,
1891
+ ],
1892
+ [
1893
+ "code_point": 352,
1894
+ "char": "Š",
1895
+ "width": 5,
1896
+ "height": 26,
1897
+ ],
1898
+ [
1899
+ "code_point": 353,
1900
+ "char": "š",
1901
+ "width": 4,
1902
+ "height": 26,
1903
+ ],
1904
+ [
1905
+ "code_point": 381,
1906
+ "char": "Ž",
1907
+ "width": 5,
1908
+ "height": 26,
1909
+ ],
1910
+ [
1911
+ "code_point": 382,
1912
+ "char": "ž",
1913
+ "width": 4,
1914
+ "height": 26,
1915
+ ],
1916
+ [
1917
+ "code_point": 195,
1918
+ "char": "Ã",
1919
+ "width": 6,
1920
+ "height": 26,
1921
+ ],
1922
+ [
1923
+ "code_point": 197,
1924
+ "char": "Å",
1925
+ "width": 6,
1926
+ "height": 26,
1927
+ ],
1928
+ [
1929
+ "code_point": 198,
1930
+ "char": "Æ",
1931
+ "width": 8,
1932
+ "height": 26,
1933
+ ],
1934
+ [
1935
+ "code_point": 204,
1936
+ "char": "Ì",
1937
+ "width": 2,
1938
+ "height": 26,
1939
+ ],
1940
+ [
1941
+ "code_point": 208,
1942
+ "char": "Ð",
1943
+ "width": 5,
1944
+ "height": 26,
1945
+ ],
1946
+ [
1947
+ "code_point": 210,
1948
+ "char": "Ò",
1949
+ "width": 5,
1950
+ "height": 26,
1951
+ ],
1952
+ [
1953
+ "code_point": 213,
1954
+ "char": "Õ",
1955
+ "width": 5,
1956
+ "height": 26,
1957
+ ],
1958
+ [
1959
+ "code_point": 216,
1960
+ "char": "Ø",
1961
+ "width": 6,
1962
+ "height": 26,
1963
+ ],
1964
+ [
1965
+ "code_point": 221,
1966
+ "char": "Ý",
1967
+ "width": 6,
1968
+ "height": 26,
1969
+ ],
1970
+ [
1971
+ "code_point": 222,
1972
+ "char": "Þ",
1973
+ "width": 5,
1974
+ "height": 26,
1975
+ ],
1976
+ [
1977
+ "code_point": 227,
1978
+ "char": "ã",
1979
+ "width": 5,
1980
+ "height": 26,
1981
+ ],
1982
+ [
1983
+ "code_point": 229,
1984
+ "char": "å",
1985
+ "width": 5,
1986
+ "height": 26,
1987
+ ],
1988
+ [
1989
+ "code_point": 230,
1990
+ "char": "æ",
1991
+ "width": 8,
1992
+ "height": 26,
1993
+ ],
1994
+ [
1995
+ "code_point": 236,
1996
+ "char": "ì",
1997
+ "width": 2,
1998
+ "height": 26,
1999
+ ],
2000
+ [
2001
+ "code_point": 240,
2002
+ "char": "ð",
2003
+ "width": 5,
2004
+ "height": 26,
2005
+ ],
2006
+ [
2007
+ "code_point": 242,
2008
+ "char": "ò",
2009
+ "width": 4,
2010
+ "height": 26,
2011
+ ],
2012
+ [
2013
+ "code_point": 245,
2014
+ "char": "õ",
2015
+ "width": 4,
2016
+ "height": 26,
2017
+ ],
2018
+ [
2019
+ "code_point": 248,
2020
+ "char": "ø",
2021
+ "width": 5,
2022
+ "height": 26,
2023
+ ],
2024
+ [
2025
+ "code_point": 253,
2026
+ "char": "ý",
2027
+ "width": 5,
2028
+ "height": 26,
2029
+ ],
2030
+ [
2031
+ "code_point": 254,
2032
+ "char": "þ",
2033
+ "width": 4,
2034
+ "height": 26,
2035
+ ],
2036
+ ]
2037
+
2038
+ // Map characters directly to FontGlyph objects
2039
+ for glyph in hardcodedGlyphs {
2040
+ guard let codePoint = glyph["code_point"] as? Int,
2041
+ let width = glyph["width"] as? Int,
2042
+ let height = glyph["height"] as? Int
2043
+ else {
2044
+ continue
2045
+ }
2046
+
2047
+ let character = Character(UnicodeScalar(codePoint)!)
2048
+ fontMap[character] = FontGlyph(width: width, height: height)
2049
+ }
2050
+
2051
+ print("Hardcoded font data loaded successfully! \(fontMap.count) glyphs mapped.")
2052
+ }
2053
+
2054
+ func getGlyph(_ character: Character) -> FontGlyph {
2055
+ return fontMap[character] ?? FontGlyph(width: 6, height: 26) // Default width=6, height=26
2056
+ }
2057
+
2058
+ struct FontGlyph {
2059
+ let width: Int
2060
+ let height: Int
2061
+
2062
+ init(width: Int, height: Int) {
2063
+ self.width = width
2064
+ self.height = height
2065
+ }
2066
+ }
2067
+ }