gosu 0.15.2 → 1.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +138 -0
  3. data/dependencies/SDL/include/SDL_assert.h +293 -0
  4. data/dependencies/SDL/include/SDL_atomic.h +295 -0
  5. data/dependencies/SDL/include/SDL_audio.h +859 -0
  6. data/dependencies/SDL/include/SDL_bits.h +121 -0
  7. data/dependencies/SDL/include/SDL_blendmode.h +123 -0
  8. data/dependencies/SDL/include/SDL_clipboard.h +71 -0
  9. data/dependencies/SDL/include/SDL_config.h +55 -0
  10. data/dependencies/SDL/include/SDL_config_android.h +182 -0
  11. data/dependencies/SDL/include/SDL_config_iphoneos.h +207 -0
  12. data/dependencies/SDL/include/SDL_config_macosx.h +266 -0
  13. data/dependencies/SDL/include/SDL_config_minimal.h +85 -0
  14. data/dependencies/SDL/include/SDL_config_os2.h +188 -0
  15. data/dependencies/SDL/include/SDL_config_pandora.h +135 -0
  16. data/dependencies/SDL/include/SDL_config_psp.h +165 -0
  17. data/dependencies/SDL/include/SDL_config_windows.h +288 -0
  18. data/dependencies/SDL/include/SDL_config_winrt.h +243 -0
  19. data/dependencies/SDL/include/SDL_config_wiz.h +149 -0
  20. data/dependencies/SDL/include/SDL_copying.h +20 -0
  21. data/dependencies/SDL/include/SDL_cpuinfo.h +299 -0
  22. data/dependencies/SDL/include/SDL_egl.h +1676 -0
  23. data/dependencies/SDL/include/SDL_endian.h +263 -0
  24. data/dependencies/SDL/include/SDL_error.h +112 -0
  25. data/dependencies/SDL/include/SDL_events.h +827 -0
  26. data/dependencies/SDL/include/SDL_filesystem.h +136 -0
  27. data/dependencies/SDL/include/SDL_gamecontroller.h +541 -0
  28. data/dependencies/SDL/include/SDL_gesture.h +87 -0
  29. data/dependencies/SDL/include/SDL_haptic.h +1247 -0
  30. data/dependencies/SDL/include/SDL_hints.h +1578 -0
  31. data/dependencies/SDL/include/SDL_joystick.h +499 -0
  32. data/dependencies/SDL/include/SDL_keyboard.h +217 -0
  33. data/dependencies/SDL/include/SDL_keycode.h +351 -0
  34. data/dependencies/SDL/include/SDL_loadso.h +81 -0
  35. data/dependencies/SDL/include/SDL_locale.h +101 -0
  36. data/dependencies/SDL/include/SDL_log.h +211 -0
  37. data/dependencies/SDL/include/SDL_main.h +180 -0
  38. data/dependencies/SDL/include/SDL_messagebox.h +146 -0
  39. data/dependencies/SDL/include/SDL_metal.h +117 -0
  40. data/dependencies/SDL/include/SDL_misc.h +75 -0
  41. data/dependencies/SDL/include/SDL_mouse.h +302 -0
  42. data/dependencies/SDL/include/SDL_mutex.h +251 -0
  43. data/dependencies/SDL/include/SDL_name.h +33 -0
  44. data/dependencies/SDL/include/SDL_opengl.h +2183 -0
  45. data/dependencies/SDL/include/SDL_opengl_glext.h +11180 -0
  46. data/dependencies/SDL/include/SDL_opengles.h +39 -0
  47. data/dependencies/SDL/include/SDL_opengles2.h +52 -0
  48. data/dependencies/SDL/include/SDL_opengles2_gl2.h +621 -0
  49. data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +2050 -0
  50. data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +30 -0
  51. data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +282 -0
  52. data/dependencies/SDL/include/SDL_pixels.h +479 -0
  53. data/dependencies/SDL/include/SDL_platform.h +198 -0
  54. data/dependencies/SDL/include/SDL_power.h +75 -0
  55. data/dependencies/SDL/include/SDL_quit.h +58 -0
  56. data/dependencies/SDL/include/SDL_rect.h +174 -0
  57. data/dependencies/SDL/include/SDL_render.h +1158 -0
  58. data/dependencies/SDL/include/SDL_revision.h +2 -0
  59. data/dependencies/SDL/include/SDL_rwops.h +283 -0
  60. data/dependencies/SDL/include/SDL_scancode.h +413 -0
  61. data/dependencies/SDL/include/SDL_sensor.h +267 -0
  62. data/dependencies/SDL/include/SDL_shape.h +144 -0
  63. data/dependencies/SDL/include/SDL_stdinc.h +647 -0
  64. data/dependencies/SDL/include/SDL_surface.h +563 -0
  65. data/dependencies/SDL/include/SDL_system.h +325 -0
  66. data/dependencies/SDL/include/SDL_syswm.h +354 -0
  67. data/dependencies/SDL/include/SDL_test.h +69 -0
  68. data/dependencies/SDL/include/SDL_test_assert.h +105 -0
  69. data/dependencies/SDL/include/SDL_test_common.h +218 -0
  70. data/dependencies/SDL/include/SDL_test_compare.h +69 -0
  71. data/dependencies/SDL/include/SDL_test_crc32.h +124 -0
  72. data/dependencies/SDL/include/SDL_test_font.h +81 -0
  73. data/dependencies/SDL/include/SDL_test_fuzzer.h +384 -0
  74. data/dependencies/SDL/include/SDL_test_harness.h +134 -0
  75. data/dependencies/SDL/include/SDL_test_images.h +78 -0
  76. data/dependencies/SDL/include/SDL_test_log.h +67 -0
  77. data/dependencies/SDL/include/SDL_test_md5.h +129 -0
  78. data/dependencies/SDL/include/SDL_test_memory.h +63 -0
  79. data/dependencies/SDL/include/SDL_test_random.h +115 -0
  80. data/dependencies/SDL/include/SDL_thread.h +366 -0
  81. data/dependencies/SDL/include/SDL_timer.h +115 -0
  82. data/dependencies/SDL/include/SDL_touch.h +102 -0
  83. data/dependencies/SDL/include/SDL_types.h +29 -0
  84. data/dependencies/SDL/include/SDL_version.h +162 -0
  85. data/dependencies/SDL/include/SDL_video.h +1282 -0
  86. data/dependencies/SDL/include/SDL_vulkan.h +276 -0
  87. data/dependencies/SDL/include/begin_code.h +166 -0
  88. data/dependencies/SDL/include/close_code.h +40 -0
  89. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  90. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  91. data/dependencies/SDL_sound/SDL_sound.c +795 -0
  92. data/dependencies/SDL_sound/SDL_sound.h +725 -0
  93. data/dependencies/SDL_sound/SDL_sound_aiff.c +537 -0
  94. data/dependencies/SDL_sound/SDL_sound_au.c +352 -0
  95. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +747 -0
  96. data/dependencies/SDL_sound/SDL_sound_flac.c +182 -0
  97. data/dependencies/SDL_sound/SDL_sound_internal.h +304 -0
  98. data/dependencies/SDL_sound/SDL_sound_modplug.c +228 -0
  99. data/dependencies/SDL_sound/SDL_sound_mp3.c +184 -0
  100. data/dependencies/SDL_sound/SDL_sound_raw.c +164 -0
  101. data/dependencies/SDL_sound/SDL_sound_shn.c +1309 -0
  102. data/dependencies/SDL_sound/SDL_sound_voc.c +550 -0
  103. data/dependencies/SDL_sound/SDL_sound_vorbis.c +223 -0
  104. data/dependencies/SDL_sound/SDL_sound_wav.c +783 -0
  105. data/dependencies/SDL_sound/dr_flac.h +5906 -0
  106. data/dependencies/SDL_sound/dr_mp3.h +2832 -0
  107. data/dependencies/SDL_sound/libmodplug/fastmix.c +1748 -0
  108. data/dependencies/SDL_sound/libmodplug/libmodplug.h +1001 -0
  109. data/dependencies/SDL_sound/libmodplug/load_669.c +188 -0
  110. data/dependencies/SDL_sound/libmodplug/load_abc.c +4725 -0
  111. data/dependencies/SDL_sound/libmodplug/load_amf.c +403 -0
  112. data/dependencies/SDL_sound/libmodplug/load_ams.c +587 -0
  113. data/dependencies/SDL_sound/libmodplug/load_dbm.c +357 -0
  114. data/dependencies/SDL_sound/libmodplug/load_dmf.c +531 -0
  115. data/dependencies/SDL_sound/libmodplug/load_dsm.c +232 -0
  116. data/dependencies/SDL_sound/libmodplug/load_far.c +253 -0
  117. data/dependencies/SDL_sound/libmodplug/load_it.c +796 -0
  118. data/dependencies/SDL_sound/libmodplug/load_mdl.c +488 -0
  119. data/dependencies/SDL_sound/libmodplug/load_med.c +757 -0
  120. data/dependencies/SDL_sound/libmodplug/load_mid.c +1405 -0
  121. data/dependencies/SDL_sound/libmodplug/load_mod.c +269 -0
  122. data/dependencies/SDL_sound/libmodplug/load_mt2.c +546 -0
  123. data/dependencies/SDL_sound/libmodplug/load_mtm.c +142 -0
  124. data/dependencies/SDL_sound/libmodplug/load_okt.c +192 -0
  125. data/dependencies/SDL_sound/libmodplug/load_pat.c +1143 -0
  126. data/dependencies/SDL_sound/libmodplug/load_pat.h +25 -0
  127. data/dependencies/SDL_sound/libmodplug/load_psm.c +350 -0
  128. data/dependencies/SDL_sound/libmodplug/load_ptm.c +204 -0
  129. data/dependencies/SDL_sound/libmodplug/load_s3m.c +325 -0
  130. data/dependencies/SDL_sound/libmodplug/load_stm.c +180 -0
  131. data/dependencies/SDL_sound/libmodplug/load_ult.c +206 -0
  132. data/dependencies/SDL_sound/libmodplug/load_umx.c +51 -0
  133. data/dependencies/SDL_sound/libmodplug/load_xm.c +554 -0
  134. data/dependencies/SDL_sound/libmodplug/mmcmp.c +382 -0
  135. data/dependencies/SDL_sound/libmodplug/modplug.c +170 -0
  136. data/dependencies/SDL_sound/libmodplug/modplug.h +90 -0
  137. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +301 -0
  138. data/dependencies/SDL_sound/libmodplug/snd_flt.c +63 -0
  139. data/dependencies/SDL_sound/libmodplug/snd_fx.c +2350 -0
  140. data/dependencies/SDL_sound/libmodplug/sndfile.c +1169 -0
  141. data/dependencies/SDL_sound/libmodplug/sndmix.c +1034 -0
  142. data/dependencies/SDL_sound/libmodplug/tables.h +371 -0
  143. data/{src/stb_vorbis.c → dependencies/SDL_sound/stb_vorbis.h} +143 -78
  144. data/dependencies/al_soft/AL/al.h +655 -0
  145. data/dependencies/al_soft/AL/alc.h +270 -0
  146. data/dependencies/al_soft/AL/alext.h +585 -0
  147. data/dependencies/al_soft/AL/efx-creative.h +3 -0
  148. data/dependencies/al_soft/AL/efx-presets.h +402 -0
  149. data/dependencies/al_soft/AL/efx.h +762 -0
  150. data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
  151. data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
  152. data/{src → dependencies/stb}/stb_image.h +330 -127
  153. data/{src → dependencies/stb}/stb_image_write.h +156 -85
  154. data/{src → dependencies/stb}/stb_truetype.h +192 -69
  155. data/{src → dependencies/utf8proc}/utf8proc.c +0 -0
  156. data/{src → dependencies/utf8proc}/utf8proc.h +0 -0
  157. data/{src → dependencies/utf8proc}/utf8proc_data.h +0 -0
  158. data/ext/gosu/extconf.rb +56 -22
  159. data/{Gosu → include/Gosu}/Audio.hpp +6 -8
  160. data/{Gosu → include/Gosu}/AutoLink.hpp +0 -0
  161. data/include/Gosu/Bitmap.hpp +100 -0
  162. data/{Gosu → include/Gosu}/Buttons.hpp +94 -35
  163. data/{Gosu → include/Gosu}/Channel.h +0 -0
  164. data/{Gosu → include/Gosu}/Color.h +0 -0
  165. data/{Gosu → include/Gosu}/Color.hpp +0 -0
  166. data/{Gosu → include/Gosu}/Directories.hpp +0 -0
  167. data/{Gosu → include/Gosu}/Font.h +0 -0
  168. data/{Gosu → include/Gosu}/Font.hpp +0 -0
  169. data/{Gosu → include/Gosu}/Fwd.hpp +0 -0
  170. data/{Gosu → include/Gosu}/Gosu.h +3 -0
  171. data/{Gosu → include/Gosu}/Gosu.hpp +0 -0
  172. data/{Gosu → include/Gosu}/Graphics.hpp +0 -0
  173. data/{Gosu → include/Gosu}/GraphicsBase.hpp +0 -0
  174. data/{Gosu → include/Gosu}/IO.hpp +0 -0
  175. data/{Gosu → include/Gosu}/Image.h +0 -0
  176. data/{Gosu → include/Gosu}/Image.hpp +7 -6
  177. data/{Gosu → include/Gosu}/ImageData.hpp +0 -0
  178. data/{Gosu → include/Gosu}/Input.hpp +30 -15
  179. data/{Gosu → include/Gosu}/Inspection.hpp +0 -0
  180. data/{Gosu → include/Gosu}/Math.hpp +0 -0
  181. data/{Gosu → include/Gosu}/Platform.hpp +0 -0
  182. data/{Gosu → include/Gosu}/Sample.h +0 -0
  183. data/{Gosu → include/Gosu}/Song.h +0 -0
  184. data/{Gosu → include/Gosu}/Text.hpp +0 -0
  185. data/{Gosu → include/Gosu}/TextInput.h +0 -0
  186. data/{Gosu → include/Gosu}/TextInput.hpp +0 -0
  187. data/{Gosu → include/Gosu}/Timing.hpp +0 -0
  188. data/{Gosu → include/Gosu}/Utility.hpp +1 -1
  189. data/{Gosu → include/Gosu}/Version.hpp +0 -0
  190. data/{Gosu → include/Gosu}/Window.h +2 -0
  191. data/{Gosu → include/Gosu}/Window.hpp +21 -13
  192. data/lib/OpenAL32.dll +0 -0
  193. data/lib/SDL2.dll +0 -0
  194. data/lib/gosu.rb +0 -3
  195. data/lib/gosu/patches.rb +0 -9
  196. data/lib/gosu/swig_patches.rb +3 -2
  197. data/lib/libmpg123.dll +0 -0
  198. data/lib/libsndfile.dll +0 -0
  199. data/lib64/OpenAL32.dll +0 -0
  200. data/lib64/SDL2.dll +0 -0
  201. data/lib64/libmpg123.dll +0 -0
  202. data/lib64/libsndfile.dll +0 -0
  203. data/rdoc/gosu.rb +95 -20
  204. data/src/Audio.cpp +50 -224
  205. data/src/AudioFile.hpp +17 -37
  206. data/src/AudioFileAudioToolbox.cpp +237 -0
  207. data/src/AudioFileSDLSound.cpp +147 -0
  208. data/src/AudioImpl.cpp +3 -12
  209. data/src/AudioImpl.hpp +3 -1
  210. data/src/Bitmap.cpp +85 -83
  211. data/src/BitmapIO.cpp +52 -58
  212. data/src/Constants.cpp +80 -33
  213. data/src/Font.cpp +3 -1
  214. data/src/GosuWrapper.cpp +19 -0
  215. data/src/Graphics.cpp +7 -4
  216. data/src/Image.cpp +13 -16
  217. data/src/Input.cpp +408 -159
  218. data/src/LargeImageData.cpp +1 -1
  219. data/src/MarkupParser.cpp +2 -1
  220. data/src/RubyGosu.cxx +349 -83
  221. data/src/RubyGosu.h +4 -2
  222. data/src/TexChunk.cpp +1 -1
  223. data/src/TextBuilder.cpp +3 -1
  224. data/src/Texture.cpp +1 -1
  225. data/src/TrueTypeFont.cpp +1 -1
  226. data/src/Utility.cpp +11 -7
  227. data/src/Window.cpp +30 -39
  228. data/src/WindowWrapper.cpp +28 -0
  229. metadata +207 -52
  230. data/Gosu/Bitmap.hpp +0 -113
  231. data/src/AudioToolboxFile.hpp +0 -210
  232. data/src/OggFile.hpp +0 -92
  233. data/src/SndFile.hpp +0 -174
  234. data/src/WinMain.cpp +0 -64
@@ -1,5 +1,14 @@
1
- // stb_truetype.h - v1.22 - public domain
2
- // authored from 2009-2019 by Sean Barrett / RAD Game Tools
1
+ // stb_truetype.h - v1.24 - public domain
2
+ // authored from 2009-2020 by Sean Barrett / RAD Game Tools
3
+ //
4
+ // =======================================================================
5
+ //
6
+ // NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES
7
+ //
8
+ // This library does no range checking of the offsets found in the file,
9
+ // meaning an attacker can use it to read arbitrary memory.
10
+ //
11
+ // =======================================================================
3
12
  //
4
13
  // This library processes TrueType files:
5
14
  // parse files
@@ -32,11 +41,11 @@
32
41
  // Daniel Ribeiro Maciel
33
42
  //
34
43
  // Bug/warning reports/fixes:
35
- // "Zer" on mollyrocket Fabian "ryg" Giesen
36
- // Cass Everitt Martins Mozeiko
37
- // stoiko (Haemimont Games) Cap Petschulat
38
- // Brian Hook Omar Cornut
39
- // Walter van Niftrik github:aloucks
44
+ // "Zer" on mollyrocket Fabian "ryg" Giesen github:NiLuJe
45
+ // Cass Everitt Martins Mozeiko github:aloucks
46
+ // stoiko (Haemimont Games) Cap Petschulat github:oyvindjam
47
+ // Brian Hook Omar Cornut github:vassvik
48
+ // Walter van Niftrik Ryan Griege
40
49
  // David Gow Peter LaValle
41
50
  // David Given Sergey Popov
42
51
  // Ivan-Assen Ivanov Giumo X. Clanjor
@@ -44,13 +53,14 @@
44
53
  // Johan Duparc Thomas Fields
45
54
  // Hou Qiming Derek Vinyard
46
55
  // Rob Loach Cort Stratton
47
- // Kenney Phillis Jr. github:oyvindjam
48
- // Brian Costabile github:vassvik
49
- // Ken Voskuil (kaesve) Ryan Griege
50
- //
56
+ // Kenney Phillis Jr. Brian Costabile
57
+ // Ken Voskuil (kaesve)
58
+ //
51
59
  // VERSION HISTORY
52
60
  //
53
- // 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined
61
+ // 1.24 (2020-02-05) fix warning
62
+ // 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS)
63
+ // 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined
54
64
  // 1.21 (2019-02-25) fix warning
55
65
  // 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()
56
66
  // 1.19 (2018-02-11) GPOS kerning, STBTT_fmod
@@ -210,7 +220,7 @@
210
220
  //
211
221
  // Advancing for the next character:
212
222
  // Call GlyphHMetrics, and compute 'current_point += SF * advance'.
213
- //
223
+ //
214
224
  //
215
225
  // ADVANCED USAGE
216
226
  //
@@ -335,7 +345,7 @@ int main(int argc, char **argv)
335
345
  }
336
346
  return 0;
337
347
  }
338
- #endif
348
+ #endif
339
349
  //
340
350
  // Output:
341
351
  //
@@ -349,9 +359,9 @@ int main(int argc, char **argv)
349
359
  // :@@. M@M
350
360
  // @@@o@@@@
351
361
  // :M@@V:@@.
352
- //
362
+ //
353
363
  //////////////////////////////////////////////////////////////////////////////
354
- //
364
+ //
355
365
  // Complete program: print "Hello World!" banner, with bugs
356
366
  //
357
367
  #if 0
@@ -652,7 +662,7 @@ STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, cons
652
662
  // Calling these functions in sequence is roughly equivalent to calling
653
663
  // stbtt_PackFontRanges(). If you more control over the packing of multiple
654
664
  // fonts, or if you want to pack custom data into a font texture, take a look
655
- // at the source to of stbtt_PackFontRanges() and create a custom version
665
+ // at the source to of stbtt_PackFontRanges() and create a custom version
656
666
  // using these functions, e.g. call GatherRects multiple times,
657
667
  // building up a single array of rects, then call PackRects once,
658
668
  // then call RenderIntoRects repeatedly. This may result in a
@@ -704,7 +714,7 @@ struct stbtt_fontinfo
704
714
 
705
715
  int numGlyphs; // number of glyphs, needed for range checking
706
716
 
707
- int loca,head,glyf,hhea,hmtx,kern,gpos; // table locations as offset from start of .ttf
717
+ int loca,head,glyf,hhea,hmtx,kern,gpos,svg; // table locations as offset from start of .ttf
708
718
  int index_map; // a cmap mapping for our chosen character encoding
709
719
  int indexToLocFormat; // format needed to map from glyph index to glyph
710
720
 
@@ -787,6 +797,18 @@ STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int glyph1,
787
797
  STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1);
788
798
  // as above, but takes one or more glyph indices for greater efficiency
789
799
 
800
+ typedef struct stbtt_kerningentry
801
+ {
802
+ int glyph1; // use stbtt_FindGlyphIndex
803
+ int glyph2;
804
+ int advance;
805
+ } stbtt_kerningentry;
806
+
807
+ STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info);
808
+ STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length);
809
+ // Retrieves a complete list of all of the kerning pairs provided by the font
810
+ // stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write.
811
+ // The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)
790
812
 
791
813
  //////////////////////////////////////////////////////////////////////////////
792
814
  //
@@ -831,6 +853,11 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
831
853
  STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices);
832
854
  // frees the data allocated above
833
855
 
856
+ STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg);
857
+ STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg);
858
+ // fills svg with the character's SVG data.
859
+ // returns data size or 0 if SVG not found.
860
+
834
861
  //////////////////////////////////////////////////////////////////////////////
835
862
  //
836
863
  // BITMAP RENDERING
@@ -960,7 +987,7 @@ STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, floa
960
987
  // and computing from that can allow drop-out prevention).
961
988
  //
962
989
  // The algorithm has not been optimized at all, so expect it to be slow
963
- // if computing lots of characters or very large sizes.
990
+ // if computing lots of characters or very large sizes.
964
991
 
965
992
 
966
993
 
@@ -1332,6 +1359,22 @@ static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict)
1332
1359
  return stbtt__cff_get_index(&cff);
1333
1360
  }
1334
1361
 
1362
+ // since most people won't use this, find this table the first time it's needed
1363
+ static int stbtt__get_svg(stbtt_fontinfo *info)
1364
+ {
1365
+ stbtt_uint32 t;
1366
+ if (info->svg < 0) {
1367
+ t = stbtt__find_table(info->data, info->fontstart, "SVG ");
1368
+ if (t) {
1369
+ stbtt_uint32 offset = ttULONG(info->data + t + 2);
1370
+ info->svg = t + offset;
1371
+ } else {
1372
+ info->svg = 0;
1373
+ }
1374
+ }
1375
+ return info->svg;
1376
+ }
1377
+
1335
1378
  static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart)
1336
1379
  {
1337
1380
  stbtt_uint32 cmap, t;
@@ -1411,6 +1454,8 @@ static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, in
1411
1454
  else
1412
1455
  info->numGlyphs = 0xffff;
1413
1456
 
1457
+ info->svg = -1;
1458
+
1414
1459
  // find a cmap encoding table we understand *now* to avoid searching
1415
1460
  // later. (todo: could make this installable)
1416
1461
  // the same regardless of glyph.
@@ -1717,7 +1762,7 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
1717
1762
  if (i != 0)
1718
1763
  num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
1719
1764
 
1720
- // now start the new one
1765
+ // now start the new one
1721
1766
  start_off = !(flags & 1);
1722
1767
  if (start_off) {
1723
1768
  // if we start off with an off-curve point, then when we need to find a point on the curve
@@ -1759,7 +1804,7 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
1759
1804
  }
1760
1805
  }
1761
1806
  num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
1762
- } else if (numberOfContours == -1) {
1807
+ } else if (numberOfContours < 0) {
1763
1808
  // Compound shapes.
1764
1809
  int more = 1;
1765
1810
  stbtt_uint8 *comp = data + g + 10;
@@ -1770,7 +1815,7 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
1770
1815
  int comp_num_verts = 0, i;
1771
1816
  stbtt_vertex *comp_verts = 0, *tmp = 0;
1772
1817
  float mtx[6] = {1,0,0,1,0,0}, m, n;
1773
-
1818
+
1774
1819
  flags = ttSHORT(comp); comp+=2;
1775
1820
  gidx = ttSHORT(comp); comp+=2;
1776
1821
 
@@ -1800,7 +1845,7 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
1800
1845
  mtx[2] = ttSHORT(comp)/16384.0f; comp+=2;
1801
1846
  mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;
1802
1847
  }
1803
-
1848
+
1804
1849
  // Find transformation scales.
1805
1850
  m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]);
1806
1851
  n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]);
@@ -1836,9 +1881,6 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
1836
1881
  // More components ?
1837
1882
  more = flags & (1<<5);
1838
1883
  }
1839
- } else if (numberOfContours < 0) {
1840
- // @TODO other compound variations?
1841
- STBTT_assert(0);
1842
1884
  } else {
1843
1885
  // numberOfCounters == 0, do nothing
1844
1886
  }
@@ -2267,6 +2309,48 @@ STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_inde
2267
2309
  }
2268
2310
  }
2269
2311
 
2312
+ STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info)
2313
+ {
2314
+ stbtt_uint8 *data = info->data + info->kern;
2315
+
2316
+ // we only look at the first table. it must be 'horizontal' and format 0.
2317
+ if (!info->kern)
2318
+ return 0;
2319
+ if (ttUSHORT(data+2) < 1) // number of tables, need at least 1
2320
+ return 0;
2321
+ if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format
2322
+ return 0;
2323
+
2324
+ return ttUSHORT(data+10);
2325
+ }
2326
+
2327
+ STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length)
2328
+ {
2329
+ stbtt_uint8 *data = info->data + info->kern;
2330
+ int k, length;
2331
+
2332
+ // we only look at the first table. it must be 'horizontal' and format 0.
2333
+ if (!info->kern)
2334
+ return 0;
2335
+ if (ttUSHORT(data+2) < 1) // number of tables, need at least 1
2336
+ return 0;
2337
+ if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format
2338
+ return 0;
2339
+
2340
+ length = ttUSHORT(data+10);
2341
+ if (table_length < length)
2342
+ length = table_length;
2343
+
2344
+ for (k = 0; k < length; k++)
2345
+ {
2346
+ table[k].glyph1 = ttUSHORT(data+18+(k*6));
2347
+ table[k].glyph2 = ttUSHORT(data+20+(k*6));
2348
+ table[k].advance = ttSHORT(data+22+(k*6));
2349
+ }
2350
+
2351
+ return length;
2352
+ }
2353
+
2270
2354
  static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2)
2271
2355
  {
2272
2356
  stbtt_uint8 *data = info->data + info->kern;
@@ -2603,6 +2687,45 @@ STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
2603
2687
  STBTT_free(v, info->userdata);
2604
2688
  }
2605
2689
 
2690
+ STBTT_DEF stbtt_uint8 *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl)
2691
+ {
2692
+ int i;
2693
+ stbtt_uint8 *data = info->data;
2694
+ stbtt_uint8 *svg_doc_list = data + stbtt__get_svg((stbtt_fontinfo *) info);
2695
+
2696
+ int numEntries = ttUSHORT(svg_doc_list);
2697
+ stbtt_uint8 *svg_docs = svg_doc_list + 2;
2698
+
2699
+ for(i=0; i<numEntries; i++) {
2700
+ stbtt_uint8 *svg_doc = svg_docs + (12 * i);
2701
+ if ((gl >= ttUSHORT(svg_doc)) && (gl <= ttUSHORT(svg_doc + 2)))
2702
+ return svg_doc;
2703
+ }
2704
+ return 0;
2705
+ }
2706
+
2707
+ STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg)
2708
+ {
2709
+ stbtt_uint8 *data = info->data;
2710
+ stbtt_uint8 *svg_doc;
2711
+
2712
+ if (info->svg == 0)
2713
+ return 0;
2714
+
2715
+ svg_doc = stbtt_FindSVGDoc(info, gl);
2716
+ if (svg_doc != NULL) {
2717
+ *svg = (char *) data + info->svg + ttULONG(svg_doc + 4);
2718
+ return ttULONG(svg_doc + 8);
2719
+ } else {
2720
+ return 0;
2721
+ }
2722
+ }
2723
+
2724
+ STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg)
2725
+ {
2726
+ return stbtt_GetGlyphSVG(info, stbtt_FindGlyphIndex(info, unicode_codepoint), svg);
2727
+ }
2728
+
2606
2729
  //////////////////////////////////////////////////////////////////////////////
2607
2730
  //
2608
2731
  // antialiasing software rasterizer
@@ -2728,7 +2851,7 @@ static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, i
2728
2851
  float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
2729
2852
  STBTT_assert(z != NULL);
2730
2853
  if (!z) return z;
2731
-
2854
+
2732
2855
  // round dx down to avoid overshooting
2733
2856
  if (dxdy < 0)
2734
2857
  z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy);
@@ -2806,7 +2929,7 @@ static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__ac
2806
2929
  }
2807
2930
  }
2808
2931
  }
2809
-
2932
+
2810
2933
  e = e->next;
2811
2934
  }
2812
2935
  }
@@ -3534,7 +3657,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
3534
3657
  {
3535
3658
  int ix0,iy0,ix1,iy1;
3536
3659
  stbtt__bitmap gbm;
3537
- stbtt_vertex *vertices;
3660
+ stbtt_vertex *vertices;
3538
3661
  int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
3539
3662
 
3540
3663
  if (scale_x == 0) scale_x = scale_y;
@@ -3557,7 +3680,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
3557
3680
  if (height) *height = gbm.h;
3558
3681
  if (xoff ) *xoff = ix0;
3559
3682
  if (yoff ) *yoff = iy0;
3560
-
3683
+
3561
3684
  if (gbm.w && gbm.h) {
3562
3685
  gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata);
3563
3686
  if (gbm.pixels) {
@@ -3568,7 +3691,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
3568
3691
  }
3569
3692
  STBTT_free(vertices, info->userdata);
3570
3693
  return gbm.pixels;
3571
- }
3694
+ }
3572
3695
 
3573
3696
  STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff)
3574
3697
  {
@@ -3580,7 +3703,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigne
3580
3703
  int ix0,iy0;
3581
3704
  stbtt_vertex *vertices;
3582
3705
  int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
3583
- stbtt__bitmap gbm;
3706
+ stbtt__bitmap gbm;
3584
3707
 
3585
3708
  stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0);
3586
3709
  gbm.pixels = output;
@@ -3602,7 +3725,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *
3602
3725
  STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff)
3603
3726
  {
3604
3727
  return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff);
3605
- }
3728
+ }
3606
3729
 
3607
3730
  STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint)
3608
3731
  {
@@ -3617,7 +3740,7 @@ STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, uns
3617
3740
  STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff)
3618
3741
  {
3619
3742
  return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff);
3620
- }
3743
+ }
3621
3744
 
3622
3745
  STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint)
3623
3746
  {
@@ -3742,7 +3865,7 @@ static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *no
3742
3865
  con->y = 0;
3743
3866
  con->bottom_y = 0;
3744
3867
  STBTT__NOTUSED(nodes);
3745
- STBTT__NOTUSED(num_nodes);
3868
+ STBTT__NOTUSED(num_nodes);
3746
3869
  }
3747
3870
 
3748
3871
  static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects)
@@ -4137,7 +4260,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char
4137
4260
  n = 0;
4138
4261
  for (i=0; i < num_ranges; ++i)
4139
4262
  n += ranges[i].num_chars;
4140
-
4263
+
4141
4264
  rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context);
4142
4265
  if (rects == NULL)
4143
4266
  return 0;
@@ -4148,7 +4271,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char
4148
4271
  n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects);
4149
4272
 
4150
4273
  stbtt_PackFontRangesPackRects(spc, rects, n);
4151
-
4274
+
4152
4275
  return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects);
4153
4276
 
4154
4277
  STBTT_free(rects, spc->user_allocator_context);
@@ -4309,7 +4432,7 @@ static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex
4309
4432
  int x1 = (int) verts[i ].x, y1 = (int) verts[i ].y;
4310
4433
  if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
4311
4434
  float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
4312
- if (x_inter < x)
4435
+ if (x_inter < x)
4313
4436
  winding += (y0 < y1) ? 1 : -1;
4314
4437
  }
4315
4438
  }
@@ -4335,7 +4458,7 @@ static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex
4335
4458
  y1 = (int)verts[i ].y;
4336
4459
  if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
4337
4460
  float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
4338
- if (x_inter < x)
4461
+ if (x_inter < x)
4339
4462
  winding += (y0 < y1) ? 1 : -1;
4340
4463
  }
4341
4464
  } else {
@@ -4347,7 +4470,7 @@ static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex
4347
4470
  if (hits[1][0] < 0)
4348
4471
  winding += (hits[1][1] < 0 ? -1 : 1);
4349
4472
  }
4350
- }
4473
+ }
4351
4474
  }
4352
4475
  }
4353
4476
  return winding;
@@ -4423,7 +4546,7 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
4423
4546
 
4424
4547
  // invert for y-downwards bitmaps
4425
4548
  scale_y = -scale_y;
4426
-
4549
+
4427
4550
  {
4428
4551
  int x,y,i,j;
4429
4552
  float *precompute;
@@ -4572,7 +4695,7 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
4572
4695
  STBTT_free(verts, info->userdata);
4573
4696
  }
4574
4697
  return data;
4575
- }
4698
+ }
4576
4699
 
4577
4700
  STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)
4578
4701
  {
@@ -4590,7 +4713,7 @@ STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)
4590
4713
  //
4591
4714
 
4592
4715
  // check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string
4593
- static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2)
4716
+ static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2)
4594
4717
  {
4595
4718
  stbtt_int32 i=0;
4596
4719
 
@@ -4629,7 +4752,7 @@ static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, s
4629
4752
  return i;
4630
4753
  }
4631
4754
 
4632
- static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2)
4755
+ static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2)
4633
4756
  {
4634
4757
  return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2);
4635
4758
  }
@@ -4758,7 +4881,7 @@ STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,
4758
4881
 
4759
4882
  STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index)
4760
4883
  {
4761
- return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index);
4884
+ return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index);
4762
4885
  }
4763
4886
 
4764
4887
  STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data)
@@ -4851,38 +4974,38 @@ This software is available under 2 licenses -- choose whichever you prefer.
4851
4974
  ------------------------------------------------------------------------------
4852
4975
  ALTERNATIVE A - MIT License
4853
4976
  Copyright (c) 2017 Sean Barrett
4854
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4855
- this software and associated documentation files (the "Software"), to deal in
4856
- the Software without restriction, including without limitation the rights to
4857
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
4858
- of the Software, and to permit persons to whom the Software is furnished to do
4977
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4978
+ this software and associated documentation files (the "Software"), to deal in
4979
+ the Software without restriction, including without limitation the rights to
4980
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
4981
+ of the Software, and to permit persons to whom the Software is furnished to do
4859
4982
  so, subject to the following conditions:
4860
- The above copyright notice and this permission notice shall be included in all
4983
+ The above copyright notice and this permission notice shall be included in all
4861
4984
  copies or substantial portions of the Software.
4862
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4863
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4864
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4865
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4866
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4867
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4985
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4986
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4987
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4988
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4989
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4990
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4868
4991
  SOFTWARE.
4869
4992
  ------------------------------------------------------------------------------
4870
4993
  ALTERNATIVE B - Public Domain (www.unlicense.org)
4871
4994
  This is free and unencumbered software released into the public domain.
4872
- Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
4873
- software, either in source code form or as a compiled binary, for any purpose,
4995
+ Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
4996
+ software, either in source code form or as a compiled binary, for any purpose,
4874
4997
  commercial or non-commercial, and by any means.
4875
- In jurisdictions that recognize copyright laws, the author or authors of this
4876
- software dedicate any and all copyright interest in the software to the public
4877
- domain. We make this dedication for the benefit of the public at large and to
4878
- the detriment of our heirs and successors. We intend this dedication to be an
4879
- overt act of relinquishment in perpetuity of all present and future rights to
4998
+ In jurisdictions that recognize copyright laws, the author or authors of this
4999
+ software dedicate any and all copyright interest in the software to the public
5000
+ domain. We make this dedication for the benefit of the public at large and to
5001
+ the detriment of our heirs and successors. We intend this dedication to be an
5002
+ overt act of relinquishment in perpetuity of all present and future rights to
4880
5003
  this software under copyright law.
4881
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4882
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4883
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4884
- AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
4885
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5004
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5005
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5006
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5007
+ AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
5008
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
4886
5009
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4887
5010
  ------------------------------------------------------------------------------
4888
5011
  */