diff --git a/README.md b/README.md index fabea7c36..6d25cd8e4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-A modern text renderer for GameMaker Studio 2.3.6+ by @jujuadams
diff --git a/Scribble.yyp b/Scribble.yyp index 3591461b1..e4a2c8d08 100644 --- a/Scribble.yyp +++ b/Scribble.yyp @@ -28,7 +28,7 @@ {"id":{"name":"obj_test_scale_to_box_plus_transformation","path":"objects/obj_test_scale_to_box_plus_transformation/obj_test_scale_to_box_plus_transformation.yy",},"order":14,}, {"id":{"name":"obj_test_hash_to_newline","path":"objects/obj_test_hash_to_newline/obj_test_hash_to_newline.yy",},"order":0,}, {"id":{"name":"obj_test_msdf_comparison","path":"objects/obj_test_msdf_comparison/obj_test_msdf_comparison.yy",},"order":6,}, - {"id":{"name":"spr_msdf_notoarabic","path":"sprites/spr_msdf_notoarabic/spr_msdf_notoarabic.yy",},"order":19,}, + {"id":{"name":"spr_msdf_notoarabic","path":"sprites/spr_msdf_notoarabic/spr_msdf_notoarabic.yy",},"order":20,}, {"id":{"name":"obj_test_legacy_typewriter_custom","path":"objects/obj_test_legacy_typewriter_custom/obj_test_legacy_typewriter_custom.yy",},"order":5,}, {"id":{"name":"obj_example_basic","path":"objects/obj_example_basic/obj_example_basic.yy",},"order":1,}, {"id":{"name":"obj_test_padding_fit_to_box","path":"objects/obj_test_padding_fit_to_box/obj_test_padding_fit_to_box.yy",},"order":3,}, @@ -40,7 +40,7 @@ {"id":{"name":"fnt_style_invalid","path":"fonts/fnt_style_invalid/fnt_style_invalid.yy",},"order":13,}, {"id":{"name":"obj_test_default","path":"objects/obj_test_default/obj_test_default.yy",},"order":0,}, {"id":{"name":"scribble_font_scale","path":"scripts/scribble_font_scale/scribble_font_scale.yy",},"order":11,}, - {"id":{"name":"spr_msdf_industrydemi","path":"sprites/spr_msdf_industrydemi/spr_msdf_industrydemi.yy",},"order":18,}, + {"id":{"name":"spr_msdf_industrydemi","path":"sprites/spr_msdf_industrydemi/spr_msdf_industrydemi.yy",},"order":19,}, {"id":{"name":"obj_test_combine_and_scale","path":"objects/obj_test_combine_and_scale/obj_test_combine_and_scale.yy",},"order":3,}, {"id":{"name":"example_dialogue_set_name","path":"scripts/example_dialogue_set_name/example_dialogue_set_name.yy",},"order":5,}, {"id":{"name":"obj_test_newline_left_trim","path":"objects/obj_test_newline_left_trim/obj_test_newline_left_trim.yy",},"order":9,}, @@ -85,6 +85,7 @@ {"id":{"name":"__scribble_config_colours","path":"scripts/__scribble_config_colours/__scribble_config_colours.yy",},"order":2,}, {"id":{"name":"__scribble_class_model","path":"scripts/__scribble_class_model/__scribble_class_model.yy",},"order":2,}, {"id":{"name":"scribble_font_rename","path":"scripts/scribble_font_rename/scribble_font_rename.yy",},"order":1,}, + {"id":{"name":"obj_test_devangari_basic","path":"objects/obj_test_devangari_basic/obj_test_devangari_basic.yy",},"order":0,}, {"id":{"name":"obj_test_debug_draw_bbox","path":"objects/obj_test_debug_draw_bbox/obj_test_debug_draw_bbox.yy",},"order":15,}, {"id":{"name":"obj_test_legacy_typewriter","path":"objects/obj_test_legacy_typewriter/obj_test_legacy_typewriter.yy",},"order":1,}, {"id":{"name":"obj_test_legacy_typewriter_pos","path":"objects/obj_test_legacy_typewriter_pos/obj_test_legacy_typewriter_pos.yy",},"order":6,}, @@ -110,7 +111,7 @@ {"id":{"name":"obj_test_anim_cycle","path":"objects/obj_test_anim_cycle/obj_test_anim_cycle.yy",},"order":7,}, {"id":{"name":"scribble_glyph_set","path":"scripts/scribble_glyph_set/scribble_glyph_set.yy",},"order":4,}, {"id":{"name":"obj_test_typewriter_sound_per_char","path":"objects/obj_test_typewriter_sound_per_char/obj_test_typewriter_sound_per_char.yy",},"order":10,}, - {"id":{"name":"fnt_hebrew","path":"fonts/fnt_hebrew/fnt_hebrew.yy",},"order":20,}, + {"id":{"name":"fnt_hebrew","path":"fonts/fnt_hebrew/fnt_hebrew.yy",},"order":21,}, {"id":{"name":"obj_test_newline","path":"objects/obj_test_newline/obj_test_newline.yy",},"order":8,}, {"id":{"name":"obj_test_reset","path":"objects/obj_test_reset/obj_test_reset.yy",},"order":17,}, {"id":{"name":"obj_test_wrap_very_narrow","path":"objects/obj_test_wrap_very_narrow/obj_test_wrap_very_narrow.yy",},"order":1,}, @@ -162,6 +163,7 @@ {"id":{"name":"__shd_scribble_bake_outline_8dir_2px","path":"shaders/__shd_scribble_bake_outline_8dir_2px/__shd_scribble_bake_outline_8dir_2px.yy",},"order":4,}, {"id":{"name":"obj_test_font_shadow","path":"objects/obj_test_font_shadow/obj_test_font_shadow.yy",},"order":10,}, {"id":{"name":"obj_test_anim_wobble","path":"objects/obj_test_anim_wobble/obj_test_anim_wobble.yy",},"order":4,}, + {"id":{"name":"UnicodeToKrutidev","path":"scripts/UnicodeToKrutidev/UnicodeToKrutidev.yy",},"order":6,}, {"id":{"name":"obj_test_msdf_drop_shadow","path":"objects/obj_test_msdf_drop_shadow/obj_test_msdf_drop_shadow.yy",},"order":3,}, {"id":{"name":"scribble_typewriter_add_character_delay","path":"scripts/scribble_typewriter_add_character_delay/scribble_typewriter_add_character_delay.yy",},"order":6,}, {"id":{"name":"obj_test_msdf_soft_drop_shadow","path":"objects/obj_test_msdf_soft_drop_shadow/obj_test_msdf_soft_drop_shadow.yy",},"order":4,}, @@ -173,6 +175,7 @@ {"id":{"name":"__scribble_gen_6_build_lines","path":"scripts/__scribble_gen_6_build_lines/__scribble_gen_6_build_lines.yy",},"order":7,}, {"id":{"name":"obj_test_typewriter_ignore_delay","path":"objects/obj_test_typewriter_ignore_delay/obj_test_typewriter_ignore_delay.yy",},"order":6,}, {"id":{"name":"obj_test_line_height","path":"objects/obj_test_line_height/obj_test_line_height.yy",},"order":5,}, + {"id":{"name":"fnt_krutidev","path":"fonts/fnt_krutidev/fnt_krutidev.yy",},"order":17,}, {"id":{"name":"obj_test_typewriter_pause","path":"objects/obj_test_typewriter_pause/obj_test_typewriter_pause.yy",},"order":7,}, {"id":{"name":"obj_test_anim_rainbow","path":"objects/obj_test_anim_rainbow/obj_test_anim_rainbow.yy",},"order":3,}, {"id":{"name":"obj_test_surface","path":"objects/obj_test_surface/obj_test_surface.yy",},"order":6,}, @@ -190,6 +193,7 @@ {"id":{"name":"scribble_anim_jitter","path":"scripts/scribble_anim_jitter/scribble_anim_jitter.yy",},"order":8,}, {"id":{"name":"obj_test_wrap","path":"objects/obj_test_wrap/obj_test_wrap.yy",},"order":0,}, {"id":{"name":"obj_test_starting_format","path":"objects/obj_test_starting_format/obj_test_starting_format.yy",},"order":0,}, + {"id":{"name":"obj_test_typewriter_get_state","path":"objects/obj_test_typewriter_get_state/obj_test_typewriter_get_state.yy",},"order":19,}, {"id":{"name":"obj_test_anim_shake","path":"objects/obj_test_anim_shake/obj_test_anim_shake.yy",},"order":2,}, {"id":{"name":"obj_test_region_msdf","path":"objects/obj_test_region_msdf/obj_test_region_msdf.yy",},"order":3,}, {"id":{"name":"obj_test_bbox_revealed","path":"objects/obj_test_bbox_revealed/obj_test_bbox_revealed.yy",},"order":1,}, @@ -200,7 +204,7 @@ {"id":{"name":"__shd_scribble_msdf","path":"shaders/__shd_scribble_msdf/__shd_scribble_msdf.yy",},"order":1,}, {"id":{"name":"scribble_typewriter_add_event","path":"scripts/scribble_typewriter_add_event/scribble_typewriter_add_event.yy",},"order":5,}, {"id":{"name":"obj_test_blend","path":"objects/obj_test_blend/obj_test_blend.yy",},"order":2,}, - {"id":{"name":"fnt_segoe_ui_12","path":"fonts/fnt_segoe_ui_12/fnt_segoe_ui_12.yy",},"order":21,}, + {"id":{"name":"fnt_segoe_ui_12","path":"fonts/fnt_segoe_ui_12/fnt_segoe_ui_12.yy",},"order":22,}, {"id":{"name":"obj_test_typewriter_custom","path":"objects/obj_test_typewriter_custom/obj_test_typewriter_custom.yy",},"order":9,}, {"id":{"name":"scribble_anim_blink","path":"scripts/scribble_anim_blink/scribble_anim_blink.yy",},"order":9,}, {"id":{"name":"obj_test_pin_alignment","path":"objects/obj_test_pin_alignment/obj_test_pin_alignment.yy",},"order":16,}, @@ -243,7 +247,7 @@ {"id":{"name":"scribble_anim_wave","path":"scripts/scribble_anim_wave/scribble_anim_wave.yy",},"order":1,}, {"id":{"name":"scribble_anim_shake","path":"scripts/scribble_anim_shake/scribble_anim_shake.yy",},"order":2,}, {"id":{"name":"obj_test_stress_stashed","path":"objects/obj_test_stress_stashed/obj_test_stress_stashed.yy",},"order":2,}, - {"id":{"name":"spr_msdf_openhuninn","path":"sprites/spr_msdf_openhuninn/spr_msdf_openhuninn.yy",},"order":17,}, + {"id":{"name":"spr_msdf_openhuninn","path":"sprites/spr_msdf_openhuninn/spr_msdf_openhuninn.yy",},"order":18,}, {"id":{"name":"obj_test_glyph_properties","path":"objects/obj_test_glyph_properties/obj_test_glyph_properties.yy",},"order":5,}, {"id":{"name":"spr_white_coin","path":"sprites/spr_white_coin/spr_white_coin.yy",},"order":3,}, {"id":{"name":"obj_test_fit_to_box","path":"objects/obj_test_fit_to_box/obj_test_fit_to_box.yy",},"order":5,}, @@ -262,7 +266,7 @@ {"id":{"name":"obj_test_ignore_command_tags","path":"objects/obj_test_ignore_command_tags/obj_test_ignore_command_tags.yy",},"order":15,}, {"id":{"name":"obj_test_anim_pulse","path":"objects/obj_test_anim_pulse/obj_test_anim_pulse.yy",},"order":5,}, {"id":{"name":"obj_test_typewriter_gc","path":"objects/obj_test_typewriter_gc/obj_test_typewriter_gc.yy",},"order":17,}, - {"id":{"name":"rm_test","path":"rooms/rm_test/rm_test.yy",},"order":1,}, + {"id":{"name":"rm_test","path":"rooms/rm_test/rm_test.yy",},"order":0,}, ], "Options": [ {"name":"Switch","path":"options/switch/options_switch.yy",}, @@ -279,10 +283,11 @@ {"name":"macOS","path":"options/mac/options_mac.yy",}, {"name":"Main","path":"options/main/options_main.yy",}, {"name":"operagx","path":"options/operagx/options_operagx.yy",}, + {"name":"PlayStation 5","path":"options/ps5/options_ps5.yy",}, + {"name":"Xbox Series XS","path":"options/xboxseriesxs/options_xboxseriesxs.yy",}, ], "isDnDProject": false, "isEcma": false, - "tutorialPath": "", "configs": { "name": "Default", "children": [], @@ -302,32 +307,33 @@ {"folderPath":"folders/Scribble/(System - don't call these functions).yy","order":9,"resourceVersion":"1.0","name":"(System - don't call these functions)","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/Configuration - Please edit these!.yy","order":4,"resourceVersion":"1.0","name":"Configuration - Please edit these!","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/Miscellaneous.yy","order":8,"resourceVersion":"1.0","name":"Miscellaneous","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Typewriter/Legacy.yy","order":19,"resourceVersion":"1.0","name":"Legacy","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Basic.yy","order":2,"resourceVersion":"1.0","name":"Basic","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Misc Positioning.yy","order":5,"resourceVersion":"1.0","name":"Misc Positioning","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Pages.yy","order":6,"resourceVersion":"1.0","name":"Pages","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Getters.yy","order":7,"resourceVersion":"1.0","name":"Getters","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Animation.yy","order":8,"resourceVersion":"1.0","name":"Animation","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Caching, Stress Testing.yy","order":11,"resourceVersion":"1.0","name":"Caching, Stress Testing","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Fonts.yy","order":12,"resourceVersion":"1.0","name":"Fonts","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Typewriter.yy","order":10,"resourceVersion":"1.0","name":"Typewriter","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Scribble Methods.yy","order":9,"resourceVersion":"1.0","name":"Scribble Methods","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/MSDF.yy","order":13,"resourceVersion":"1.0","name":"MSDF","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Configurations.yy","order":14,"resourceVersion":"1.0","name":"Configurations","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Typewriter/Legacy.yy","order":20,"resourceVersion":"1.0","name":"Legacy","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Basic.yy","order":1,"resourceVersion":"1.0","name":"Basic","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Misc Positioning.yy","order":4,"resourceVersion":"1.0","name":"Misc Positioning","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Pages.yy","order":5,"resourceVersion":"1.0","name":"Pages","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Getters.yy","order":6,"resourceVersion":"1.0","name":"Getters","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Animation.yy","order":7,"resourceVersion":"1.0","name":"Animation","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Caching, Stress Testing.yy","order":10,"resourceVersion":"1.0","name":"Caching, Stress Testing","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Fonts.yy","order":11,"resourceVersion":"1.0","name":"Fonts","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Typewriter.yy","order":9,"resourceVersion":"1.0","name":"Typewriter","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Scribble Methods.yy","order":8,"resourceVersion":"1.0","name":"Scribble Methods","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/MSDF.yy","order":12,"resourceVersion":"1.0","name":"MSDF","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Configurations.yy","order":13,"resourceVersion":"1.0","name":"Configurations","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/(System - don't call these functions)/Deprecated.yy","order":10,"resourceVersion":"1.0","name":"Deprecated","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/Animation.yy","order":7,"resourceVersion":"1.0","name":"Animation","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/Superfonts.yy","order":6,"resourceVersion":"1.0","name":"Superfonts","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/(System - don't call these functions)/Generator.yy","order":8,"resourceVersion":"1.0","name":"Generator","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Language Support.yy","order":16,"resourceVersion":"1.0","name":"Language Support","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Language Support.yy","order":15,"resourceVersion":"1.0","name":"Language Support","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Test Cases/Language Support/Arabic.yy","order":0,"resourceVersion":"1.0","name":"Arabic","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Test Cases/Language Support/Thai.yy","order":6,"resourceVersion":"1.0","name":"Thai","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Regions.yy","order":15,"resourceVersion":"1.0","name":"Regions","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Wrapping.yy","order":3,"resourceVersion":"1.0","name":"Wrapping","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Test Cases/Padding.yy","order":4,"resourceVersion":"1.0","name":"Padding","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Regions.yy","order":14,"resourceVersion":"1.0","name":"Regions","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Wrapping.yy","order":2,"resourceVersion":"1.0","name":"Wrapping","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Padding.yy","order":3,"resourceVersion":"1.0","name":"Padding","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/(System - don't call these functions)/Classes.yy","order":9,"resourceVersion":"1.0","name":"Classes","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Scribble/(System - don't call these functions)/Shaders.yy","order":11,"resourceVersion":"1.0","name":"Shaders","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Test Cases/Language Support/Hebrew.yy","order":7,"resourceVersion":"1.0","name":"Hebrew","tags":[],"resourceType":"GMFolder",}, - {"folderPath":"folders/Fonts/Mallangche.yy","order":22,"resourceVersion":"1.0","name":"Mallangche","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Fonts/Mallangche.yy","order":23,"resourceVersion":"1.0","name":"Mallangche","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Test Cases/Language Support/Devanagari.yy","order":8,"resourceVersion":"1.0","name":"Devanagari","tags":[],"resourceType":"GMFolder",}, ], "AudioGroups": [ {"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",}, @@ -342,9 +348,9 @@ {"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"blip.ogg","resourceType":"GMIncludedFile",}, ], "MetaData": { - "IDEVersion": "2.3.7.606", + "IDEVersion": "2022.2.0.614", }, - "resourceVersion": "1.4", + "resourceVersion": "1.5", "name": "Scribble", "tags": [], "resourceType": "GMProject", diff --git a/fonts/fnt_krutidev/fnt_krutidev.old.png b/fonts/fnt_krutidev/fnt_krutidev.old.png new file mode 100644 index 000000000..c674ed46f Binary files /dev/null and b/fonts/fnt_krutidev/fnt_krutidev.old.png differ diff --git a/fonts/fnt_krutidev/fnt_krutidev.old.yy b/fonts/fnt_krutidev/fnt_krutidev.old.yy new file mode 100644 index 000000000..0c1361948 --- /dev/null +++ b/fonts/fnt_krutidev/fnt_krutidev.old.yy @@ -0,0 +1,222 @@ +{ + "hinting": 0, + "glyphOperations": 0, + "interpreter": 0, + "pointRounding": 0, + "applyKerning": 0, + "fontName": "Kruti Dev 010", + "styleName": "Regular", + "size": 32.0, + "bold": false, + "italic": false, + "charset": 0, + "AntiAlias": 1, + "first": 0, + "last": 0, + "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "includeTTF": false, + "TTFName": "", + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "ascenderOffset": 2, + "glyphs": { + "32": {"x":2,"y":2,"w":16,"h":61,"character":32,"shift":16,"offset":0,}, + "33": {"x":417,"y":254,"w":4,"h":61,"character":33,"shift":13,"offset":6,}, + "34": {"x":423,"y":254,"w":14,"h":61,"character":34,"shift":10,"offset":0,}, + "35": {"x":439,"y":254,"w":24,"h":61,"character":35,"shift":23,"offset":0,}, + "36": {"x":465,"y":254,"w":23,"h":61,"character":36,"shift":24,"offset":0,}, + "37": {"x":490,"y":254,"w":4,"h":61,"character":37,"shift":7,"offset":2,}, + "38": {"x":2,"y":317,"w":23,"h":61,"character":38,"shift":24,"offset":0,}, + "39": {"x":27,"y":317,"w":16,"h":61,"character":39,"shift":16,"offset":0,}, + "40": {"x":45,"y":317,"w":6,"h":61,"character":40,"shift":8,"offset":1,}, + "41": {"x":53,"y":317,"w":27,"h":61,"character":41,"shift":27,"offset":0,}, + "42": {"x":82,"y":317,"w":5,"h":61,"character":42,"shift":9,"offset":2,}, + "43": {"x":89,"y":317,"w":4,"h":61,"character":43,"shift":0,"offset":-12,}, + "44": {"x":95,"y":317,"w":20,"h":61,"character":44,"shift":19,"offset":0,}, + "45": {"x":117,"y":317,"w":4,"h":61,"character":45,"shift":7,"offset":2,}, + "46": {"x":123,"y":317,"w":16,"h":61,"character":46,"shift":15,"offset":0,}, + "47": {"x":141,"y":317,"w":16,"h":61,"character":47,"shift":12,"offset":0,}, + "48": {"x":159,"y":317,"w":15,"h":61,"character":48,"shift":17,"offset":1,}, + "49": {"x":176,"y":317,"w":9,"h":61,"character":49,"shift":17,"offset":3,}, + "50": {"x":187,"y":317,"w":16,"h":61,"character":50,"shift":17,"offset":0,}, + "51": {"x":205,"y":317,"w":15,"h":61,"character":51,"shift":17,"offset":1,}, + "52": {"x":399,"y":254,"w":16,"h":61,"character":52,"shift":17,"offset":0,}, + "53": {"x":382,"y":254,"w":15,"h":61,"character":53,"shift":17,"offset":1,}, + "54": {"x":365,"y":254,"w":15,"h":61,"character":54,"shift":17,"offset":1,}, + "55": {"x":154,"y":254,"w":15,"h":61,"character":55,"shift":17,"offset":1,}, + "56": {"x":474,"y":191,"w":15,"h":61,"character":56,"shift":17,"offset":1,}, + "57": {"x":491,"y":191,"w":15,"h":61,"character":57,"shift":17,"offset":1,}, + "58": {"x":2,"y":254,"w":28,"h":61,"character":58,"shift":27,"offset":0,}, + "59": {"x":32,"y":254,"w":22,"h":61,"character":59,"shift":22,"offset":0,}, + "60": {"x":56,"y":254,"w":22,"h":61,"character":60,"shift":21,"offset":0,}, + "61": {"x":80,"y":254,"w":24,"h":61,"character":61,"shift":22,"offset":-1,}, + "62": {"x":106,"y":254,"w":26,"h":61,"character":62,"shift":25,"offset":0,}, + "63": {"x":134,"y":254,"w":18,"h":61,"character":63,"shift":14,"offset":0,}, + "64": {"x":171,"y":254,"w":24,"h":61,"character":64,"shift":33,"offset":5,}, + "65": {"x":360,"y":254,"w":3,"h":61,"character":65,"shift":17,"offset":12,}, + "66": {"x":197,"y":254,"w":22,"h":61,"character":66,"shift":21,"offset":0,}, + "67": {"x":221,"y":254,"w":14,"h":61,"character":67,"shift":10,"offset":0,}, + "68": {"x":237,"y":254,"w":22,"h":61,"character":68,"shift":18,"offset":0,}, + "69": {"x":261,"y":254,"w":16,"h":61,"character":69,"shift":12,"offset":0,}, + "70": {"x":279,"y":254,"w":18,"h":61,"character":70,"shift":14,"offset":0,}, + "71": {"x":299,"y":254,"w":25,"h":61,"character":71,"shift":25,"offset":0,}, + "72": {"x":326,"y":254,"w":16,"h":61,"character":72,"shift":12,"offset":0,}, + "73": {"x":344,"y":254,"w":14,"h":61,"character":73,"shift":9,"offset":0,}, + "74": {"x":222,"y":317,"w":24,"h":61,"character":74,"shift":25,"offset":1,}, + "75": {"x":248,"y":317,"w":26,"h":61,"character":75,"shift":25,"offset":0,}, + "76": {"x":276,"y":317,"w":21,"h":61,"character":76,"shift":16,"offset":-1,}, + "77": {"x":299,"y":317,"w":23,"h":61,"character":77,"shift":22,"offset":0,}, + "78": {"x":340,"y":380,"w":26,"h":61,"character":78,"shift":25,"offset":0,}, + "79": {"x":368,"y":380,"w":14,"h":61,"character":79,"shift":10,"offset":0,}, + "80": {"x":384,"y":380,"w":18,"h":61,"character":80,"shift":14,"offset":0,}, + "81": {"x":404,"y":380,"w":27,"h":61,"character":81,"shift":27,"offset":0,}, + "82": {"x":433,"y":380,"w":16,"h":61,"character":82,"shift":12,"offset":0,}, + "83": {"x":451,"y":380,"w":15,"h":61,"character":83,"shift":0,"offset":-17,}, + "84": {"x":468,"y":380,"w":22,"h":61,"character":84,"shift":17,"offset":0,}, + "85": {"x":492,"y":380,"w":16,"h":61,"character":85,"shift":11,"offset":0,}, + "86": {"x":2,"y":443,"w":22,"h":61,"character":86,"shift":21,"offset":0,}, + "87": {"x":26,"y":443,"w":15,"h":61,"character":87,"shift":1,"offset":-15,}, + "88": {"x":43,"y":443,"w":13,"h":61,"character":88,"shift":12,"offset":0,}, + "89": {"x":58,"y":443,"w":21,"h":61,"character":89,"shift":16,"offset":0,}, + "90": {"x":81,"y":443,"w":8,"h":61,"character":90,"shift":0,"offset":-8,}, + "91": {"x":91,"y":443,"w":24,"h":61,"character":91,"shift":20,"offset":0,}, + "92": {"x":117,"y":443,"w":15,"h":61,"character":92,"shift":17,"offset":1,}, + "93": {"x":134,"y":443,"w":5,"h":61,"character":93,"shift":8,"offset":1,}, + "94": {"x":141,"y":443,"w":6,"h":61,"character":94,"shift":8,"offset":2,}, + "95": {"x":149,"y":443,"w":36,"h":61,"character":95,"shift":35,"offset":0,}, + "96": {"x":187,"y":443,"w":11,"h":61,"character":96,"shift":0,"offset":-11,}, + "97": {"x":334,"y":380,"w":4,"h":61,"character":97,"shift":0,"offset":-5,}, + "98": {"x":200,"y":443,"w":20,"h":61,"character":98,"shift":19,"offset":0,}, + "99": {"x":313,"y":380,"w":19,"h":61,"character":99,"shift":19,"offset":0,}, + "100": {"x":259,"y":380,"w":28,"h":61,"character":100,"shift":27,"offset":0,}, + "101": {"x":324,"y":317,"w":21,"h":61,"character":101,"shift":20,"offset":0,}, + "102": {"x":347,"y":317,"w":26,"h":61,"character":102,"shift":9,"offset":0,}, + "103": {"x":375,"y":317,"w":21,"h":61,"character":103,"shift":19,"offset":0,}, + "104": {"x":398,"y":317,"w":19,"h":61,"character":104,"shift":9,"offset":-9,}, + "105": {"x":419,"y":317,"w":20,"h":61,"character":105,"shift":19,"offset":0,}, + "106": {"x":441,"y":317,"w":18,"h":61,"character":106,"shift":16,"offset":-1,}, + "107": {"x":461,"y":317,"w":12,"h":61,"character":107,"shift":9,"offset":-1,}, + "108": {"x":475,"y":317,"w":27,"h":61,"character":108,"shift":25,"offset":-1,}, + "109": {"x":2,"y":380,"w":25,"h":61,"character":109,"shift":23,"offset":-1,}, + "110": {"x":29,"y":380,"w":22,"h":61,"character":110,"shift":21,"offset":0,}, + "111": {"x":53,"y":380,"w":21,"h":61,"character":111,"shift":19,"offset":-1,}, + "112": {"x":76,"y":380,"w":24,"h":61,"character":112,"shift":23,"offset":0,}, + "113": {"x":102,"y":380,"w":18,"h":61,"character":113,"shift":0,"offset":-17,}, + "114": {"x":122,"y":380,"w":23,"h":61,"character":114,"shift":21,"offset":-1,}, + "115": {"x":147,"y":380,"w":11,"h":61,"character":115,"shift":0,"offset":-14,}, + "116": {"x":160,"y":380,"w":28,"h":61,"character":116,"shift":27,"offset":0,}, + "117": {"x":190,"y":380,"w":22,"h":61,"character":117,"shift":21,"offset":0,}, + "118": {"x":214,"y":380,"w":25,"h":61,"character":118,"shift":25,"offset":0,}, + "119": {"x":241,"y":380,"w":16,"h":61,"character":119,"shift":0,"offset":-10,}, + "120": {"x":449,"y":191,"w":23,"h":61,"character":120,"shift":22,"offset":0,}, + "121": {"x":420,"y":191,"w":27,"h":61,"character":121,"shift":26,"offset":0,}, + "122": {"x":405,"y":191,"w":13,"h":61,"character":122,"shift":0,"offset":-17,}, + "123": {"x":380,"y":65,"w":18,"h":61,"character":123,"shift":13,"offset":0,}, + "124": {"x":2,"y":65,"w":26,"h":61,"character":124,"shift":25,"offset":0,}, + "125": {"x":30,"y":65,"w":21,"h":61,"character":125,"shift":21,"offset":0,}, + "126": {"x":53,"y":65,"w":7,"h":61,"character":126,"shift":0,"offset":-7,}, + "144": {"x":62,"y":65,"w":22,"h":61,"character":144,"shift":21,"offset":0,}, + "160": {"x":86,"y":65,"w":0,"h":61,"character":160,"shift":16,"offset":0,}, + "161": {"x":88,"y":65,"w":15,"h":61,"character":161,"shift":1,"offset":-15,}, + "162": {"x":105,"y":65,"w":11,"h":61,"character":162,"shift":0,"offset":-23,}, + "163": {"x":118,"y":65,"w":29,"h":61,"character":163,"shift":27,"offset":0,}, + "164": {"x":149,"y":65,"w":8,"h":61,"character":164,"shift":9,"offset":0,}, + "165": {"x":159,"y":65,"w":25,"h":61,"character":165,"shift":25,"offset":0,}, + "167": {"x":186,"y":65,"w":8,"h":61,"character":167,"shift":9,"offset":0,}, + "168": {"x":196,"y":65,"w":16,"h":61,"character":168,"shift":9,"offset":-6,}, + "169": {"x":214,"y":65,"w":19,"h":61,"character":169,"shift":9,"offset":-9,}, + "170": {"x":235,"y":65,"w":17,"h":61,"character":170,"shift":1,"offset":-19,}, + "171": {"x":254,"y":65,"w":19,"h":61,"character":171,"shift":14,"offset":-1,}, + "174": {"x":275,"y":65,"w":16,"h":61,"character":174,"shift":9,"offset":-6,}, + "177": {"x":293,"y":65,"w":8,"h":61,"character":177,"shift":1,"offset":-8,}, + "179": {"x":303,"y":65,"w":25,"h":61,"character":179,"shift":25,"offset":0,}, + "180": {"x":330,"y":65,"w":25,"h":61,"character":180,"shift":25,"offset":0,}, + "182": {"x":476,"y":2,"w":20,"h":61,"character":182,"shift":18,"offset":0,}, + "183": {"x":458,"y":2,"w":16,"h":61,"character":183,"shift":15,"offset":1,}, + "184": {"x":439,"y":2,"w":17,"h":61,"character":184,"shift":12,"offset":0,}, + "186": {"x":167,"y":2,"w":20,"h":61,"character":186,"shift":19,"offset":0,}, + "187": {"x":20,"y":2,"w":23,"h":61,"character":187,"shift":24,"offset":0,}, + "188": {"x":45,"y":2,"w":10,"h":61,"character":188,"shift":10,"offset":3,}, + "189": {"x":57,"y":2,"w":10,"h":61,"character":189,"shift":11,"offset":0,}, + "190": {"x":69,"y":2,"w":23,"h":61,"character":190,"shift":24,"offset":0,}, + "191": {"x":94,"y":2,"w":13,"h":61,"character":191,"shift":9,"offset":1,}, + "192": {"x":109,"y":2,"w":13,"h":61,"character":192,"shift":16,"offset":2,}, + "193": {"x":124,"y":2,"w":19,"h":61,"character":193,"shift":19,"offset":0,}, + "195": {"x":145,"y":2,"w":20,"h":61,"character":195,"shift":19,"offset":0,}, + "196": {"x":189,"y":2,"w":24,"h":61,"character":196,"shift":23,"offset":0,}, + "197": {"x":407,"y":2,"w":30,"h":61,"character":197,"shift":29,"offset":0,}, + "198": {"x":215,"y":2,"w":28,"h":61,"character":198,"shift":9,"offset":0,}, + "199": {"x":245,"y":2,"w":27,"h":61,"character":199,"shift":9,"offset":0,}, + "200": {"x":274,"y":2,"w":19,"h":61,"character":200,"shift":9,"offset":-9,}, + "201": {"x":295,"y":2,"w":28,"h":61,"character":201,"shift":9,"offset":0,}, + "202": {"x":325,"y":2,"w":20,"h":61,"character":202,"shift":9,"offset":-9,}, + "203": {"x":347,"y":2,"w":16,"h":61,"character":203,"shift":11,"offset":0,}, + "204": {"x":365,"y":2,"w":17,"h":61,"character":204,"shift":16,"offset":0,}, + "205": {"x":384,"y":2,"w":21,"h":61,"character":205,"shift":20,"offset":0,}, + "206": {"x":357,"y":65,"w":21,"h":61,"character":206,"shift":20,"offset":0,}, + "207": {"x":400,"y":65,"w":23,"h":61,"character":207,"shift":22,"offset":0,}, + "209": {"x":375,"y":191,"w":28,"h":61,"character":209,"shift":27,"offset":0,}, + "210": {"x":425,"y":65,"w":22,"h":61,"character":210,"shift":21,"offset":0,}, + "211": {"x":440,"y":128,"w":25,"h":61,"character":211,"shift":21,"offset":-4,}, + "212": {"x":467,"y":128,"w":23,"h":61,"character":212,"shift":22,"offset":0,}, + "214": {"x":2,"y":191,"w":20,"h":61,"character":214,"shift":16,"offset":0,}, + "216": {"x":24,"y":191,"w":28,"h":61,"character":216,"shift":27,"offset":0,}, + "217": {"x":54,"y":191,"w":19,"h":61,"character":217,"shift":15,"offset":0,}, + "218": {"x":75,"y":191,"w":12,"h":61,"character":218,"shift":11,"offset":0,}, + "219": {"x":89,"y":191,"w":10,"h":61,"character":219,"shift":12,"offset":2,}, + "220": {"x":101,"y":191,"w":19,"h":61,"character":220,"shift":16,"offset":1,}, + "221": {"x":122,"y":191,"w":27,"h":61,"character":221,"shift":27,"offset":0,}, + "222": {"x":151,"y":191,"w":9,"h":61,"character":222,"shift":11,"offset":2,}, + "223": {"x":162,"y":191,"w":9,"h":61,"character":223,"shift":12,"offset":2,}, + "224": {"x":173,"y":191,"w":20,"h":61,"character":224,"shift":19,"offset":0,}, + "225": {"x":195,"y":191,"w":29,"h":61,"character":225,"shift":29,"offset":0,}, + "226": {"x":226,"y":191,"w":21,"h":61,"character":226,"shift":20,"offset":0,}, + "227": {"x":249,"y":191,"w":30,"h":61,"character":227,"shift":29,"offset":0,}, + "228": {"x":281,"y":191,"w":31,"h":61,"character":228,"shift":30,"offset":0,}, + "229": {"x":314,"y":191,"w":15,"h":61,"character":229,"shift":19,"offset":3,}, + "230": {"x":331,"y":191,"w":21,"h":61,"character":230,"shift":21,"offset":0,}, + "231": {"x":354,"y":191,"w":19,"h":61,"character":231,"shift":19,"offset":0,}, + "232": {"x":422,"y":128,"w":16,"h":61,"character":232,"shift":11,"offset":0,}, + "233": {"x":398,"y":128,"w":22,"h":61,"character":233,"shift":22,"offset":0,}, + "234": {"x":375,"y":128,"w":21,"h":61,"character":234,"shift":20,"offset":0,}, + "235": {"x":149,"y":128,"w":21,"h":61,"character":235,"shift":20,"offset":0,}, + "236": {"x":449,"y":65,"w":23,"h":61,"character":236,"shift":22,"offset":0,}, + "237": {"x":474,"y":65,"w":17,"h":61,"character":237,"shift":16,"offset":0,}, + "238": {"x":2,"y":128,"w":25,"h":61,"character":238,"shift":21,"offset":-4,}, + "239": {"x":29,"y":128,"w":23,"h":61,"character":239,"shift":22,"offset":0,}, + "240": {"x":54,"y":128,"w":21,"h":61,"character":240,"shift":20,"offset":0,}, + "241": {"x":77,"y":128,"w":9,"h":61,"character":241,"shift":10,"offset":0,}, + "243": {"x":88,"y":128,"w":29,"h":61,"character":243,"shift":29,"offset":0,}, + "244": {"x":119,"y":128,"w":28,"h":61,"character":244,"shift":27,"offset":0,}, + "245": {"x":172,"y":128,"w":19,"h":61,"character":245,"shift":0,"offset":-17,}, + "246": {"x":351,"y":128,"w":22,"h":61,"character":246,"shift":21,"offset":-1,}, + "247": {"x":193,"y":128,"w":20,"h":61,"character":247,"shift":16,"offset":0,}, + "248": {"x":215,"y":128,"w":13,"h":61,"character":248,"shift":9,"offset":1,}, + "249": {"x":230,"y":128,"w":30,"h":61,"character":249,"shift":29,"offset":0,}, + "338": {"x":262,"y":128,"w":15,"h":61,"character":338,"shift":19,"offset":3,}, + "352": {"x":279,"y":128,"w":17,"h":61,"character":352,"shift":19,"offset":2,}, + "376": {"x":298,"y":128,"w":19,"h":61,"character":376,"shift":15,"offset":0,}, + "402": {"x":319,"y":128,"w":12,"h":61,"character":402,"shift":15,"offset":3,}, + "710": {"x":333,"y":128,"w":16,"h":61,"character":710,"shift":20,"offset":3,}, + "732": {"x":289,"y":380,"w":22,"h":61,"character":732,"shift":21,"offset":-1,}, + "9647": {"x":222,"y":443,"w":26,"h":61,"character":9647,"shift":42,"offset":2,}, + }, + "kerningPairs": [], + "ranges": [ + {"lower":32,"upper":732,}, + {"lower":9647,"upper":9647,}, + ], + "regenerateBitmap": false, + "canGenerateBitmap": true, + "maintainGms1Font": false, + "parent": { + "name": "Fonts", + "path": "folders/Fonts.yy", + }, + "resourceVersion": "1.0", + "name": "fnt_krutidev", + "tags": [], + "resourceType": "GMFont", +} \ No newline at end of file diff --git a/fonts/fnt_krutidev/fnt_krutidev.png b/fonts/fnt_krutidev/fnt_krutidev.png new file mode 100644 index 000000000..7765379f7 Binary files /dev/null and b/fonts/fnt_krutidev/fnt_krutidev.png differ diff --git a/fonts/fnt_krutidev/fnt_krutidev.yy b/fonts/fnt_krutidev/fnt_krutidev.yy new file mode 100644 index 000000000..b7918814a --- /dev/null +++ b/fonts/fnt_krutidev/fnt_krutidev.yy @@ -0,0 +1,256 @@ +{ + "hinting": 0, + "glyphOperations": 0, + "interpreter": 0, + "pointRounding": 0, + "applyKerning": 0, + "fontName": "Kruti Dev 010", + "styleName": "Regular", + "size": 32.0, + "bold": false, + "italic": false, + "charset": 0, + "AntiAlias": 1, + "first": 0, + "last": 0, + "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "includeTTF": false, + "TTFName": "", + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "ascenderOffset": 2, + "glyphs": { + "32": {"x":2,"y":2,"w":16,"h":61,"character":32,"shift":16,"offset":0,}, + "33": {"x":585,"y":128,"w":4,"h":61,"character":33,"shift":13,"offset":6,}, + "34": {"x":591,"y":128,"w":14,"h":61,"character":34,"shift":10,"offset":0,}, + "35": {"x":607,"y":128,"w":24,"h":61,"character":35,"shift":23,"offset":0,}, + "36": {"x":633,"y":128,"w":23,"h":61,"character":36,"shift":24,"offset":0,}, + "37": {"x":658,"y":128,"w":4,"h":61,"character":37,"shift":7,"offset":2,}, + "38": {"x":664,"y":128,"w":23,"h":61,"character":38,"shift":24,"offset":0,}, + "39": {"x":689,"y":128,"w":16,"h":61,"character":39,"shift":16,"offset":0,}, + "40": {"x":707,"y":128,"w":6,"h":61,"character":40,"shift":8,"offset":1,}, + "41": {"x":715,"y":128,"w":27,"h":61,"character":41,"shift":27,"offset":0,}, + "42": {"x":744,"y":128,"w":5,"h":61,"character":42,"shift":9,"offset":2,}, + "43": {"x":751,"y":128,"w":4,"h":61,"character":43,"shift":0,"offset":-12,}, + "44": {"x":757,"y":128,"w":20,"h":61,"character":44,"shift":19,"offset":0,}, + "45": {"x":779,"y":128,"w":4,"h":61,"character":45,"shift":7,"offset":2,}, + "46": {"x":785,"y":128,"w":16,"h":61,"character":46,"shift":15,"offset":0,}, + "47": {"x":803,"y":128,"w":16,"h":61,"character":47,"shift":12,"offset":0,}, + "48": {"x":821,"y":128,"w":15,"h":61,"character":48,"shift":17,"offset":1,}, + "49": {"x":838,"y":128,"w":9,"h":61,"character":49,"shift":17,"offset":3,}, + "50": {"x":849,"y":128,"w":16,"h":61,"character":50,"shift":17,"offset":0,}, + "51": {"x":867,"y":128,"w":15,"h":61,"character":51,"shift":17,"offset":1,}, + "52": {"x":884,"y":128,"w":16,"h":61,"character":52,"shift":17,"offset":0,}, + "53": {"x":902,"y":128,"w":15,"h":61,"character":53,"shift":17,"offset":1,}, + "54": {"x":568,"y":128,"w":15,"h":61,"character":54,"shift":17,"offset":1,}, + "55": {"x":551,"y":128,"w":15,"h":61,"character":55,"shift":17,"offset":1,}, + "56": {"x":534,"y":128,"w":15,"h":61,"character":56,"shift":17,"offset":1,}, + "57": {"x":276,"y":128,"w":15,"h":61,"character":57,"shift":17,"offset":1,}, + "58": {"x":69,"y":128,"w":28,"h":61,"character":58,"shift":27,"offset":0,}, + "59": {"x":99,"y":128,"w":22,"h":61,"character":59,"shift":22,"offset":0,}, + "60": {"x":123,"y":128,"w":22,"h":61,"character":60,"shift":21,"offset":0,}, + "61": {"x":147,"y":128,"w":24,"h":61,"character":61,"shift":22,"offset":-1,}, + "62": {"x":173,"y":128,"w":26,"h":61,"character":62,"shift":25,"offset":0,}, + "63": {"x":201,"y":128,"w":18,"h":61,"character":63,"shift":14,"offset":0,}, + "64": {"x":221,"y":128,"w":24,"h":61,"character":64,"shift":33,"offset":5,}, + "65": {"x":247,"y":128,"w":3,"h":61,"character":65,"shift":17,"offset":12,}, + "66": {"x":252,"y":128,"w":22,"h":61,"character":66,"shift":21,"offset":0,}, + "67": {"x":293,"y":128,"w":14,"h":61,"character":67,"shift":10,"offset":0,}, + "68": {"x":510,"y":128,"w":22,"h":61,"character":68,"shift":18,"offset":0,}, + "69": {"x":309,"y":128,"w":16,"h":61,"character":69,"shift":12,"offset":0,}, + "70": {"x":327,"y":128,"w":18,"h":61,"character":70,"shift":14,"offset":0,}, + "71": {"x":347,"y":128,"w":25,"h":61,"character":71,"shift":25,"offset":0,}, + "72": {"x":374,"y":128,"w":16,"h":61,"character":72,"shift":12,"offset":0,}, + "73": {"x":392,"y":128,"w":14,"h":61,"character":73,"shift":9,"offset":0,}, + "74": {"x":408,"y":128,"w":24,"h":61,"character":74,"shift":25,"offset":1,}, + "75": {"x":434,"y":128,"w":26,"h":61,"character":75,"shift":25,"offset":0,}, + "76": {"x":462,"y":128,"w":21,"h":61,"character":76,"shift":16,"offset":-1,}, + "77": {"x":485,"y":128,"w":23,"h":61,"character":77,"shift":22,"offset":0,}, + "78": {"x":919,"y":128,"w":26,"h":61,"character":78,"shift":25,"offset":0,}, + "79": {"x":947,"y":128,"w":14,"h":61,"character":79,"shift":10,"offset":0,}, + "80": {"x":963,"y":128,"w":18,"h":61,"character":80,"shift":14,"offset":0,}, + "81": {"x":983,"y":128,"w":27,"h":61,"character":81,"shift":27,"offset":0,}, + "82": {"x":560,"y":191,"w":16,"h":61,"character":82,"shift":12,"offset":0,}, + "83": {"x":578,"y":191,"w":15,"h":61,"character":83,"shift":0,"offset":-17,}, + "84": {"x":595,"y":191,"w":22,"h":61,"character":84,"shift":17,"offset":0,}, + "85": {"x":619,"y":191,"w":16,"h":61,"character":85,"shift":11,"offset":0,}, + "86": {"x":637,"y":191,"w":22,"h":61,"character":86,"shift":21,"offset":0,}, + "87": {"x":661,"y":191,"w":15,"h":61,"character":87,"shift":1,"offset":-15,}, + "88": {"x":678,"y":191,"w":13,"h":61,"character":88,"shift":12,"offset":0,}, + "89": {"x":693,"y":191,"w":21,"h":61,"character":89,"shift":16,"offset":0,}, + "90": {"x":716,"y":191,"w":8,"h":61,"character":90,"shift":0,"offset":-8,}, + "91": {"x":726,"y":191,"w":24,"h":61,"character":91,"shift":20,"offset":0,}, + "92": {"x":752,"y":191,"w":15,"h":61,"character":92,"shift":17,"offset":1,}, + "93": {"x":769,"y":191,"w":5,"h":61,"character":93,"shift":8,"offset":1,}, + "94": {"x":776,"y":191,"w":6,"h":61,"character":94,"shift":8,"offset":2,}, + "95": {"x":784,"y":191,"w":36,"h":61,"character":95,"shift":35,"offset":0,}, + "96": {"x":822,"y":191,"w":11,"h":61,"character":96,"shift":0,"offset":-11,}, + "97": {"x":835,"y":191,"w":4,"h":61,"character":97,"shift":0,"offset":-5,}, + "98": {"x":841,"y":191,"w":20,"h":61,"character":98,"shift":19,"offset":0,}, + "99": {"x":863,"y":191,"w":19,"h":61,"character":99,"shift":19,"offset":0,}, + "100": {"x":884,"y":191,"w":28,"h":61,"character":100,"shift":27,"offset":0,}, + "101": {"x":914,"y":191,"w":21,"h":61,"character":101,"shift":20,"offset":0,}, + "102": {"x":937,"y":191,"w":26,"h":61,"character":102,"shift":9,"offset":0,}, + "103": {"x":537,"y":191,"w":21,"h":61,"character":103,"shift":19,"offset":0,}, + "104": {"x":965,"y":191,"w":19,"h":61,"character":104,"shift":9,"offset":-9,}, + "105": {"x":515,"y":191,"w":20,"h":61,"character":105,"shift":19,"offset":0,}, + "106": {"x":475,"y":191,"w":18,"h":61,"character":106,"shift":16,"offset":-1,}, + "107": {"x":2,"y":191,"w":12,"h":61,"character":107,"shift":9,"offset":-1,}, + "108": {"x":16,"y":191,"w":27,"h":61,"character":108,"shift":25,"offset":-1,}, + "109": {"x":45,"y":191,"w":25,"h":61,"character":109,"shift":23,"offset":-1,}, + "110": {"x":72,"y":191,"w":22,"h":61,"character":110,"shift":21,"offset":0,}, + "111": {"x":96,"y":191,"w":21,"h":61,"character":111,"shift":19,"offset":-1,}, + "112": {"x":119,"y":191,"w":24,"h":61,"character":112,"shift":23,"offset":0,}, + "113": {"x":145,"y":191,"w":18,"h":61,"character":113,"shift":0,"offset":-17,}, + "114": {"x":165,"y":191,"w":23,"h":61,"character":114,"shift":21,"offset":-1,}, + "115": {"x":190,"y":191,"w":11,"h":61,"character":115,"shift":0,"offset":-14,}, + "116": {"x":203,"y":191,"w":28,"h":61,"character":116,"shift":27,"offset":0,}, + "117": {"x":233,"y":191,"w":22,"h":61,"character":117,"shift":21,"offset":0,}, + "118": {"x":257,"y":191,"w":25,"h":61,"character":118,"shift":25,"offset":0,}, + "119": {"x":284,"y":191,"w":16,"h":61,"character":119,"shift":0,"offset":-10,}, + "120": {"x":302,"y":191,"w":23,"h":61,"character":120,"shift":22,"offset":0,}, + "121": {"x":327,"y":191,"w":27,"h":61,"character":121,"shift":26,"offset":0,}, + "122": {"x":356,"y":191,"w":13,"h":61,"character":122,"shift":0,"offset":-17,}, + "123": {"x":371,"y":191,"w":18,"h":61,"character":123,"shift":13,"offset":0,}, + "124": {"x":391,"y":191,"w":26,"h":61,"character":124,"shift":25,"offset":0,}, + "125": {"x":419,"y":191,"w":21,"h":61,"character":125,"shift":21,"offset":0,}, + "126": {"x":442,"y":191,"w":7,"h":61,"character":126,"shift":0,"offset":-7,}, + "144": {"x":451,"y":191,"w":22,"h":61,"character":144,"shift":21,"offset":0,}, + "160": {"x":67,"y":128,"w":0,"h":61,"character":160,"shift":16,"offset":0,}, + "161": {"x":50,"y":128,"w":15,"h":61,"character":161,"shift":1,"offset":-15,}, + "162": {"x":37,"y":128,"w":11,"h":61,"character":162,"shift":0,"offset":-23,}, + "163": {"x":2,"y":65,"w":29,"h":61,"character":163,"shift":27,"offset":0,}, + "164": {"x":587,"y":2,"w":8,"h":61,"character":164,"shift":9,"offset":0,}, + "165": {"x":597,"y":2,"w":25,"h":61,"character":165,"shift":25,"offset":0,}, + "167": {"x":624,"y":2,"w":8,"h":61,"character":167,"shift":9,"offset":0,}, + "168": {"x":634,"y":2,"w":16,"h":61,"character":168,"shift":9,"offset":-6,}, + "169": {"x":652,"y":2,"w":19,"h":61,"character":169,"shift":9,"offset":-9,}, + "170": {"x":673,"y":2,"w":17,"h":61,"character":170,"shift":1,"offset":-19,}, + "171": {"x":692,"y":2,"w":19,"h":61,"character":171,"shift":14,"offset":-1,}, + "174": {"x":713,"y":2,"w":16,"h":61,"character":174,"shift":9,"offset":-6,}, + "177": {"x":731,"y":2,"w":8,"h":61,"character":177,"shift":1,"offset":-8,}, + "179": {"x":741,"y":2,"w":25,"h":61,"character":179,"shift":25,"offset":0,}, + "180": {"x":768,"y":2,"w":25,"h":61,"character":180,"shift":25,"offset":0,}, + "182": {"x":795,"y":2,"w":20,"h":61,"character":182,"shift":18,"offset":0,}, + "183": {"x":817,"y":2,"w":16,"h":61,"character":183,"shift":15,"offset":1,}, + "184": {"x":835,"y":2,"w":17,"h":61,"character":184,"shift":12,"offset":0,}, + "186": {"x":854,"y":2,"w":20,"h":61,"character":186,"shift":19,"offset":0,}, + "187": {"x":876,"y":2,"w":23,"h":61,"character":187,"shift":24,"offset":0,}, + "188": {"x":901,"y":2,"w":10,"h":61,"character":188,"shift":10,"offset":3,}, + "189": {"x":913,"y":2,"w":10,"h":61,"character":189,"shift":11,"offset":0,}, + "190": {"x":925,"y":2,"w":23,"h":61,"character":190,"shift":24,"offset":0,}, + "191": {"x":950,"y":2,"w":13,"h":61,"character":191,"shift":9,"offset":1,}, + "192": {"x":965,"y":2,"w":13,"h":61,"character":192,"shift":16,"offset":2,}, + "193": {"x":566,"y":2,"w":19,"h":61,"character":193,"shift":19,"offset":0,}, + "195": {"x":544,"y":2,"w":20,"h":61,"character":195,"shift":19,"offset":0,}, + "196": {"x":518,"y":2,"w":24,"h":61,"character":196,"shift":23,"offset":0,}, + "197": {"x":235,"y":2,"w":30,"h":61,"character":197,"shift":29,"offset":0,}, + "198": {"x":20,"y":2,"w":28,"h":61,"character":198,"shift":9,"offset":0,}, + "199": {"x":50,"y":2,"w":27,"h":61,"character":199,"shift":9,"offset":0,}, + "200": {"x":79,"y":2,"w":19,"h":61,"character":200,"shift":9,"offset":-9,}, + "201": {"x":100,"y":2,"w":28,"h":61,"character":201,"shift":9,"offset":0,}, + "202": {"x":130,"y":2,"w":20,"h":61,"character":202,"shift":9,"offset":-9,}, + "203": {"x":152,"y":2,"w":16,"h":61,"character":203,"shift":11,"offset":0,}, + "204": {"x":170,"y":2,"w":17,"h":61,"character":204,"shift":16,"offset":0,}, + "205": {"x":189,"y":2,"w":21,"h":61,"character":205,"shift":20,"offset":0,}, + "206": {"x":212,"y":2,"w":21,"h":61,"character":206,"shift":20,"offset":0,}, + "207": {"x":267,"y":2,"w":23,"h":61,"character":207,"shift":22,"offset":0,}, + "209": {"x":488,"y":2,"w":28,"h":61,"character":209,"shift":27,"offset":0,}, + "210": {"x":292,"y":2,"w":22,"h":61,"character":210,"shift":21,"offset":0,}, + "211": {"x":316,"y":2,"w":25,"h":61,"character":211,"shift":21,"offset":-4,}, + "212": {"x":343,"y":2,"w":23,"h":61,"character":212,"shift":22,"offset":0,}, + "214": {"x":368,"y":2,"w":20,"h":61,"character":214,"shift":16,"offset":0,}, + "216": {"x":390,"y":2,"w":28,"h":61,"character":216,"shift":27,"offset":0,}, + "217": {"x":420,"y":2,"w":19,"h":61,"character":217,"shift":15,"offset":0,}, + "218": {"x":441,"y":2,"w":12,"h":61,"character":218,"shift":11,"offset":0,}, + "219": {"x":455,"y":2,"w":10,"h":61,"character":219,"shift":12,"offset":2,}, + "220": {"x":467,"y":2,"w":19,"h":61,"character":220,"shift":16,"offset":1,}, + "221": {"x":980,"y":2,"w":27,"h":61,"character":221,"shift":27,"offset":0,}, + "222": {"x":33,"y":65,"w":9,"h":61,"character":222,"shift":11,"offset":2,}, + "223": {"x":26,"y":128,"w":9,"h":61,"character":223,"shift":12,"offset":2,}, + "224": {"x":44,"y":65,"w":20,"h":61,"character":224,"shift":19,"offset":0,}, + "225": {"x":521,"y":65,"w":29,"h":61,"character":225,"shift":29,"offset":0,}, + "226": {"x":552,"y":65,"w":21,"h":61,"character":226,"shift":20,"offset":0,}, + "227": {"x":575,"y":65,"w":30,"h":61,"character":227,"shift":29,"offset":0,}, + "228": {"x":607,"y":65,"w":31,"h":61,"character":228,"shift":30,"offset":0,}, + "229": {"x":640,"y":65,"w":15,"h":61,"character":229,"shift":19,"offset":3,}, + "230": {"x":657,"y":65,"w":21,"h":61,"character":230,"shift":21,"offset":0,}, + "231": {"x":680,"y":65,"w":19,"h":61,"character":231,"shift":19,"offset":0,}, + "232": {"x":701,"y":65,"w":16,"h":61,"character":232,"shift":11,"offset":0,}, + "233": {"x":719,"y":65,"w":22,"h":61,"character":233,"shift":22,"offset":0,}, + "234": {"x":743,"y":65,"w":21,"h":61,"character":234,"shift":20,"offset":0,}, + "235": {"x":766,"y":65,"w":21,"h":61,"character":235,"shift":20,"offset":0,}, + "236": {"x":789,"y":65,"w":23,"h":61,"character":236,"shift":22,"offset":0,}, + "237": {"x":814,"y":65,"w":17,"h":61,"character":237,"shift":16,"offset":0,}, + "238": {"x":833,"y":65,"w":25,"h":61,"character":238,"shift":21,"offset":-4,}, + "239": {"x":860,"y":65,"w":23,"h":61,"character":239,"shift":22,"offset":0,}, + "240": {"x":885,"y":65,"w":21,"h":61,"character":240,"shift":20,"offset":0,}, + "241": {"x":908,"y":65,"w":9,"h":61,"character":241,"shift":10,"offset":0,}, + "243": {"x":919,"y":65,"w":29,"h":61,"character":243,"shift":29,"offset":0,}, + "244": {"x":950,"y":65,"w":28,"h":61,"character":244,"shift":27,"offset":0,}, + "245": {"x":980,"y":65,"w":19,"h":61,"character":245,"shift":0,"offset":-17,}, + "246": {"x":2,"y":128,"w":22,"h":61,"character":246,"shift":21,"offset":-1,}, + "247": {"x":499,"y":65,"w":20,"h":61,"character":247,"shift":16,"offset":0,}, + "248": {"x":484,"y":65,"w":13,"h":61,"character":248,"shift":9,"offset":1,}, + "249": {"x":452,"y":65,"w":30,"h":61,"character":249,"shift":29,"offset":0,}, + "338": {"x":238,"y":65,"w":15,"h":61,"character":338,"shift":19,"offset":3,}, + "352": {"x":66,"y":65,"w":17,"h":61,"character":352,"shift":19,"offset":2,}, + "376": {"x":85,"y":65,"w":19,"h":61,"character":376,"shift":15,"offset":0,}, + "402": {"x":106,"y":65,"w":12,"h":61,"character":402,"shift":15,"offset":3,}, + "710": {"x":120,"y":65,"w":16,"h":61,"character":710,"shift":20,"offset":3,}, + "732": {"x":138,"y":65,"w":22,"h":61,"character":732,"shift":21,"offset":-1,}, + "8208": {"x":162,"y":65,"w":4,"h":61,"character":8208,"shift":7,"offset":2,}, + "8211": {"x":168,"y":65,"w":22,"h":61,"character":8211,"shift":21,"offset":0,}, + "8212": {"x":192,"y":65,"w":28,"h":61,"character":8212,"shift":27,"offset":0,}, + "8216": {"x":222,"y":65,"w":14,"h":61,"character":8216,"shift":10,"offset":0,}, + "8217": {"x":255,"y":65,"w":14,"h":61,"character":8217,"shift":10,"offset":0,}, + "8218": {"x":434,"y":65,"w":16,"h":61,"character":8218,"shift":9,"offset":-5,}, + "8220": {"x":271,"y":65,"w":16,"h":61,"character":8220,"shift":16,"offset":0,}, + "8221": {"x":289,"y":65,"w":16,"h":61,"character":8221,"shift":16,"offset":0,}, + "8222": {"x":307,"y":65,"w":16,"h":61,"character":8222,"shift":19,"offset":2,}, + "8224": {"x":325,"y":65,"w":15,"h":61,"character":8224,"shift":18,"offset":3,}, + "8225": {"x":342,"y":65,"w":14,"h":61,"character":8225,"shift":18,"offset":3,}, + "8230": {"x":358,"y":65,"w":13,"h":61,"character":8230,"shift":17,"offset":3,}, + "8240": {"x":373,"y":65,"w":19,"h":61,"character":8240,"shift":20,"offset":1,}, + "8249": {"x":394,"y":65,"w":17,"h":61,"character":8249,"shift":19,"offset":2,}, + "8250": {"x":413,"y":65,"w":19,"h":61,"character":8250,"shift":0,"offset":-17,}, + "8482": {"x":495,"y":191,"w":18,"h":61,"character":8482,"shift":12,"offset":0,}, + "9647": {"x":986,"y":191,"w":26,"h":61,"character":9647,"shift":42,"offset":2,}, + }, + "kerningPairs": [], + "ranges": [ + {"lower":32,"upper":126,}, + {"lower":144,"upper":144,}, + {"lower":160,"upper":249,}, + {"lower":338,"upper":338,}, + {"lower":352,"upper":352,}, + {"lower":376,"upper":376,}, + {"lower":402,"upper":402,}, + {"lower":710,"upper":710,}, + {"lower":732,"upper":732,}, + {"lower":8208,"upper":8208,}, + {"lower":8211,"upper":8212,}, + {"lower":8216,"upper":8218,}, + {"lower":8220,"upper":8225,}, + {"lower":8230,"upper":8230,}, + {"lower":8240,"upper":8240,}, + {"lower":8249,"upper":8250,}, + {"lower":8482,"upper":8482,}, + {"lower":9647,"upper":9647,}, + ], + "regenerateBitmap": false, + "canGenerateBitmap": true, + "maintainGms1Font": false, + "parent": { + "name": "Fonts", + "path": "folders/Fonts.yy", + }, + "resourceVersion": "1.0", + "name": "fnt_krutidev", + "tags": [ + "scribble krutidev", + ], + "resourceType": "GMFont", +} \ No newline at end of file diff --git a/objects/obj_test_animation_speed/Create_0.gml b/objects/obj_test_animation_speed/Create_0.gml new file mode 100644 index 000000000..574873c7f --- /dev/null +++ b/objects/obj_test_animation_speed/Create_0.gml @@ -0,0 +1 @@ +animation_speed = 1; \ No newline at end of file diff --git a/objects/obj_test_animation_speed/Draw_0.gml b/objects/obj_test_animation_speed/Draw_0.gml new file mode 100644 index 000000000..d6d7a1934 --- /dev/null +++ b/objects/obj_test_animation_speed/Draw_0.gml @@ -0,0 +1,49 @@ +draw_text(10, 10, animation_speed); + +var _x = 10; +var _y = 50; + +var _element = scribble("[wave]wavy text wavy text wavy text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[shake]shaky text shaky text shaky text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[wobble]wobbly text wobbly text wobbly text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[pulse]pulsing text pulsing text pulsing text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[wheel]wheely text wheely text wheely text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[jitter]jittery text jittery text jittery text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[blink]blinky text blinky text blinky text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[rainbow]rainbow text rainbow text rainbow text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; + +var _element = scribble("[cycle, 200, 140, 190, 150]cycling text cycling text cycling text"); +_element.animation_speed(animation_speed); +_element.draw(_x, _y); +_y += _element.get_height() + 10; \ No newline at end of file diff --git a/objects/obj_test_animation_speed/Step_0.gml b/objects/obj_test_animation_speed/Step_0.gml new file mode 100644 index 000000000..51cefe760 --- /dev/null +++ b/objects/obj_test_animation_speed/Step_0.gml @@ -0,0 +1,2 @@ +if (keyboard_check(vk_up)) animation_speed = min(2, animation_speed + 0.01); +if (keyboard_check(vk_down)) animation_speed = max(0, animation_speed - 0.01); \ No newline at end of file diff --git a/objects/obj_test_animation_speed/obj_test_animation_speed.yy b/objects/obj_test_animation_speed/obj_test_animation_speed.yy new file mode 100644 index 000000000..b177704ac --- /dev/null +++ b/objects/obj_test_animation_speed/obj_test_animation_speed.yy @@ -0,0 +1,35 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Animation", + "path": "folders/Test Cases/Animation.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test_animation_speed", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/objects/obj_test_devangari_basic/Create_0.gml b/objects/obj_test_devangari_basic/Create_0.gml new file mode 100644 index 000000000..3ec4a7f1e --- /dev/null +++ b/objects/obj_test_devangari_basic/Create_0.gml @@ -0,0 +1,3 @@ +scribble_font_set_default("fnt_krutidev"); +unicode = "चाह नहीं मैं सुरबाला के गहनों में गूँथा जाऊँ"; +krutidev = UnicodeToKrutidev(unicode); \ No newline at end of file diff --git a/objects/obj_test_devangari_basic/Draw_0.gml b/objects/obj_test_devangari_basic/Draw_0.gml new file mode 100644 index 000000000..4cf0afc67 --- /dev/null +++ b/objects/obj_test_devangari_basic/Draw_0.gml @@ -0,0 +1 @@ +scribble(krutidev).draw(10, 10); \ No newline at end of file diff --git a/objects/obj_test_devangari_basic/obj_test_devangari_basic.yy b/objects/obj_test_devangari_basic/obj_test_devangari_basic.yy new file mode 100644 index 000000000..f8149ce45 --- /dev/null +++ b/objects/obj_test_devangari_basic/obj_test_devangari_basic.yy @@ -0,0 +1,34 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Devanagari", + "path": "folders/Test Cases/Language Support/Devanagari.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test_devangari_basic", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/objects/obj_test_flash/Draw_0.gml b/objects/obj_test_flash/Draw_0.gml new file mode 100644 index 000000000..20e3388be --- /dev/null +++ b/objects/obj_test_flash/Draw_0.gml @@ -0,0 +1,8 @@ +var _t = mouse_x / room_width; + +scribble("[c_coquelicot]Test[/c] white").flash(c_red, _t).draw(x, y); +scribble("Test grey").blend(c_grey, 1.0).flash(c_red, _t).draw(x, y + 30); +scribble("Test red").blend("c_coquelicot", 1.0).flash(c_red, _t).draw(x, y + 60); +scribble("Test red").starting_format(undefined, "c_coquelicot").flash(c_red, _t).draw(x, y + 90); +scribble("[#ff3800]Test[/c] white").flash(c_red, _t).draw(x, y + 120); +scribble("[d#" + string(0x0038FF) + "]Test[/c] white").flash(c_red, _t).draw(x, y + 150); \ No newline at end of file diff --git a/objects/obj_test_flash/obj_test_flash.yy b/objects/obj_test_flash/obj_test_flash.yy new file mode 100644 index 000000000..c4b945852 --- /dev/null +++ b/objects/obj_test_flash/obj_test_flash.yy @@ -0,0 +1,33 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Basic", + "path": "folders/Test Cases/Basic.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test_flash", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/objects/obj_test_newline/Draw_0.gml b/objects/obj_test_newline/Draw_0.gml index b8be9351c..e178421f1 100644 --- a/objects/obj_test_newline/Draw_0.gml +++ b/objects/obj_test_newline/Draw_0.gml @@ -1,8 +1,10 @@ -//scribble("Test text!").draw(10, 10); -//scribble("Text\ntext!").draw(210, 10); -//scribble( -//@"Text -//text!").draw(410, 10); +scribble("aaaaaaaaaaaaaaaaaaaa \nc").draw(410, 10); + + + +exit; + + var _demo_string = "[pin_center][scale,1.4]Contrary to popular belief,[/]\n\n[fa_justify]Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet...\", comes from a line in section 1.10.32."; diff --git a/objects/obj_test_typewriter_get_state/Create_0.gml b/objects/obj_test_typewriter_get_state/Create_0.gml new file mode 100644 index 000000000..78bc1d74a --- /dev/null +++ b/objects/obj_test_typewriter_get_state/Create_0.gml @@ -0,0 +1,4 @@ +text = "test test test test.!!!" + +typist = scribble_typist(); +typist.out(0.2, 10); \ No newline at end of file diff --git a/objects/obj_test_typewriter_get_state/Draw_0.gml b/objects/obj_test_typewriter_get_state/Draw_0.gml new file mode 100644 index 000000000..53994b300 --- /dev/null +++ b/objects/obj_test_typewriter_get_state/Draw_0.gml @@ -0,0 +1,5 @@ +scribble(text) +.align(fa_left, fa_top) +.draw(10, 50, typist); + +draw_text(10, 10, typist.get_state()); \ No newline at end of file diff --git a/objects/obj_test_typewriter_get_state/Step_0.gml b/objects/obj_test_typewriter_get_state/Step_0.gml new file mode 100644 index 000000000..915787579 --- /dev/null +++ b/objects/obj_test_typewriter_get_state/Step_0.gml @@ -0,0 +1 @@ +if (typist.get_state() == 2.0) instance_destroy(); \ No newline at end of file diff --git a/objects/obj_test_typewriter_get_state/obj_test_typewriter_get_state.yy b/objects/obj_test_typewriter_get_state/obj_test_typewriter_get_state.yy new file mode 100644 index 000000000..bdddce9c0 --- /dev/null +++ b/objects/obj_test_typewriter_get_state/obj_test_typewriter_get_state.yy @@ -0,0 +1,35 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Typewriter", + "path": "folders/Test Cases/Typewriter.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test_typewriter_get_state", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/objects/obj_test_wrap_zwsp/Create_0.gml b/objects/obj_test_wrap_zwsp/Create_0.gml new file mode 100644 index 000000000..54e6ab384 --- /dev/null +++ b/objects/obj_test_wrap_zwsp/Create_0.gml @@ -0,0 +1 @@ +width = 500; \ No newline at end of file diff --git a/objects/obj_test_wrap_zwsp/Draw_0.gml b/objects/obj_test_wrap_zwsp/Draw_0.gml new file mode 100644 index 000000000..dd435cf94 --- /dev/null +++ b/objects/obj_test_wrap_zwsp/Draw_0.gml @@ -0,0 +1,11 @@ +var _string = "pneumonoultramicrosco[zwsp]picsilicovolca[zwsp]noconiosis"; + +var _element = scribble(_string).wrap(width); +_element.draw(x, y); + +draw_circle(x, y, 6, true); +draw_rectangle(x, y, x + width, y + _element.get_height(), true); + +draw_circle(room_width div 2, y + _element.get_height() + 40, 6, true); + +scribble(_string).wrap(width).draw(room_width div 2, y + _element.get_height() + 40); \ No newline at end of file diff --git a/objects/obj_test_wrap_zwsp/Step_0.gml b/objects/obj_test_wrap_zwsp/Step_0.gml new file mode 100644 index 000000000..64b4477d7 --- /dev/null +++ b/objects/obj_test_wrap_zwsp/Step_0.gml @@ -0,0 +1 @@ +if (mouse_check_button(mb_left)) width = mouse_x - x; \ No newline at end of file diff --git a/objects/obj_test_wrap_zwsp/obj_test_wrap_zwsp.yy b/objects/obj_test_wrap_zwsp/obj_test_wrap_zwsp.yy new file mode 100644 index 000000000..cbc09f5ba --- /dev/null +++ b/objects/obj_test_wrap_zwsp/obj_test_wrap_zwsp.yy @@ -0,0 +1,35 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 0, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Wrapping", + "path": "folders/Test Cases/Wrapping.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test_wrap_zwsp", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/options/main/options_main.yy b/options/main/options_main.yy index 88549a40f..3935b3248 100644 --- a/options/main/options_main.yy +++ b/options/main/options_main.yy @@ -1,5 +1,6 @@ { "option_gameguid": "903ca60a-ecf4-4831-b61f-fc12bfdf5eb9", + "option_gameid": "0", "option_game_speed": 60, "option_mips_for_3d_textures": false, "option_draw_colour": 4294967295, @@ -7,9 +8,14 @@ "option_steam_app_id": "0", "option_sci_usesci": false, "option_author": "", + "option_collision_compatibility": true, + "option_copy_on_write_enabled": true, "option_lastchanged": "02 April 2019 13:26:05", "option_spine_licence": false, - "resourceVersion": "1.2", + "option_template_image": "${base_options_dir}/main/template_image.png", + "option_template_icon": "${base_options_dir}/main/template_icon.png", + "option_template_description": null, + "resourceVersion": "1.4", "name": "Main", "tags": [], "resourceType": "GMMainOptions", diff --git a/options/ps5/options_ps5.yy b/options/ps5/options_ps5.yy new file mode 100644 index 000000000..cabc42612 --- /dev/null +++ b/options/ps5/options_ps5.yy @@ -0,0 +1,38 @@ +{ + "option_ps5_package_id": "IV0002-NPXS29129_00-APP0990000000022", + "option_ps5_passcode": "GvE6xCpZxd96scOUGuLPbuLp8O800B0s", + "option_ps5_nptitleid": "", + "option_ps5_nptitlesecret": "", + "option_ps5_sharedbinarysubconfigs": "", + "option_ps5_paramsfo": "", + "option_ps5_nptitledat": "", + "option_ps5_trophyedit": "", + "option_ps5_shareparam": "", + "option_ps5_pronunciation": "", + "option_ps5_splash_screen": "${base_options_dir}/ps5/sce_sys/pic1.png", + "option_ps5_foreground_screen": "${base_options_dir}/ps5/sce_sys/pic2.png", + "option_ps5_save_data_icon": "${base_options_dir}/ps5/sce_sys/save_data.png", + "option_ps5_trophy_screen": "${base_options_dir}/ps5/sce_sys/pic0.png", + "option_ps5_interpolate_pixels": true, + "option_ps5_display_cursor": false, + "option_ps5_scale": 0, + "option_ps5_texture_page": "2048x2048", + "option_ps5_max_display_width": -1, + "option_ps5_max_display_height": -1, + "option_ps5_icon": "${base_options_dir}/ps5/sce_sys/icon0.png", + "option_ps5_shareoverlay_image": "${base_options_dir}/ps5/sce_sys/shareoverlayimage.png", + "option_ps5_nptitledat_file": "${options_dir}\\ps5\\sce_sys\\nptitle.dat", + "option_ps5_paramsfo_file": "${options_dir}\\ps5\\sce_sys\\param.sfo", + "option_ps5_trophy00trp_file": "${options_dir}\\ps5\\sce_sys\\trophy\\trophy00.trp", + "option_ps5_shareparam_file": "${options_dir}\\ps5\\sce_sys\\shareparam.json", + "option_ps5_pronunciation_file": "${options_dir}\\ps5\\sce_sys\\pronunciation.xml", + "option_ps5_pronunciation_sig": "${options_dir}\\ps5\\sce_sys\\pronunciation.sig", + "option_ps5_onion": 2048, + "option_ps5_garlic": 1024, + "option_ps5_neo_onion": 2048, + "option_ps5_neo_garlic": 1536, + "resourceVersion": "1.0", + "name": "PlayStation 5", + "tags": [], + "resourceType": "GMPS5Options", +} \ No newline at end of file diff --git a/options/windows/options_windows.yy b/options/windows/options_windows.yy index 6dbd49a00..5766c3df4 100644 --- a/options/windows/options_windows.yy +++ b/options/windows/options_windows.yy @@ -1,7 +1,7 @@ { "option_windows_display_name": "Scribble", "option_windows_executable_name": "${project_name}", - "option_windows_version": "8.0.1.7", + "option_windows_version": "8.0.1.8", "option_windows_company_info": "@jujuadams", "option_windows_product_info": "Scribble", "option_windows_copyright_info": "@jujuadams (c) 2022", diff --git a/options/xboxseriesxs/options_xboxseriesxs.yy b/options/xboxseriesxs/options_xboxseriesxs.yy new file mode 100644 index 000000000..7fd6a21db --- /dev/null +++ b/options/xboxseriesxs/options_xboxseriesxs.yy @@ -0,0 +1,42 @@ +{ + "option_xboxseriesxs_display_name": "Created with GameMaker Studio 2", + "option_xboxseriesxs_description": "Your Description", + "option_xboxseriesxs_publisher": "Company Name", + "option_xboxseriesxs_publisher_display_name": "Company Display Name", + "option_xboxseriesxs_version": "1.0.0.0", + "option_xboxseriesxs_product_id": "", + "option_xboxseriesxs_title_id": "01234567", + "option_xboxseriesxs_service_config_id": "00000000-0000-0000-0000-000000000000", + "option_xboxseriesxs_program_id": "ExactName.InPartnerCenter", + "option_xboxseriesxs_store_id": "", + "option_xboxseriesxs_msaappid": "", + "option_xboxseriesxs_content_id": "", + "option_xboxseriesxs_ekbid": "", + "option_xboxseriesxs_playfab_party_id": "00000", + "option_xboxseriesxs_simplified_user_model": false, + "option_xboxseriesxs_require_xbox_live": false, + "option_xboxseriesxs_require_game_chat": false, + "option_xboxseriesxs_game_chat_slots": 4, + "option_xboxseriesxs_require_audio_recording": false, + "option_xboxseriesxs_stats_system": 0, + "option_xboxseriesxs_service_config_manifest": "", + "option_xboxseriesxs_network_config_manifest": "", + "option_xboxseriesxs_splash_screen": "${base_options_dir}/xboxseriesxs/SplashScreen.png", + "option_xboxseriesxs_splash_screen_colour": 4282795590, + "option_xboxseriesxs_logo_store": "${base_options_dir}/xboxseriesxs/logos/StoreLogo.png", + "option_xboxseriesxs_logo_small": "${base_options_dir}/xboxseriesxs/logos/SmallLogo.png", + "option_xboxseriesxs_logo_medium": "${base_options_dir}/xboxseriesxs/logos/Logo.png", + "option_xboxseriesxs_logo_large": "${base_options_dir}/xboxseriesxs/logos/LargeLogo.png", + "option_xboxseriesxs_logo_background_colour": 4282795590, + "option_xboxseriesxs_foreground_text": 0, + "option_xboxseriesxs_interpolate_pixels": false, + "option_xboxseriesxs_scale": 0, + "option_xboxseriesxs_texture_page": "2048x2048", + "option_xboxseriesxs_support_4k_one_x": false, + "option_xboxseriesxs_support_4k_one_s": false, + "option_xboxseriesxs_languages": "\n \n \n \n ", + "resourceVersion": "1.1", + "name": "Xbox Series XS", + "tags": [], + "resourceType": "GMXboxSeriesXSOptions", +} \ No newline at end of file diff --git a/rooms/rm_test/rm_test.yy b/rooms/rm_test/rm_test.yy index fc87983ca..9292c04b6 100644 --- a/rooms/rm_test/rm_test.yy +++ b/rooms/rm_test/rm_test.yy @@ -14,7 +14,7 @@ ], "layers": [ {"instances":[ - {"properties":[],"isDnd":false,"objectId":{"name":"obj_test_font_shadow","path":"objects/obj_test_font_shadow/obj_test_font_shadow.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":32.0,"y":32.0,"resourceVersion":"1.0","name":"inst_3EECEFDA","tags":[],"resourceType":"GMRInstance",}, + {"properties":[],"isDnd":false,"objectId":{"name":"obj_test_typewriter_get_state","path":"objects/obj_test_typewriter_get_state/obj_test_typewriter_get_state.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":32.0,"y":32.0,"resourceVersion":"1.0","name":"inst_77A23916","tags":[],"resourceType":"GMRInstance",}, ],"visible":true,"depth":0,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Example","tags":[],"resourceType":"GMRInstanceLayer",}, {"spriteId":null,"colour":4288702270,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":100,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Background","tags":[],"resourceType":"GMRBackgroundLayer",}, ], @@ -22,7 +22,7 @@ "creationCodeFile": "", "inheritCode": false, "instanceCreationOrder": [ - {"name":"inst_3EECEFDA","path":"rooms/rm_test/rm_test.yy",}, + {"name":"inst_77A23916","path":"rooms/rm_test/rm_test.yy",}, ], "inheritCreationOrder": false, "sequenceId": null, diff --git a/scripts/UnicodeToKrutidev/UnicodeToKrutidev.gml b/scripts/UnicodeToKrutidev/UnicodeToKrutidev.gml new file mode 100644 index 000000000..7ed69ec42 --- /dev/null +++ b/scripts/UnicodeToKrutidev/UnicodeToKrutidev.gml @@ -0,0 +1,442 @@ +/// Unicode to Krutidev +/// @jujuadams 2022-01-29 +/// +/// Krutidev is an old font format that allows for Devanagari ("Hindi") to be rendered without relying +/// on GSUB and GPOS tables found in modern .ttf font files. GameMaker doesn't allow us to access GPOS +/// and GSUB tables so this is the best we have until someone puts together a .ttf file reader. +/// +/// Krutidev works by inserting Devanagari glyphs into a font by overwriting Latin character slots. +/// For example, "k" is replaced by "ा". Devanagari glyphs can get quite complicated, for example "ह्न" +/// is made up of three Unicode characters but is represented in Krutidev using "à". +/// +/// This function converts Unicode-formatted Devanagari into the necessary Latin characters so that +/// when the outputted string is rendered using a Krutidev font the Devanagari glyphs are comfortably +/// readable to the player. +/// +/// There are, of course, more Devanagari glyph variants than there are Latin characters. This means +/// that Krutidev fonts need to be set up with an expanded range of glyphs. Judging by the sample font +/// I found (Krutidev 010), the glyph ranges required are: +/// 32 -> 126 0x0020 -> 0x007E +/// 144 0x0090 +/// 160 -> 249 0x00A0 -> 0x00F9 +/// 338 0x0152 +/// 352 0x0160 +/// 376 0x0178 +/// 402 0x0192 +/// 710 0x02C6 +/// 732 0x02DC +/// 8208 0x2010 +/// 8211 -> 8212 0x2013 -> 0x2014 +/// 8216 -> 8218 0x2018 -> 0x201A +/// 8220 -> 8225 0x201C -> 0x2021 +/// 8230 0x2026 +/// 8240 0x2030 +/// 8249 -> 8250 0x2039 -> 0x203A +/// 8482 0x2122 +/// This list may not be exhaustive. I highly recommend grabbing FontForge to help determined what +/// glyphs are available in your font of choice. +/// +/// Using Krutidev to render Devanagari has drawbacks: +/// 1) Only Krutidev fonts can be used with Krutidev-formatted text. There seem to be a *lot* of +/// Krutidev fonts out there but that may dry up over time. I found a website that seems to +/// host a bazillion Krutidev fonts: https://www.wfonts.com/search?kwd=Kruti+Dev +/// 2) Krutidev doesn't have a lot of the fancier Devanagari glyphs. I am unsure exactly what is +/// missing - I'm not a native Hindi speaker - so don't be surprised if some text doesn't look +/// quite right to people familiar with the language. +/// 3) Since Krutidev fonts replace Western characters with Devanagari glyphs, this means it is +/// not possible to draw Latin script and Devanagari script from the same font. This is a bit +/// of a pain but can be worked around if you're desperate. +/// 4) Setting Krutidev font glyph ranges is a faff. Not the worst thing in the world, but worth +/// bearing in mind. +/// +/// @param unicodeString + + + +#region Build find-replace lookup table + +var _unicodeSourceArray = [ + "‘", "’", "“", "”", "(", ")", "{", "}", "=", "।", "?", "-", "µ", "॰", ",", ".", + "०", "१", "२", "३", "४", "५", "६", "७", "८", "९", "x", + + "फ़्", "क़", "ख़", "ग़", "ज़्", "ज़", "ड़", "ढ़", "फ़", "य़", "ऱ", "ऩ", + "त्त्", "त्त", "क्त", "दृ", "कृ", + + "ह्न", "ह्य", "हृ", "ह्म", "ह्र", "ह्", "द्द", "क्ष्", "क्ष", "त्र्", "त्र","ज्ञ", + "छ्य", "ट्य", "ठ्य", "ड्य", "ढ्य", "द्य","द्व", + "श्र", "ट्र", "ड्र", "ढ्र", "छ्र", "क्र", "फ्र", "द्र", "प्र", "ग्र", "रु", "रू", + "्र", + + "ओ", "औ", "आ", "अ", "ई", "इ", "उ", "ऊ", "ऐ", "ए", "ऋ", + + "क्", "क", "क्क", "ख्", "ख", "ग्", "ग", "घ्", "घ", "ङ", + "चै", "च्", "च", "छ", "ज्", "ज", "झ्", "झ", "ञ", + + "ट्ट", "ट्ठ", "ट", "ठ", "ड्ड", "ड्ढ", "ड", "ढ", "ण्", "ण", + "त्", "त", "थ्", "थ", "द्ध", "द", "ध्", "ध", "न्", "न", + + "प्", "प", "फ्", "फ", "ब्", "ब", "भ्", "भ", "म्", "म", + "य्", "य", "र", "ल्", "ल", "ळ", "व्", "व", + "श्", "श", "ष्", "ष", "स्", "स", "ह", + + "ऑ", "ॉ", "ो", "ौ", "ा", "ी", "ु", "ू", "ृ", "े", "ै", + "ं", "ँ", "ः", "ॅ", "ऽ", chr(0x94D), //virama +]; + +var _krutidevSourceArray = [ + "^", "*", "Þ", "ß", "¼", "½", "¿", "À", "¾", "A", "\\", "&", "&", "Œ", "]","-", + "å", "ƒ", "„", "…", "†", "‡", "ˆ", "‰", "Š", "‹","Û", + + "¶", "d", "[k", "x", "T", "t", "M+", "<+", "Q", ";", "j", "u", + "Ù", "Ùk", "Dr", "–", "—", + + "à", "á", "â", "ã", "ºz", "º", "í", "{", "{k", "«", "=","K", + "Nî", "Vî", "Bî", "Mî", "<î", "|","}", + "J", "Vª", "Mª", "<ªª", "Nª", "Ø", "Ý", "æ", "ç", "xz", "#", ":", + "z", + + "vks", "vkS", "vk", "v", "bZ", "b", "m", "Å", ",s", ",", "_", + + "D", "d", "ô", "[", "[k", "X", "x", "?", "?k", "³", + "pkS", "P", "p", "N", "T", "t", "÷", ">", "¥", + + "ê", "ë", "V", "B", "ì", "ï", "M", "<", ".", ".k", + "R", "r", "F", "Fk", ")", "n", "/", "/k", "U", "u", + + "I", "i", "¶", "Q", "C", "c", "H", "Hk", "E", "e", + "¸", ";", "j", "Y", "y", "G", "O", "o", + "'", "'k", "\"", "\"k", "L", "l", "g", + + "v‚", "‚", "ks", "kS", "k", "h", "q", "w", "`", "s", "S", + "a", "¡", "%", "W", "·", "~", +]; + +//Use a ds_map rather than a struct since our keys will be integers +global.__scribble_krutidev_lookup_map = ds_map_create(); + +var _i = 0; +repeat(array_length(_unicodeSourceArray)) +{ + var _string = _unicodeSourceArray[_i]; + + var _searchInteger = 0; + var _j = string_length(_string); + repeat(_j) + { + _searchInteger = (_searchInteger << 16) | ord(string_char_at(_string, _j)); + --_j; + } + + var _string = _krutidevSourceArray[_i]; + var _writeArray = []; + var _j = 1; + repeat(string_length(_string)) + { + array_push(_writeArray, ord(string_char_at(_string, _j))); + ++_j; + } + + global.__scribble_krutidev_lookup_map[? _searchInteger] = _writeArray; + + ++_i; +} + +#endregion + + + +#region Build matra lookup table + +//Use a ds_map rather than a struct since our keys are integers +global.__scribble_krutidev_matra_lookup_map = ds_map_create(); +global.__scribble_krutidev_matra_lookup_map[? 58] = true; +global.__scribble_krutidev_matra_lookup_map[? 2305] = true; +global.__scribble_krutidev_matra_lookup_map[? 2306] = true; +global.__scribble_krutidev_matra_lookup_map[? 2366] = true; +global.__scribble_krutidev_matra_lookup_map[? 2367] = true; +global.__scribble_krutidev_matra_lookup_map[? 2368] = true; +global.__scribble_krutidev_matra_lookup_map[? 2369] = true; +global.__scribble_krutidev_matra_lookup_map[? 2370] = true; +global.__scribble_krutidev_matra_lookup_map[? 2371] = true; +global.__scribble_krutidev_matra_lookup_map[? 2373] = true; +global.__scribble_krutidev_matra_lookup_map[? 2375] = true; +global.__scribble_krutidev_matra_lookup_map[? 2376] = true; +global.__scribble_krutidev_matra_lookup_map[? 2379] = true; +global.__scribble_krutidev_matra_lookup_map[? 2380] = true; + +#endregion + + + +function UnicodeToKrutidev(_inString) +{ + //Convert the string into an array + var _stringLength = string_length(_inString); + //Pad the end because we'll need to read beyond the end of the string during the final find-replace + //We pad with 0xFFFF to avoid accidentally making incorrect substring matches later + var _charArray = array_create(_stringLength + 4, 0xFFFF); + + var _i = 0; + repeat(_stringLength) + { + _charArray[@ _i] = ord(string_char_at(_inString, _i+1)); + ++_i; + } + + + + #region Transform quotes and split up nukta ligatures + + var _inSingleQuote = false; + var _inDoubleQuote = false; + var _i = 0; + repeat(_stringLength) + { + switch(_charArray[_i]) + { + //Set up alternating single quote marks + case ord("'"): + _inSingleQuote = !_inSingleQuote; + _charArray[@ _i] = _inSingleQuote? ord("^") : ord("*"); + break; + + //Set up alternating double quote marks + case ord("\""): + _inDoubleQuote = !_inDoubleQuote; + _charArray[@ _i] = _inDoubleQuote? ord("ß") : ord("Þ"); + break; + + //Split up nukta ligatures into their componant parts + case ord("ऩ"): + _charArray[@ _i] = ord("न"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ऱ"): + _charArray[@ _i] = ord("र"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("क़"): + _charArray[@ _i] = ord("क"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ख़"): + _charArray[@ _i] = ord("ख"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ग़"): + _charArray[@ _i] = ord("ग"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ज़"): + _charArray[@ _i] = ord("ज"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ड़"): + _charArray[@ _i] = ord("ड"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("ढ़"): + _charArray[@ _i] = ord("ढ"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("फ़"): + _charArray[@ _i] = ord("फ"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + + case ord("य़"): + _charArray[@ _i] = ord("य"); + array_insert(_charArray, _i+1, 0x093C); ++_i; ++_stringLength; //Nukta + break; + } + + ++_i; + } + + #endregion + + + + #region Reposition ि to the front of the word and replace it with an "f" + + //TODO - Log where ि is found during the nukta ligature sweep + var _i = 1; //Start at the second char because we don't care if the string starts with 0x093F (Vowel Sign I) + repeat(_stringLength-1) + { + var _char = _charArray[_i]; + if (_char == ord("ि")) + { + var _fPosition = _i; + + //If we find a virama behind us keep tracking backwards + //We go two indexes backwards because virama (should) always follows another character + var _j = _i - 1; + while((_j >= 0) && (_charArray[_j] == 0x094D)) _j -= 2; + + array_delete(_charArray, _fPosition, 1); + array_insert(_charArray, _j, ord("f")); + + _i = _fPosition; + } + + ++_i; + } + + #endregion + + + + #region Move र् (ra + virama) after matras + + var _matraLookupMap = global.__scribble_krutidev_matra_lookup_map; + + //Using a for-loop here as _stringLength may change + for(var _i = 0; _i < _stringLength; ++_i) + { + //TODO - Log where ra-virama is found during the nukta ligature sweep + if ((_charArray[_i] == ord("र")) && (_charArray[_i+1] == 0x094D)) //Ra followed by virama + { + var _probablePosition = _i + 3; + + var _charRight = _charArray[_probablePosition]; + while(ds_map_exists(_matraLookupMap, _charRight)) + { + _probablePosition++; + _charRight = _charArray[_probablePosition]; + } + + array_insert(_charArray, _probablePosition, ord("Z")); + array_delete(_charArray, _i, 2); + + --_stringLength; + } + } + + #endregion + + + + #region Perform bulk find-replace + + var _lookupMap = global.__scribble_krutidev_lookup_map; + + //Create a 64-bit minibuffer + //Fortunately all the characters we're looking for fit into 16 bits and we only need to look for 4 at a time + var _oneChar = 0x0000; + var _twoChar = ((_charArray[0] & 0xFFFF) << 16); + var _threeChar = _twoChar | ((_charArray[1] & 0xFFFF) << 32); + var _fourChar = _threeChar | ((_charArray[2] & 0xFFFF) << 48); + + //Using a for-loop here as _stringLength may change + for(var _i = 0; _i < _stringLength; ++_i;) + { + _oneChar = _twoChar >> 16; + _twoChar = _threeChar >> 16; + _threeChar = _fourChar >> 16; + _fourChar = _threeChar | ((_charArray[_i + 3] & 0xFFFF) << 48); + + //Try to find a matching substring + var _foundLength = 4; + var _replacementArray = _lookupMap[? _fourChar]; + + if (_replacementArray == undefined) + { + _foundLength = 3; + _replacementArray = _lookupMap[? _threeChar]; + + if (_replacementArray == undefined) + { + _foundLength = 2; + _replacementArray = _lookupMap[? _twoChar]; + + if (_replacementArray == undefined) + { + _foundLength = 1; + _replacementArray = _lookupMap[? _oneChar]; + } + } + } + + //Perform a character replacement if we found any matching substring + if (_replacementArray != undefined) + { + var _replacementLength = array_length(_replacementArray); + + if ((_foundLength == 1) && (_replacementLength == 1)) + { + //Shortcut for the most common replacement operation + _charArray[@ _i] = _replacementArray[0]; + } + else + { + //Heavyweight general replacement code... we want to avoid as many delete/insert commands as + //possible as it causes lots of reallocation in the background + + //Copy over as much data as possible from one array + var _copyCount = min(_foundLength, _replacementLength); + array_copy(_charArray, _i, _replacementArray, 0, _copyCount); + + if (_foundLength > _replacementLength) + { + //If we're replacing with fewer characters than we found then we need to delete some characters + array_delete(_charArray, _i + _copyCount, _foundLength - _replacementLength); + } + else + { + //Otherwise, we're adding characters to the array so we have to insert some characters + switch(_replacementLength - _foundLength) + { + case 1: + array_insert(_charArray, _i + _copyCount, _replacementArray[_copyCount]); + break; + + //I'm not sure the 2 or 3 case ever happens but we should cover it just in case + case 2: + array_insert(_charArray, _i + _copyCount, + _replacementArray[_copyCount ], + _replacementArray[_copyCount+1]); + break; + + case 3: + array_insert(_charArray, _i + _copyCount, + _replacementArray[_copyCount ], + _replacementArray[_copyCount+1], + _replacementArray[_copyCount+2]); + break; + } + } + + _i += _replacementLength - 1; //Off-by-one to account for ++_i in the for-loop + _stringLength += _replacementLength - _foundLength; + + //Recalculate our minibuffer since we've messed around with the array a lot + _twoChar = ((_charArray[_i+1] & 0xFFFF) << 16); + _threeChar = _twoChar | ((_charArray[_i+2] & 0xFFFF) << 32); + _fourChar = _threeChar | ((_charArray[_i+3] & 0xFFFF) << 48); + } + } + } + + #endregion + + + + //Convert the array back into a string + var _outString = ""; + var _i = 0; + repeat(_stringLength) + { + _outString += chr(_charArray[_i]); + ++_i; + } + + return _outString; +} \ No newline at end of file diff --git a/scripts/UnicodeToKrutidev/UnicodeToKrutidev.yy b/scripts/UnicodeToKrutidev/UnicodeToKrutidev.yy new file mode 100644 index 000000000..0958834b2 --- /dev/null +++ b/scripts/UnicodeToKrutidev/UnicodeToKrutidev.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Scribble", + "path": "Scribble.yyp", + }, + "resourceVersion": "1.0", + "name": "UnicodeToKrutidev", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/__scribble_class_element/__scribble_class_element.gml b/scripts/__scribble_class_element/__scribble_class_element.gml index 23945524b..3af36f31c 100644 --- a/scripts/__scribble_class_element/__scribble_class_element.gml +++ b/scripts/__scribble_class_element/__scribble_class_element.gml @@ -39,9 +39,10 @@ function __scribble_class_element(_string, _unique_id) constructor __starting_valign = SCRIBBLE_DEFAULT_VALIGN; __blend_colour = c_white; __blend_alpha = 1.0; - __gradient_colour = c_black; __gradient_alpha = 0.0; + __flash_colour = c_white; + __flash_alpha = 0.0; __origin_x = 0.0; __origin_y = 0.0; @@ -87,9 +88,9 @@ function __scribble_class_element(_string, _unique_id) constructor __tw_legacy_typist_use = false; } - __animation_time = current_time; - __animation_tick_speed = 1; - __animation_blink_state = true; + __animation_time = current_time; + __animation_speed = 1; + __animation_blink_state = true; __padding_l = 0; __padding_t = 0; @@ -140,234 +141,6 @@ function __scribble_class_element(_string, _unique_id) constructor __bbox_obb_x3 = 0; __bbox_obb_y3 = 0; - static __update_bbox_matrix = function() - { - __update_scale_to_box_scale(); - - if (__bbox_dirty) - { - __bbox_dirty = false; - - var _model = __get_model(true); - if (!is_struct(_model)) - { - __bbox_matrix = matrix_build(-__origin_x, -__origin_y, 0, 0,0,0, 1,1,1); - __bbox_aabb_left = 0; - __bbox_aabb_top = 0; - __bbox_aabb_right = 0; - __bbox_aabb_bottom = 0; - __bbox_obb_x0 = 0; - __bbox_obb_y0 = 0; - __bbox_obb_x1 = 0; - __bbox_obb_y1 = 0; - __bbox_obb_x2 = 0; - __bbox_obb_y2 = 0; - __bbox_obb_x3 = 0; - __bbox_obb_y3 = 0; - return; - } - - var _xscale = __scale_to_box_scale*_model.__fit_scale*__xscale; - var _yscale = __scale_to_box_scale*_model.__fit_scale*__yscale; - - //Left/top padding is baked into the model - var _bbox = _model.__get_bbox(SCRIBBLE_BOUNDING_BOX_USES_PAGE? __page : undefined, __padding_l, __padding_t, __padding_r, __padding_b); - - __bbox_raw_width = 1 + _bbox.right - _bbox.left; - __bbox_raw_height = 1 + _bbox.bottom - _bbox.top; - - if ((_xscale == 1) && (_yscale == 1) && (__angle == 0)) - { - __bbox_matrix = matrix_build(-__origin_x, -__origin_y, 0, 0,0,0, 1,1,1); - - //Avoid using matrices if we can - __bbox_aabb_left = -__origin_x + _bbox.left; - __bbox_aabb_top = -__origin_y + _bbox.top; - __bbox_aabb_right = -__origin_x + _bbox.right; - __bbox_aabb_bottom = -__origin_y + _bbox.bottom; - - __bbox_obb_x0 = __bbox_aabb_left; __bbox_obb_y0 = __bbox_aabb_top; - __bbox_obb_x1 = __bbox_aabb_right; __bbox_obb_y1 = __bbox_aabb_top; - __bbox_obb_x2 = __bbox_aabb_left; __bbox_obb_y2 = __bbox_aabb_bottom; - __bbox_obb_x3 = __bbox_aabb_right; __bbox_obb_y3 = __bbox_aabb_bottom; - } - else - { - //TODO - Optimize this - __bbox_matrix = matrix_multiply(matrix_build(-__origin_x, -__origin_y, 0, 0, 0, 0, 1, 1, 1), - matrix_multiply(matrix_build( 0, 0, 0, 0, 0, 0, _xscale, _yscale, 1), - matrix_build( 0, 0, 0, 0, 0, __angle, 1, 1, 1))); - - var _l = _bbox.left; - var _t = _bbox.top; - var _r = _bbox.right; - var _b = _bbox.bottom; - - var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _t, 0); __bbox_obb_x0 = _vertex[0]; __bbox_obb_y0 = _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _t, 0); __bbox_obb_x1 = _vertex[0]; __bbox_obb_y1 = _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _b, 0); __bbox_obb_x2 = _vertex[0]; __bbox_obb_y2 = _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _b, 0); __bbox_obb_x3 = _vertex[0]; __bbox_obb_y3 = _vertex[1]; - - __bbox_aabb_left = min(__bbox_obb_x0, __bbox_obb_x1, __bbox_obb_x2, __bbox_obb_x3); - __bbox_aabb_top = min(__bbox_obb_y0, __bbox_obb_y1, __bbox_obb_y2, __bbox_obb_y3); - __bbox_aabb_right = max(__bbox_obb_x0, __bbox_obb_x1, __bbox_obb_x2, __bbox_obb_x3); - __bbox_aabb_bottom = max(__bbox_obb_y0, __bbox_obb_y1, __bbox_obb_y2, __bbox_obb_y3); - } - - __bbox_aabb_width = 1 + __bbox_aabb_right - __bbox_aabb_left; - __bbox_aabb_height = 1 + __bbox_aabb_bottom - __bbox_aabb_top; - } - } - - static get_left = function(_x = 0) - { - __update_bbox_matrix(); - return __bbox_aabb_left + _x; - } - - static get_top = function(_y = 0) - { - __update_bbox_matrix(); - return __bbox_aabb_top + _y; - } - - static get_right = function(_x = 0) - { - __update_bbox_matrix(); - return __bbox_aabb_right + _x; - } - - static get_bottom = function(_y = 0) - { - __update_bbox_matrix(); - return __bbox_aabb_bottom + _y; - } - - static get_width = function() - { - __update_bbox_matrix(); - return __bbox_raw_width; - } - - static get_height = function() - { - __update_bbox_matrix(); - return __bbox_raw_height; - } - - /// @param x - /// @param y - static get_bbox = function(_x = 0, _y = 0) - { - __update_bbox_matrix(); - - return { - left: _x + __bbox_aabb_left, - top: _y + __bbox_aabb_top, - right: _x + __bbox_aabb_right, - bottom: _y + __bbox_aabb_bottom, - - width: __bbox_aabb_width, - height: __bbox_aabb_height, - - x0: _x + __bbox_obb_x0, y0: _y + __bbox_obb_y0, - x1: _x + __bbox_obb_x1, y1: _y + __bbox_obb_y1, - x2: _x + __bbox_obb_x2, y2: _y + __bbox_obb_y2, - x3: _x + __bbox_obb_x3, y3: _y + __bbox_obb_y3 - }; - } - - /// @param x - /// @param y - /// @param [typist] - static get_bbox_revealed = function(_x, _y, _typist) - { - //No typist set up, return the whole bounding box - if ((_typist == undefined) && (__tw_reveal == undefined)) - { - return get_bbox(_x, _y); - } - - var _model = __get_model(true); - if (!is_struct(_model)) - { - //No extant model, return an empty bounding box - return { - left: _x, - top: _y, - right: _x, - bottom: _y, - - width: 1, - height: 1, - - x0: _x, y0: _y, - x1: _x, y1: _y, - x2: _x, y2: _y, - x3: _x, y3: _y - }; - } - - if (_typist != undefined) - { - var _bbox = _model.__get_bbox_revealed(__page, 0, _typist.__window_array[_typist.__window_index], __padding_l, __padding_t, __padding_r, __padding_b); - } - else if (__tw_reveal != undefined) - { - var _bbox = _model.__get_bbox_revealed(__page, 0, __tw_reveal, __padding_l, __padding_t, __padding_r, __padding_b); - } - - __update_bbox_matrix(); - var _xscale = __scale_to_box_scale*_model.__fit_scale*__xscale; - var _yscale = __scale_to_box_scale*_model.__fit_scale*__yscale; - - if ((_xscale == 1) && (_yscale == 1) && (__angle == 0)) - { - //Avoid using matrices if we can - var _l = _x - __origin_x + _bbox.left; - var _t = _y - __origin_y + _bbox.top; - var _r = _x - __origin_x + _bbox.right; - var _b = _y - __origin_y + _bbox.bottom; - - var _x0 = _l; var _y0 = _t; - var _x1 = _r; var _y1 = _t; - var _x2 = _l; var _y2 = _b; - var _x3 = _r; var _y3 = _b; - } - else - { - var _l = _bbox.left; - var _t = _bbox.top; - var _r = _bbox.right; - var _b = _bbox.bottom; - - var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _t, 0); var _x0 = _x + _vertex[0]; var _y0 = _y + _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _t, 0); var _x1 = _x + _vertex[0]; var _y1 = _y + _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _b, 0); var _x2 = _x + _vertex[0]; var _y2 = _y + _vertex[1]; - var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _b, 0); var _x3 = _x + _vertex[0]; var _y3 = _y + _vertex[1]; - - var _l = min(_x0, _x1, _x2, _x3); - var _t = min(_y0, _y1, _y2, _y3); - var _r = max(_x0, _x1, _x2, _x3); - var _b = max(_y0, _y1, _y2, _y3); - } - - return { - left: _l, - top: _t, - right: _r, - bottom: _b, - - width: 1 + _r - _l, - height: 1 + _b - _t, - - x0: _x0, y0: _y0, - x1: _x1, y1: _y1, - x2: _x2, y2: _y2, - x3: _x3, y3: _y3 - }; - } - #region Basics @@ -391,7 +164,7 @@ function __scribble_class_element(_string, _unique_id) constructor //If enough time has elapsed since we drew this element then update our animation time if (current_time - __last_drawn > __SCRIBBLE_EXPECTED_FRAME_TIME) { - __animation_time += __animation_tick_speed*SCRIBBLE_TICK_SIZE; + __animation_time += __animation_speed*SCRIBBLE_TICK_SIZE; if (SCRIBBLE_SAFELY_WRAP_TIME) __animation_time = __animation_time mod 16383; //Cheeky wrapping to prevent GPUs with low accuracy flipping out } @@ -523,6 +296,30 @@ function __scribble_class_element(_string, _unique_id) constructor return self; } + static fog = function() + { + __scribble_error(".fog() has been replaced by .flash()"); + } + + /// @param colour + /// @param alpha + static flash = function(_colour, _alpha) + { + if (is_string(_colour)) + { + _colour = global.__scribble_colours[? _colour]; + if (_colour == undefined) + { + __scribble_error("Colour name \"", _colour, "\" not recognised"); + exit; + } + } + + __flash_colour = _colour & 0xFFFFFF; + __flash_alpha = _alpha; + return self; + } + #endregion @@ -835,6 +632,234 @@ function __scribble_class_element(_string, _unique_id) constructor #region Dimensions + static __update_bbox_matrix = function() + { + __update_scale_to_box_scale(); + + if (__bbox_dirty) + { + __bbox_dirty = false; + + var _model = __get_model(true); + if (!is_struct(_model)) + { + __bbox_matrix = matrix_build(-__origin_x, -__origin_y, 0, 0,0,0, 1,1,1); + __bbox_aabb_left = 0; + __bbox_aabb_top = 0; + __bbox_aabb_right = 0; + __bbox_aabb_bottom = 0; + __bbox_obb_x0 = 0; + __bbox_obb_y0 = 0; + __bbox_obb_x1 = 0; + __bbox_obb_y1 = 0; + __bbox_obb_x2 = 0; + __bbox_obb_y2 = 0; + __bbox_obb_x3 = 0; + __bbox_obb_y3 = 0; + return; + } + + var _xscale = __scale_to_box_scale*_model.__fit_scale*__xscale; + var _yscale = __scale_to_box_scale*_model.__fit_scale*__yscale; + + //Left/top padding is baked into the model + var _bbox = _model.__get_bbox(SCRIBBLE_BOUNDING_BOX_USES_PAGE? __page : undefined, __padding_l, __padding_t, __padding_r, __padding_b); + + __bbox_raw_width = 1 + _bbox.right - _bbox.left; + __bbox_raw_height = 1 + _bbox.bottom - _bbox.top; + + if ((_xscale == 1) && (_yscale == 1) && (__angle == 0)) + { + __bbox_matrix = matrix_build(-__origin_x, -__origin_y, 0, 0,0,0, 1,1,1); + + //Avoid using matrices if we can + __bbox_aabb_left = -__origin_x + _bbox.left; + __bbox_aabb_top = -__origin_y + _bbox.top; + __bbox_aabb_right = -__origin_x + _bbox.right; + __bbox_aabb_bottom = -__origin_y + _bbox.bottom; + + __bbox_obb_x0 = __bbox_aabb_left; __bbox_obb_y0 = __bbox_aabb_top; + __bbox_obb_x1 = __bbox_aabb_right; __bbox_obb_y1 = __bbox_aabb_top; + __bbox_obb_x2 = __bbox_aabb_left; __bbox_obb_y2 = __bbox_aabb_bottom; + __bbox_obb_x3 = __bbox_aabb_right; __bbox_obb_y3 = __bbox_aabb_bottom; + } + else + { + //TODO - Optimize this + __bbox_matrix = matrix_multiply(matrix_build(-__origin_x, -__origin_y, 0, 0, 0, 0, 1, 1, 1), + matrix_multiply(matrix_build( 0, 0, 0, 0, 0, 0, _xscale, _yscale, 1), + matrix_build( 0, 0, 0, 0, 0, __angle, 1, 1, 1))); + + var _l = _bbox.left; + var _t = _bbox.top; + var _r = _bbox.right; + var _b = _bbox.bottom; + + var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _t, 0); __bbox_obb_x0 = _vertex[0]; __bbox_obb_y0 = _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _t, 0); __bbox_obb_x1 = _vertex[0]; __bbox_obb_y1 = _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _b, 0); __bbox_obb_x2 = _vertex[0]; __bbox_obb_y2 = _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _b, 0); __bbox_obb_x3 = _vertex[0]; __bbox_obb_y3 = _vertex[1]; + + __bbox_aabb_left = min(__bbox_obb_x0, __bbox_obb_x1, __bbox_obb_x2, __bbox_obb_x3); + __bbox_aabb_top = min(__bbox_obb_y0, __bbox_obb_y1, __bbox_obb_y2, __bbox_obb_y3); + __bbox_aabb_right = max(__bbox_obb_x0, __bbox_obb_x1, __bbox_obb_x2, __bbox_obb_x3); + __bbox_aabb_bottom = max(__bbox_obb_y0, __bbox_obb_y1, __bbox_obb_y2, __bbox_obb_y3); + } + + __bbox_aabb_width = 1 + __bbox_aabb_right - __bbox_aabb_left; + __bbox_aabb_height = 1 + __bbox_aabb_bottom - __bbox_aabb_top; + } + } + + static get_left = function(_x = 0) + { + __update_bbox_matrix(); + return __bbox_aabb_left + _x; + } + + static get_top = function(_y = 0) + { + __update_bbox_matrix(); + return __bbox_aabb_top + _y; + } + + static get_right = function(_x = 0) + { + __update_bbox_matrix(); + return __bbox_aabb_right + _x; + } + + static get_bottom = function(_y = 0) + { + __update_bbox_matrix(); + return __bbox_aabb_bottom + _y; + } + + static get_width = function() + { + __update_bbox_matrix(); + return __bbox_raw_width; + } + + static get_height = function() + { + __update_bbox_matrix(); + return __bbox_raw_height; + } + + /// @param x + /// @param y + static get_bbox = function(_x = 0, _y = 0) + { + __update_bbox_matrix(); + + return { + left: _x + __bbox_aabb_left, + top: _y + __bbox_aabb_top, + right: _x + __bbox_aabb_right, + bottom: _y + __bbox_aabb_bottom, + + width: __bbox_aabb_width, + height: __bbox_aabb_height, + + x0: _x + __bbox_obb_x0, y0: _y + __bbox_obb_y0, + x1: _x + __bbox_obb_x1, y1: _y + __bbox_obb_y1, + x2: _x + __bbox_obb_x2, y2: _y + __bbox_obb_y2, + x3: _x + __bbox_obb_x3, y3: _y + __bbox_obb_y3 + }; + } + + /// @param x + /// @param y + /// @param [typist] + static get_bbox_revealed = function(_x, _y, _typist) + { + //No typist set up, return the whole bounding box + if ((_typist == undefined) && (__tw_reveal == undefined)) + { + return get_bbox(_x, _y); + } + + var _model = __get_model(true); + if (!is_struct(_model)) + { + //No extant model, return an empty bounding box + return { + left: _x, + top: _y, + right: _x, + bottom: _y, + + width: 1, + height: 1, + + x0: _x, y0: _y, + x1: _x, y1: _y, + x2: _x, y2: _y, + x3: _x, y3: _y + }; + } + + if (_typist != undefined) + { + var _bbox = _model.__get_bbox_revealed(__page, 0, _typist.__window_array[_typist.__window_index], __padding_l, __padding_t, __padding_r, __padding_b); + } + else if (__tw_reveal != undefined) + { + var _bbox = _model.__get_bbox_revealed(__page, 0, __tw_reveal, __padding_l, __padding_t, __padding_r, __padding_b); + } + + __update_bbox_matrix(); + var _xscale = __scale_to_box_scale*_model.__fit_scale*__xscale; + var _yscale = __scale_to_box_scale*_model.__fit_scale*__yscale; + + if ((_xscale == 1) && (_yscale == 1) && (__angle == 0)) + { + //Avoid using matrices if we can + var _l = _x - __origin_x + _bbox.left; + var _t = _y - __origin_y + _bbox.top; + var _r = _x - __origin_x + _bbox.right; + var _b = _y - __origin_y + _bbox.bottom; + + var _x0 = _l; var _y0 = _t; + var _x1 = _r; var _y1 = _t; + var _x2 = _l; var _y2 = _b; + var _x3 = _r; var _y3 = _b; + } + else + { + var _l = _bbox.left; + var _t = _bbox.top; + var _r = _bbox.right; + var _b = _bbox.bottom; + + var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _t, 0); var _x0 = _x + _vertex[0]; var _y0 = _y + _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _t, 0); var _x1 = _x + _vertex[0]; var _y1 = _y + _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _l, _b, 0); var _x2 = _x + _vertex[0]; var _y2 = _y + _vertex[1]; + var _vertex = matrix_transform_vertex(__bbox_matrix, _r, _b, 0); var _x3 = _x + _vertex[0]; var _y3 = _y + _vertex[1]; + + var _l = min(_x0, _x1, _x2, _x3); + var _t = min(_y0, _y1, _y2, _y3); + var _r = max(_x0, _x1, _x2, _x3); + var _b = max(_y0, _y1, _y2, _y3); + } + + return { + left: _l, + top: _t, + right: _r, + bottom: _b, + + width: 1 + _r - _l, + height: 1 + _b - _t, + + x0: _x0, y0: _y0, + x1: _x1, y1: _y1, + x2: _x2, y2: _y2, + x3: _x3, y3: _y3 + }; + } + #endregion @@ -893,7 +918,7 @@ function __scribble_class_element(_string, _unique_id) constructor static on_last_page = function() { - return (get_page() >= get_pages() - 1); + return (get_page() >= get_page_count() - 1); } #endregion @@ -980,7 +1005,19 @@ function __scribble_class_element(_string, _unique_id) constructor static animation_tick_speed = function() { - __scribble_error(".animation_tick_speed() has been removed\nPlease get in touch if this feature is essential for your project"); + __scribble_error(".animation_tick_speed() has been replaced by .animation_speed()"); + } + + static animation_speed = function(_speed) + { + __animation_speed = _speed; + + return self; + } + + static get_animation_speed = function() + { + return __animation_speed; } static animation_sync = function() @@ -1312,6 +1349,11 @@ function __scribble_class_element(_string, _unique_id) constructor colour_get_blue( __gradient_colour)/255, __gradient_alpha); + shader_set_uniform_f(global.__scribble_u_vFlash, colour_get_red( __flash_colour)/255, + colour_get_green(__flash_colour)/255, + colour_get_blue( __flash_colour)/255, + __flash_alpha); + shader_set_uniform_f(global.__scribble_u_vRegionActive, __region_glyph_start, __region_glyph_end); shader_set_uniform_f(global.__scribble_u_vRegionColour, colour_get_red( __region_colour)/255, @@ -1388,6 +1430,11 @@ function __scribble_class_element(_string, _unique_id) constructor colour_get_blue( __gradient_colour)/255, __gradient_alpha); + shader_set_uniform_f(global.__scribble_msdf_u_vFlash, colour_get_red( __flash_colour)/255, + colour_get_green(__flash_colour)/255, + colour_get_blue( __flash_colour)/255, + __flash_alpha); + shader_set_uniform_f(global.__scribble_msdf_u_vRegionActive, __region_glyph_start, __region_glyph_end); shader_set_uniform_f(global.__scribble_msdf_u_vRegionColour, colour_get_red( __region_colour)/255, diff --git a/scripts/__scribble_class_font/__scribble_class_font.gml b/scripts/__scribble_class_font/__scribble_class_font.gml index 33040c75c..f4b82b319 100644 --- a/scripts/__scribble_class_font/__scribble_class_font.gml +++ b/scripts/__scribble_class_font/__scribble_class_font.gml @@ -10,6 +10,8 @@ function __scribble_class_font(_name, _glyph_count, _msdf) constructor __glyph_data_grid = ds_grid_create(_glyph_count, SCRIBBLE_GLYPH.__SIZE); __glyphs_map = ds_map_create(); + __is_krutidev = false; + __msdf = _msdf; __msdf_pxrange = undefined; __superfont = false; diff --git a/scripts/__scribble_class_typist/__scribble_class_typist.gml b/scripts/__scribble_class_typist/__scribble_class_typist.gml index b111d0106..3f4d0a73b 100644 --- a/scripts/__scribble_class_typist/__scribble_class_typist.gml +++ b/scripts/__scribble_class_typist/__scribble_class_typist.gml @@ -293,12 +293,12 @@ function __scribble_class_typist() constructor var _pages_array = _model.__get_page_array(); if (array_length(_pages_array) <= __last_page) return 1.0; var _page_data = _pages_array[__last_page]; - var _min = 0; + var _max = _page_data.__character_count; + if (_max <= 0) return 1.0; - if (_max <= _min) return 1.0; + var _t = clamp((__window_array[__window_index] + max(0, __window_array[__window_index+1] + __smoothness - _max)) / (_max + __smoothness), 0, 1); - var _t = clamp((get_position() - _min) / (_max - _min), 0, 1); if (__in) { if (__delay_paused || (array_length(__event_stack) > 0)) diff --git a/scripts/__scribble_font_add_from_project/__scribble_font_add_from_project.gml b/scripts/__scribble_font_add_from_project/__scribble_font_add_from_project.gml index 97c3b7c7e..0e7f64da1 100644 --- a/scripts/__scribble_font_add_from_project/__scribble_font_add_from_project.gml +++ b/scripts/__scribble_font_add_from_project/__scribble_font_add_from_project.gml @@ -18,6 +18,22 @@ function __scribble_font_add_from_project(_font) global.__scribble_default_font = _name; } + //Check tags to see if this font is a Krutidev font + var _is_krutidev = false; + var _tagsArray = asset_get_tags(_font, asset_font); + var _i = 0; + repeat(array_length(_tagsArray)) + { + var _tag = _tagsArray[_i]; + if ((_tag == "scribble krutidev") || (_tag == "Scribble krutidev") || (_tag == "Scribble Krutidev")) + { + _is_krutidev = true; + break; + } + + ++_i; + } + var _global_glyph_bidi_map = global.__scribble_glyph_data.__bidi_map; //Get font info from the runtime @@ -68,12 +84,15 @@ function __scribble_font_add_from_project(_font) var _font_glyphs_map = _font_data.__glyphs_map; var _font_glyph_data_grid = _font_data.__glyph_data_grid; + if (_is_krutidev) _font_data.__is_krutidev = true; + var _i = 0; repeat(_size) { var _glyph_dict = _info_glyphs_array[_i]; - var _unicode = _glyph_dict.char; + var _unicode = _glyph_dict.char; + if (_is_krutidev && (_unicode != 0x20)) _unicode += __SCRIBBLE_DEVANAGARI_OFFSET; var _char = chr(_unicode); if ((_unicode >= 0x4E00) && (_unicode <= 0x9FFF)) //CJK Unified ideographs block @@ -86,8 +105,9 @@ function __scribble_font_add_from_project(_font) if (_bidi == undefined) _bidi = __SCRIBBLE_BIDI.L2R; } - var _x = _glyph_dict.x; - var _y = _glyph_dict.y; + //FIXME - Workaround for HTML5 in GMS2.3.7.606 and above + var _x = _glyph_dict[$ "x"]; + var _y = _glyph_dict[$ "y"]; var _w = _glyph_dict.w; var _h = _glyph_dict.h; diff --git a/scripts/__scribble_gen_2_parser/__scribble_gen_2_parser.gml b/scripts/__scribble_gen_2_parser/__scribble_gen_2_parser.gml index 1646e1217..3fb2d364e 100644 --- a/scripts/__scribble_gen_2_parser/__scribble_gen_2_parser.gml +++ b/scripts/__scribble_gen_2_parser/__scribble_gen_2_parser.gml @@ -6,6 +6,12 @@ +#macro __SCRIBBLE_PARSER_NEXT_GLYPH ++_glyph_count;\ + _glyph_prev = _glyph_write;\ + _glyph_prev_prev = _glyph_prev; + + + #macro __SCRIBBLE_PARSER_WRITE_NEWLINE _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE ] = 0x0A;\ //ASCII line break (dec = 10) _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.BIDI ] = __SCRIBBLE_BIDI.ISOLATED;\ _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.X ] = 0;\ @@ -38,15 +44,13 @@ ds_grid_set_grid_region(_glyph_grid, _font_glyph_data_grid, _data_index, SCRIBBLE_GLYPH.UNICODE, _data_index, SCRIBBLE_GLYPH.BILINEAR, _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE);\ _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _control_count;\ ;\ - ++_glyph_count;\ - ;\//We don't set _glyph_prev_arabic_join_next here, we do it further up - _glyph_prev = _glyph_write;\ - _glyph_prev_prev = _glyph_prev;\ + __SCRIBBLE_PARSER_NEXT_GLYPH\ } #macro __SCRIBBLE_PARSER_SET_FONT var _font_data = __scribble_get_font_data(_font_name);\ + if (_font_data.__is_krutidev) __has_devanagari = true;\ var _font_glyph_data_grid = _font_data.__glyph_data_grid;\ var _font_glyphs_map = _font_data.__glyphs_map;\ var _space_data_index = _font_glyphs_map[? 32];\ @@ -497,7 +501,29 @@ function __scribble_gen_2_parser() break; #endregion - + + #region Zero-width space emulation + + // [zwsp] + case 31: + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE ] = 0x200B; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.BIDI ] = __SCRIBBLE_BIDI.WHITESPACE; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.X ] = 0; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.Y ] = 0; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.WIDTH ] = 0; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.HEIGHT ] = _font_line_height; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.FONT_HEIGHT ] = _font_line_height; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.SEPARATION ] = 0; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _control_count; + + ++_glyph_count; + _glyph_prev_arabic_join_next = false; + _glyph_prev = 0x200B; + _glyph_prev_prev = _glyph_prev; + break; + + #endregion + #region Cycle // [cycle] @@ -1099,121 +1125,129 @@ function __scribble_gen_2_parser() } #endregion + + __SCRIBBLE_PARSER_WRITE_GLYPH } else { //Not an Arabic colour, this glyph definitely doesn't join backwards... _glyph_prev_arabic_join_next = false; - if ((_glyph_write >= 0x0E00) && (_glyph_write <= 0x0E7F)) + if ((_glyph_write >= 0x0900) && (_glyph_write <= 0x097F)) { - #region C90 Thai handling + //Devanagari is so complex it gets its own function + __has_devanagari = true; - __has_thai = true; + //Create a placeholder glyph entry + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE ] = _glyph_write; + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _control_count; - if (_thai_top_map[? _glyph_write] && (_glyph_count >= 1)) + __SCRIBBLE_PARSER_NEXT_GLYPH + } + else + { + if ((_glyph_write >= 0x0E00) && (_glyph_write <= 0x0E7F)) { - var _base = _glyph_prev; - if (_thai_lower_map[? _base] && (_glyph_count >= 2)) _base = _glyph_prev_prev; - - if (_thai_base_map[? _base]) + #region C90 Thai handling + + __has_thai = true; + + if (_thai_top_map[? _glyph_write] && (_glyph_count >= 1)) { - _glyph_next = __scribble_buffer_peek_unicode(_string_buffer, buffer_tell(_string_buffer)); - - var _followingNikhahit = ((_glyph_next == 0x0e33) || (_glyph_next == 0x0e4d)); - if (_thai_base_ascender_map[? _base]) + var _base = _glyph_prev; + if (_thai_lower_map[? _base] && (_glyph_count >= 2)) _base = _glyph_prev_prev; + + if (_thai_base_map[? _base]) { - if (_followingNikhahit) + _glyph_next = __scribble_buffer_peek_unicode(_string_buffer, buffer_tell(_string_buffer)); + + var _followingNikhahit = ((_glyph_next == 0x0e33) || (_glyph_next == 0x0e4d)); + if (_thai_base_ascender_map[? _base]) { - _glyph_write += 0xf713 - 0x0e48; - __SCRIBBLE_PARSER_WRITE_GLYPH; - - _glyph_write = 0xf711; - - if (_glyph_next == 0x0e33) + if (_followingNikhahit) { + _glyph_write += 0xf713 - 0x0e48; __SCRIBBLE_PARSER_WRITE_GLYPH; - _glyph_write = 0x0e32; - } - //Skip over the next glyph - buffer_seek(_string_buffer, buffer_seek_relative, 2); + _glyph_write = 0xf711; + + if (_glyph_next == 0x0e33) + { + __SCRIBBLE_PARSER_WRITE_GLYPH; + _glyph_write = 0x0e32; + } + + //Skip over the next glyph + buffer_seek(_string_buffer, buffer_seek_relative, 2); - //Fall through remaining code - _skip_write = true; + //Fall through remaining code + _skip_write = true; + } + else + { + _glyph_write += 0xf705 - 0x0e48; + + if ((_glyph_count >= 2) && _thai_upper_map[? _glyph_prev] && _thai_base_ascender_map[? _glyph_prev]) + { + _glyph_write += 0xf713 - 0x0e48; + } + } } - else + else if (!_followingNikhahit) { - _glyph_write += 0xf705 - 0x0e48; - + _glyph_write += 0xf70a - 0x0e48; + if ((_glyph_count >= 2) && _thai_upper_map[? _glyph_prev] && _thai_base_ascender_map[? _glyph_prev]) { _glyph_write += 0xf713 - 0x0e48; } } } - else if (!_followingNikhahit) - { - _glyph_write += 0xf70a - 0x0e48; - - if ((_glyph_count >= 2) && _thai_upper_map[? _glyph_prev] && _thai_base_ascender_map[? _glyph_prev]) - { - _glyph_write += 0xf713 - 0x0e48; - } - } } - } - else if (_thai_upper_map[? _glyph_write] && (_glyph_count > 0) && _thai_base_ascender_map[? _glyph_prev]) - { - switch(_glyph_write) + else if (_thai_upper_map[? _glyph_write] && (_glyph_count > 0) && _thai_base_ascender_map[? _glyph_prev]) { - case 0x0e31: _glyph_write = 0xf710; break; - case 0x0e34: _glyph_write = 0xf701; break; - case 0x0e35: _glyph_write = 0xf702; break; - case 0x0e36: _glyph_write = 0xf703; break; - case 0x0e37: _glyph_write = 0xf704; break; - case 0x0e4d: _glyph_write = 0xf711; break; - case 0x0e47: _glyph_write = 0xf712; break; + switch(_glyph_write) + { + case 0x0e31: _glyph_write = 0xf710; break; + case 0x0e34: _glyph_write = 0xf701; break; + case 0x0e35: _glyph_write = 0xf702; break; + case 0x0e36: _glyph_write = 0xf703; break; + case 0x0e37: _glyph_write = 0xf704; break; + case 0x0e4d: _glyph_write = 0xf711; break; + case 0x0e47: _glyph_write = 0xf712; break; + } } - } - else if (_thai_lower_map[? _glyph_write] && (_glyph_count > 0) && _thai_base_descender_map[? _glyph_prev]) - { - _glyph_write += 0xf718 - 0x0e38; - } - else - { - _glyph_next = __scribble_buffer_peek_unicode(_string_buffer, buffer_tell(_string_buffer)); - - if ((_glyph_write == 0x0e0d) && _thai_lower_map[? _glyph_next]) + else if (_thai_lower_map[? _glyph_write] && (_glyph_count > 0) && _thai_base_descender_map[? _glyph_prev]) { - _glyph_write = 0xf70f; + _glyph_write += 0xf718 - 0x0e38; } - else if ((_glyph_write == 0x0e10) && _thai_lower_map[? _glyph_next]) + else { - _glyph_write = 0xf700; + _glyph_next = __scribble_buffer_peek_unicode(_string_buffer, buffer_tell(_string_buffer)); + + if ((_glyph_write == 0x0e0d) && _thai_lower_map[? _glyph_next]) + { + _glyph_write = 0xf70f; + } + else if ((_glyph_write == 0x0e10) && _thai_lower_map[? _glyph_next]) + { + _glyph_write = 0xf700; + } } - } - #endregion - } - else if ((_glyph_write >= 0x0590) && (_glyph_write <= 0x05FF)) - { - //Hebrew handling is, mercifully, straight-forward beyond R2L directionality - __has_hebrew = true; - } - else if ((_glyph_write >= 0x0900) && (_glyph_write <= 0x097F)) - { - //Devanagari is so complex it gets its own function - __has_devanagari = true; + #endregion + } + else if ((_glyph_write >= 0x0590) && (_glyph_write <= 0x05FF)) + { + //Hebrew handling is, mercifully, straight-forward beyond R2L directionality + __has_hebrew = true; + } - //TODO - Follow the 16 unicode rules to reorder Devanagari for GSUB ligature substitution + //TODO - Ligature transform here + __SCRIBBLE_PARSER_WRITE_GLYPH } - - //TODO - Ligature transform here } - __SCRIBBLE_PARSER_WRITE_GLYPH; - if (_glyph_ord == SCRIBBLE_COMMAND_TAG_OPEN) _state_command_tag_flipflop = true; #endregion diff --git a/scripts/__scribble_gen_3_devanagari/__scribble_gen_3_devanagari.gml b/scripts/__scribble_gen_3_devanagari/__scribble_gen_3_devanagari.gml index e8fbde7a1..ea65a0887 100644 --- a/scripts/__scribble_gen_3_devanagari/__scribble_gen_3_devanagari.gml +++ b/scripts/__scribble_gen_3_devanagari/__scribble_gen_3_devanagari.gml @@ -1,6 +1,450 @@ +#region Build find-replace lookup table + +//TODO - Precalculate the lookup table +//TODO - Move this to __scribble_system_glyph_data() +var _unicode_source_array = [ + "‘", "’", "“", "”", "(", ")", "{", "}", "=", "।", "?", "-", "µ", "॰", ",", ".", + "०", "१", "२", "३", "४", "५", "६", "७", "८", "९", "x", + + "फ़्", "क़", "ख़", "ग़", "ज़्", "ज़", "ड़", "ढ़", "फ़", "य़", "ऱ", "ऩ", + "त्त्", "त्त", "क्त", "दृ", "कृ", + + "ह्न", "ह्य", "हृ", "ह्म", "ह्र", "ह्", "द्द", "क्ष्", "क्ष", "त्र्", "त्र","ज्ञ", + "छ्य", "ट्य", "ठ्य", "ड्य", "ढ्य", "द्य","द्व", + "श्र", "ट्र", "ड्र", "ढ्र", "छ्र", "क्र", "फ्र", "द्र", "प्र", "ग्र", "रु", "रू", + "्र", + + "ओ", "औ", "आ", "अ", "ई", "इ", "उ", "ऊ", "ऐ", "ए", "ऋ", + + "क्", "क", "क्क", "ख्", "ख", "ग्", "ग", "घ्", "घ", "ङ", + "चै", "च्", "च", "छ", "ज्", "ज", "झ्", "झ", "ञ", + + "ट्ट", "ट्ठ", "ट", "ठ", "ड्ड", "ड्ढ", "ड", "ढ", "ण्", "ण", + "त्", "त", "थ्", "थ", "द्ध", "द", "ध्", "ध", "न्", "न", + + "प्", "प", "फ्", "फ", "ब्", "ब", "भ्", "भ", "म्", "म", + "य्", "य", "र", "ल्", "ल", "ळ", "व्", "व", + "श्", "श", "ष्", "ष", "स्", "स", "ह", + + "ऑ", "ॉ", "ो", "ौ", "ा", "ी", "ु", "ू", "ृ", "े", "ै", + "ं", "ँ", "ः", "ॅ", "ऽ", chr(0x94D), //virama +]; + +var _krutidev_source_array = [ + "^", "*", "Þ", "ß", "¼", "½", "¿", "À", "¾", "A", "\\", "&", "&", "Œ", "]","-", + "å", "ƒ", "„", "…", "†", "‡", "ˆ", "‰", "Š", "‹","Û", + + "¶", "d", "[k", "x", "T", "t", "M+", "<+", "Q", ";", "j", "u", + "Ù", "Ùk", "Dr", "–", "—", + + "à", "á", "â", "ã", "ºz", "º", "í", "{", "{k", "«", "=","K", + "Nî", "Vî", "Bî", "Mî", "<î", "|","}", + "J", "Vª", "Mª", "<ªª", "Nª", "Ø", "Ý", "æ", "ç", "xz", "#", ":", + "z", + + "vks", "vkS", "vk", "v", "bZ", "b", "m", "Å", ",s", ",", "_", + + "D", "d", "ô", "[", "[k", "X", "x", "?", "?k", "³", + "pkS", "P", "p", "N", "T", "t", "÷", ">", "¥", + + "ê", "ë", "V", "B", "ì", "ï", "M", "<", ".", ".k", + "R", "r", "F", "Fk", ")", "n", "/", "/k", "U", "u", + + "I", "i", "¶", "Q", "C", "c", "H", "Hk", "E", "e", + "¸", ";", "j", "Y", "y", "G", "O", "o", + "'", "'k", "\"", "\"k", "L", "l", "g", + + "v‚", "‚", "ks", "kS", "k", "h", "q", "w", "`", "s", "S", + "a", "¡", "%", "W", "·", "~", +]; + +//Use a ds_map rather than a struct since our keys will be integers +global.__scribble_krutidev_lookup_map = ds_map_create(); + +var _i = 0; +repeat(array_length(_unicode_source_array)) +{ + var _string = _unicode_source_array[_i]; + + var _searchInteger = 0; + var _j = string_length(_string); + repeat(_j) + { + _searchInteger = (_searchInteger << 16) | ord(string_char_at(_string, _j)); + --_j; + } + + var _string = _krutidev_source_array[_i]; + var _writeArray = []; + var _j = 1; + repeat(string_length(_string)) + { + array_push(_writeArray, ord(string_char_at(_string, _j))); + ++_j; + } + + global.__scribble_krutidev_lookup_map[? _searchInteger] = _writeArray; + + ++_i; +} + +#endregion + + + +#region Build matra lookup table + +//Use a ds_map rather than a struct since our keys are integers +//TODO - Convert these to hex and add comments +global.__scribble_krutidev_matra_lookup_map = ds_map_create(); +global.__scribble_krutidev_matra_lookup_map[? 58] = true; +global.__scribble_krutidev_matra_lookup_map[? 2305] = true; +global.__scribble_krutidev_matra_lookup_map[? 2306] = true; +global.__scribble_krutidev_matra_lookup_map[? 2366] = true; +global.__scribble_krutidev_matra_lookup_map[? 2367] = true; +global.__scribble_krutidev_matra_lookup_map[? 2368] = true; +global.__scribble_krutidev_matra_lookup_map[? 2369] = true; +global.__scribble_krutidev_matra_lookup_map[? 2370] = true; +global.__scribble_krutidev_matra_lookup_map[? 2371] = true; +global.__scribble_krutidev_matra_lookup_map[? 2373] = true; +global.__scribble_krutidev_matra_lookup_map[? 2375] = true; +global.__scribble_krutidev_matra_lookup_map[? 2376] = true; +global.__scribble_krutidev_matra_lookup_map[? 2379] = true; +global.__scribble_krutidev_matra_lookup_map[? 2380] = true; + +#endregion + + + +#macro __SCRIBBLE_PARSER_INSERT_NUKTA ds_grid_set_grid_region(_temp_grid, _glyph_grid, _i+1, 0, _glyph_count+3, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, 0);\ + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _glyph_count+3 - _i, __SCRIBBLE_GEN_GLYPH.__SIZE, _i+2, 0);\ + ;\ + ++_i;\ + ++_glyph_count;\ + ;\ + _glyph_grid[# _i+1, __SCRIBBLE_GEN_GLYPH.UNICODE ] = 0x093C;\ //Nukta + _glyph_grid[# _i+1, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT]; + + function __scribble_gen_3_devanagari() { + return; + + /* + //Avoid this mess if we can if (!__has_devanagari) exit; - //TODO lol + var _glyph_grid = global.__scribble_glyph_grid; + var _temp_grid = global.__scribble_temp2_grid; + var _glyph_count = global.__scribble_generator_state.__glyph_count; + + //Glyph count includes the terminating null. We don't need that for Krutidev conversion + --_glyph_count; + + //Pad the end because we'll need to read beyond the end of the string during the final find-replace + //We pad with 0xFFFF to avoid accidentally making incorrect substring matches later + _glyph_grid[# _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE] = 0xFFFF; + _glyph_grid[# _glyph_count+1, __SCRIBBLE_GEN_GLYPH.UNICODE] = 0xFFFF; + _glyph_grid[# _glyph_count+2, __SCRIBBLE_GEN_GLYPH.UNICODE] = 0xFFFF; + _glyph_grid[# _glyph_count+3, __SCRIBBLE_GEN_GLYPH.UNICODE] = 0xFFFF; + + + + #region Transform quotes and split up nukta ligatures + + var _in_single_quote = false; + var _in_double_quote = false; + var _i = 0; + repeat(_glyph_count) + { + switch(_glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE]) + { + //Set up alternating single quote marks + case ord("'"): + _in_single_quote = !_in_single_quote; + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = _in_single_quote? ord("^") : ord("*"); + break; + + //Set up alternating double quote marks + case ord("\""): + _in_double_quote = !_in_double_quote; + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = _in_double_quote? ord("ß") : ord("Þ"); + break; + + //Split up nukta ligatures into their componant parts + //TODO - Convert to hex and add comments + case ord("ऩ"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("न"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ऱ"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("र"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("क़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("क"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ख़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("ख"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ग़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("ग"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ज़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("ज"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ड़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("ड"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("ढ़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("ढ"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("फ़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("फ"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + + case ord("य़"): + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = ord("य"); + __SCRIBBLE_PARSER_INSERT_NUKTA + break; + } + + ++_i; + } + + #endregion + + + + #region Reposition ि to the front of the word and replace it with an "f" + + //TODO - Log where ि is found during the nukta ligature sweep + var _i = 1; //Start at the second char because we don't care if the string starts with 0x093F (Vowel Sign I) + repeat(_glyph_count-1) + { + var _char = _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE]; + if (_char == ord("ि")) + { + //If we find a virama behind us keep tracking backwards + //We go two indexes backwards because virama (should) always follows another character + var _j = _i - 1; + while((_j >= 0) && (_glyph_grid[# _j, __SCRIBBLE_GEN_GLYPH.UNICODE] == 0x094D)) _j -= 2; + + //Copy everything from the start of the subtring (where ि will go) to the end (which is where ि currently is) + ds_grid_set_grid_region(_temp_grid, _glyph_grid, _j, 0, _i-1, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, 0); + //Then copy that back into the glyph grid, but one character forwards + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _i-1 - _j, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, _j+1); + + //Insert ि (encoded in Krutidev as f) into its new position + _glyph_grid[# _j, __SCRIBBLE_GEN_GLYPH.UNICODE ] = ord("f"); + _glyph_grid[# _j, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _glyph_grid[# _j+1, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT]; + } + + ++_i; + } + + #endregion + + + + #region Move र् (ra + virama) after matras + + var _matraLookupMap = global.__scribble_krutidev_matra_lookup_map; + + //Using a for-loop here as _glyph_count may change + for(var _i = 0; _i < _glyph_count; ++_i) + { + //TODO - Log where ra-virama is found during the nukta ligature sweep + if ((_glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] == ord("र")) && (_glyph_grid[# _i+1, __SCRIBBLE_GEN_GLYPH.UNICODE] == 0x094D)) //Ra followed by virama + { + var _newPosition = _i + 3; + + //If the character after the probable position for ra+virama is a matra, keep searching right + var _charRight = _glyph_grid[# _newPosition, __SCRIBBLE_GEN_GLYPH.UNICODE]; + while(ds_map_exists(_matraLookupMap, _charRight)) + { + _newPosition++; + _charRight = _glyph_grid[# _newPosition, __SCRIBBLE_GEN_GLYPH.UNICODE]; + } + + //Copy everything after the ra-virama position into the temp buffer + //We're going to copy that back into the glyph grid in two stages + ds_grid_set_grid_region(_temp_grid, _glyph_grid, _i+2, 0, _glyph_count, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, 0); + + //First copy: Move the gylphs between the old position and the new position back two slots + // This effective deletes the old ra+virama position + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _newPosition - (_i+2), __SCRIBBLE_GEN_GLYPH.__SIZE, _i, 0); + + //Insert the new ra+virama combined character. Krutidev handles this as a single glyph (encoded as Z) + _glyph_grid[# _newPosition, __SCRIBBLE_GEN_GLYPH.UNICODE ] = ord("Z"); + _glyph_grid[# _newPosition, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _glyph_grid[# _newPosition-1, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT]; + + //Second copy: Place the remainder of the glyphs after ra+virama + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _glyph_count - (_newPosition - (_i + 2)), __SCRIBBLE_GEN_GLYPH.__SIZE, _newPosition+1, 0); + + //Overall this reduces the total number of glyphs by one since we're replace ra + virama with a single Z + --_glyph_count; + } + } + + #endregion + + + + #region Perform bulk find-replace + + var _lookupMap = global.__scribble_krutidev_lookup_map; + + //Create a 64-bit minibuffer + //Fortunately all the characters we're looking for fit into 16 bits and we only need to look for 4 at a time + var _oneChar = 0x0000; + var _twoChar = ((_glyph_grid[# 0, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 16); + var _threeChar = _twoChar | ((_glyph_grid[# 1, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 32); + var _fourChar = _threeChar | ((_glyph_grid[# 2, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 48); + + //Using a for-loop here as _glyph_count may change + for(var _i = 0; _i < _glyph_count; ++_i;) + { + _oneChar = _twoChar >> 16; + _twoChar = _threeChar >> 16; + _threeChar = _fourChar >> 16; + _fourChar = _threeChar | ((_glyph_grid[# _i+3, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 48); + + //Try to find a matching substring + var _foundLength = 4; + var _replacementArray = _lookupMap[? _fourChar]; + + if (_replacementArray == undefined) + { + _foundLength = 3; + _replacementArray = _lookupMap[? _threeChar]; + + if (_replacementArray == undefined) + { + _foundLength = 2; + _replacementArray = _lookupMap[? _twoChar]; + + if (_replacementArray == undefined) + { + _foundLength = 1; + _replacementArray = _lookupMap[? _oneChar]; + } + } + } + + //Perform a character replacement if we found any matching substring + if (_replacementArray != undefined) + { + var _replacementLength = array_length(_replacementArray); + + if ((_foundLength == 1) && (_replacementLength == 1)) + { + //Shortcut for the most common replacement operation + _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE] = _replacementArray[0]; + } + else + { + //Heavyweight general replacement code... we want to avoid as many delete/insert commands as + //possible as it causes lots of reallocation in the background + + //Copy over as much data as possible from one array + var _copyCount = min(_foundLength, _replacementLength); + + var _j = 0; + repeat(_copyCount) + { + _glyph_grid[# _i + _j, __SCRIBBLE_GEN_GLYPH.UNICODE] = _replacementArray[_j]; + ++_j; + } + + if (_foundLength > _replacementLength) + { + //If we're replacing with fewer characters than we found then we need to delete some characters + var _copyStart = _i + _copyCount + _foundLength - _replacementLength; + var _copyLength = _glyph_count - _copyStart; + + ds_grid_set_grid_region(_temp_grid, _glyph_grid, _copyStart, 0, _glyph_count, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, 0); + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _copyLength, __SCRIBBLE_GEN_GLYPH.__SIZE, _i + _copyCount, 0); + } + else + { + //Otherwise, we're adding characters to the array so we have to insert some characters + //This code presumes we're only adding 1 character + var _insertPos = _i + _copyCount; + ds_grid_set_grid_region(_temp_grid, _glyph_grid, _insertPos, 0, _glyph_count, __SCRIBBLE_GEN_GLYPH.__SIZE, 0, 0); + ds_grid_set_grid_region(_glyph_grid, _temp_grid, 0, 0, _glyph_count - _insertPos, __SCRIBBLE_GEN_GLYPH.__SIZE, _insertPos+1, 0); + + _glyph_grid[# _insertPos, __SCRIBBLE_GEN_GLYPH.UNICODE ] = _replacementArray[_copyCount]; + _glyph_grid[# _insertPos, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT] = _glyph_grid[# _insertPos-1, __SCRIBBLE_GEN_GLYPH.CONTROL_COUNT]; + + //Throw an error if we're trying to add more than one character + //I don't think this ever comes up but it might in the future + if (_replacementLength - _foundLength > 1) + { + __scribble_error("Devanagari substring insertion length > 1. Please report this error"); + } + } + + _i += _replacementLength - 1; //Off-by-one to account for ++_i in the for-loop + _glyph_count += _replacementLength - _foundLength; + + //Recalculate our minibuffer since we've messed around with the array a lot + _twoChar = ((_glyph_grid[# _i+1, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 16); + _threeChar = _twoChar | ((_glyph_grid[# _i+2, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 32); + _fourChar = _threeChar | ((_glyph_grid[# _i+3, __SCRIBBLE_GEN_GLYPH.UNICODE] & 0xFFFF) << 48); + } + } + } + + #endregion + + + + #region Copy data across for all the Krutidev characters we've just inserted + + //FIXME + var _font_glyphs_map = undefined; + var _font_name = "?"; + var _font_glyph_data_grid = undefined; + + var _i = 0; + repeat(_glyph_count) + { + var _glyph_write = _glyph_grid[# _i, __SCRIBBLE_GEN_GLYPH.UNICODE]; + + //Pull info out of the font's data structures + var _data_index = _font_glyphs_map[? _glyph_write]; + //If our glyph is missing, choose the missing character glyph instead! + if (_data_index == undefined) _data_index = _font_glyphs_map[? ord(SCRIBBLE_MISSING_CHARACTER)]; + if (_data_index == undefined) + { + //This should only happen if SCRIBBLE_MISSING_CHARACTER is missing for a font + __scribble_trace("Couldn't find glyph data for character code " + string(_glyph_write) + " (" + chr(_glyph_write) + ") in font \"" + string(_font_name) + "\""); + } + else + { + //Add this glyph to our grid by copying from the font's own glyph data grid + ds_grid_set_grid_region(_glyph_grid, _font_glyph_data_grid, _data_index, SCRIBBLE_GLYPH.UNICODE, _data_index, SCRIBBLE_GLYPH.BILINEAR, _glyph_count, __SCRIBBLE_GEN_GLYPH.UNICODE); + } + + ++_i; + } + + #endregion + */ } \ No newline at end of file diff --git a/scripts/__scribble_gen_9_write_vbuffs/__scribble_gen_9_write_vbuffs.gml b/scripts/__scribble_gen_9_write_vbuffs/__scribble_gen_9_write_vbuffs.gml index 03ac30c20..73995029b 100644 --- a/scripts/__scribble_gen_9_write_vbuffs/__scribble_gen_9_write_vbuffs.gml +++ b/scripts/__scribble_gen_9_write_vbuffs/__scribble_gen_9_write_vbuffs.gml @@ -457,6 +457,10 @@ function __scribble_gen_9_write_vbuffs() _control_index++; } + //Ensure that the model thinks it is using at least one of the font types + //This ensures typists still process even if there's no drawable text + if (!__uses_standard_font && !__uses_msdf_font) __uses_standard_font = true; + //Ensure we've ended the vertex buffers we created __finalize_vertex_buffers(_element.__freeze); } \ No newline at end of file diff --git a/scripts/__scribble_system/__scribble_system.gml b/scripts/__scribble_system/__scribble_system.gml index 27a038910..c5c8b44a8 100644 --- a/scripts/__scribble_system/__scribble_system.gml +++ b/scripts/__scribble_system/__scribble_system.gml @@ -1,6 +1,6 @@ // @jujuadams -#macro __SCRIBBLE_VERSION "8.0.1 beta 7" -#macro __SCRIBBLE_DATE "2022-02-10" +#macro __SCRIBBLE_VERSION "8.0.1 beta 8" +#macro __SCRIBBLE_DATE "2022-03-03" #macro __SCRIBBLE_DEBUG false #macro __SCRIBBLE_VERBOSE_GC false #macro SCRIBBLE_LOAD_FONTS_ON_BOOT true @@ -82,7 +82,8 @@ global.__scribble_control_grid = ds_grid_create(1000, __SCRIBBLE_GEN_CON global.__scribble_word_grid = ds_grid_create(1000, __SCRIBBLE_GEN_WORD.__SIZE); global.__scribble_line_grid = ds_grid_create(__SCRIBBLE_MAX_LINES, __SCRIBBLE_GEN_LINE.__SIZE); global.__scribble_stretch_grid = ds_grid_create(1000, __SCRIBBLE_GEN_STRETCH.__SIZE); -global.__scribble_temp_grid = ds_grid_create(1000, __SCRIBBLE_GEN_WORD.__SIZE); //Somewhat arbitrary size. Feel free to increase this size as is needed +global.__scribble_temp_grid = ds_grid_create(1000, __SCRIBBLE_GEN_WORD.__SIZE); //For some reason, changing the width of this grid causes GM to crash +global.__scribble_temp2_grid = ds_grid_create(1000, __SCRIBBLE_GEN_GLYPH.__SIZE); global.__scribble_vbuff_pos_grid = ds_grid_create(1000, __SCRIBBLE_GEN_VBUFF_POS.__SIZE); //global.__scribble_window_array_null = array_create(2*__SCRIBBLE_WINDOW_COUNT, 1.0); //TODO - Do we still need this? @@ -159,6 +160,7 @@ _map[? "bi" ] = 27; _map[? "surface" ] = 28; _map[? "region" ] = 29; _map[? "/region" ] = 30; +_map[? "zwsp" ] = 31; global.__scribble_command_tag_lookup_accelerator = _map; //Add bindings for default effect names @@ -224,6 +226,7 @@ global.__scribble_passthrough_vertex_format = vertex_format_end(); global.__scribble_u_fTime = shader_get_uniform(__shd_scribble, "u_fTime" ); global.__scribble_u_vColourBlend = shader_get_uniform(__shd_scribble, "u_vColourBlend" ); global.__scribble_u_vGradient = shader_get_uniform(__shd_scribble, "u_vGradient" ); +global.__scribble_u_vFlash = shader_get_uniform(__shd_scribble, "u_vFlash" ); global.__scribble_u_vRegionActive = shader_get_uniform(__shd_scribble, "u_vRegionActive" ); global.__scribble_u_vRegionColour = shader_get_uniform(__shd_scribble, "u_vRegionColour" ); global.__scribble_u_aDataFields = shader_get_uniform(__shd_scribble, "u_aDataFields" ); @@ -241,6 +244,7 @@ global.__scribble_u_fTypewriterAlphaDuration = shader_get_uniform(__shd_scribble global.__scribble_msdf_u_fTime = shader_get_uniform(__shd_scribble_msdf, "u_fTime" ); global.__scribble_msdf_u_vColourBlend = shader_get_uniform(__shd_scribble_msdf, "u_vColourBlend" ); global.__scribble_msdf_u_vGradient = shader_get_uniform(__shd_scribble_msdf, "u_vGradient" ); +global.__scribble_msdf_u_vFlash = shader_get_uniform(__shd_scribble_msdf, "u_vFlash" ); global.__scribble_msdf_u_vRegionActive = shader_get_uniform(__shd_scribble_msdf, "u_vRegionActive" ); global.__scribble_msdf_u_vRegionColour = shader_get_uniform(__shd_scribble_msdf, "u_vRegionColour" ); global.__scribble_msdf_u_aDataFields = shader_get_uniform(__shd_scribble_msdf, "u_aDataFields" ); @@ -737,7 +741,7 @@ enum __SCRIBBLE_GEN_GLYPH IMAGE_INDEX, //20 | Only used for sprites IMAGE_SPEED, //21 / - __SIZE, //20 + __SIZE, //22 } enum __SCRIBBLE_GEN_VBUFF_POS @@ -822,6 +826,8 @@ enum __SCRIBBLE_GEN_LINE #macro __SCRIBBLE_CACHE_TIMEOUT 120 //How long to wait (in milliseconds) before the text element cache automatically cleans up unused data #macro __SCRIBBLE_AUDIO_COMMAND_TAG "__scribble_audio_playback__" +#macro __SCRIBBLE_DEVANAGARI_OFFSET 0xFFFF + #macro __SCRIBBLE_MAX_LINES 1000 //Maximum number of lines in a textbox. This constant must match the corresponding values in __shd_scribble and __shd_scribble_msdf #endregion \ No newline at end of file diff --git a/scripts/draw_text_scribble/draw_text_scribble.gml b/scripts/draw_text_scribble/draw_text_scribble.gml index 0b2b0b43c..d517446d1 100644 --- a/scripts/draw_text_scribble/draw_text_scribble.gml +++ b/scripts/draw_text_scribble/draw_text_scribble.gml @@ -18,7 +18,7 @@ function draw_text_scribble(_x, _y, _string, _reveal = undefined) { var _font = draw_get_font(); - _font = !font_exists(_font)? "scribble_fallback_font" : font_get_name(_font); + _font = !font_exists(_font)? global.__scribble_default_font : font_get_name(_font); var _element = scribble(_string) .align(draw_get_halign(), draw_get_valign()) diff --git a/scripts/draw_text_scribble_ext/draw_text_scribble_ext.gml b/scripts/draw_text_scribble_ext/draw_text_scribble_ext.gml index 4977ad1cb..f6acbb6e6 100644 --- a/scripts/draw_text_scribble_ext/draw_text_scribble_ext.gml +++ b/scripts/draw_text_scribble_ext/draw_text_scribble_ext.gml @@ -19,7 +19,7 @@ function draw_text_scribble_ext(_x, _y, _string, _width, _reveal = undefined) { var _font = draw_get_font(); - _font = !font_exists(_font)? "scribble_fallback_font" : font_get_name(_font); + _font = !font_exists(_font)? global.__scribble_default_font : font_get_name(_font); var _element = scribble(_string) .align(draw_get_halign(), draw_get_valign()) diff --git a/shaders/__shd_scribble/__shd_scribble.fsh b/shaders/__shd_scribble/__shd_scribble.fsh index b67c14db8..363ab2085 100644 --- a/shaders/__shd_scribble/__shd_scribble.fsh +++ b/shaders/__shd_scribble/__shd_scribble.fsh @@ -6,9 +6,12 @@ precision highp float; varying vec2 v_vTexcoord; varying vec4 v_vColour; +uniform vec4 u_vFlash; + void main() { gl_FragColor = v_vColour*texture2D(gm_BaseTexture, v_vTexcoord); + gl_FragColor.rgb = mix(gl_FragColor.rgb, u_vFlash.rgb, u_vFlash.a); if (PREMULTIPLY_ALPHA) { diff --git a/shaders/__shd_scribble/__shd_scribble.vsh b/shaders/__shd_scribble/__shd_scribble.vsh index fdc42d1a5..a6c6e5c46 100644 --- a/shaders/__shd_scribble/__shd_scribble.vsh +++ b/shaders/__shd_scribble/__shd_scribble.vsh @@ -460,10 +460,7 @@ void main() if ((BLINK_FLAG > 0.5) && (u_fBlinkState < 0.5)) v_vColour.a = 0.0; //Regions - if ((characterIndex >= u_vRegionActive.x) && (characterIndex <= u_vRegionActive.y)) - { - v_vColour.rgb = mix(v_vColour.rgb, u_vRegionColour.rgb, u_vRegionColour.a); - } + if ((characterIndex >= u_vRegionActive.x) && (characterIndex <= u_vRegionActive.y)) v_vColour.rgb = mix(v_vColour.rgb, u_vRegionColour.rgb, u_vRegionColour.a); diff --git a/shaders/__shd_scribble_msdf/__shd_scribble_msdf.fsh b/shaders/__shd_scribble_msdf/__shd_scribble_msdf.fsh index 99a65905a..f2cb98f86 100644 --- a/shaders/__shd_scribble_msdf/__shd_scribble_msdf.fsh +++ b/shaders/__shd_scribble_msdf/__shd_scribble_msdf.fsh @@ -18,6 +18,7 @@ uniform vec3 u_vShadowOffsetAndSoftness; uniform vec3 u_vBorderColour; uniform float u_fBorderThickness; uniform float u_fSecondDraw; +uniform vec4 u_vFlash; float median(vec3 v) { @@ -70,6 +71,8 @@ void main() } } + gl_FragColor.rgb = mix(gl_FragColor.rgb, u_vFlash.rgb, u_vFlash.a); + if (PREMULTIPLY_ALPHA) { gl_FragColor.rgb *= v_vColour.a; diff --git a/shaders/__shd_scribble_msdf/__shd_scribble_msdf.vsh b/shaders/__shd_scribble_msdf/__shd_scribble_msdf.vsh index cf537e35d..f2454870a 100644 --- a/shaders/__shd_scribble_msdf/__shd_scribble_msdf.vsh +++ b/shaders/__shd_scribble_msdf/__shd_scribble_msdf.vsh @@ -475,13 +475,8 @@ void main() if (SPRITE_FLAG > 0.5) v_vColour.a *= filterSprite(in_Normal.y); //Use packed sprite data to filter out sprite frames that we don't want if ((BLINK_FLAG > 0.5) && (u_fBlinkState < 0.5)) v_vColour.a = 0.0; - - //Regions - if ((characterIndex >= u_vRegionActive.x) && (characterIndex <= u_vRegionActive.y)) - { - v_vColour.rgb = mix(v_vColour.rgb, u_vRegionColour.rgb, u_vRegionColour.a); - } + if ((characterIndex >= u_vRegionActive.x) && (characterIndex <= u_vRegionActive.y)) v_vColour.rgb = mix(v_vColour.rgb, u_vRegionColour.rgb, u_vRegionColour.a); diff --git a/sprites/spr_coin/spr_coin.yy b/sprites/spr_coin/spr_coin.yy index 68539eceb..f68ebc522 100644 --- a/sprites/spr_coin/spr_coin.yy +++ b/sprites/spr_coin/spr_coin.yy @@ -54,7 +54,7 @@ {"id":"dd4c964e-f48c-462a-8b76-26290c93a4c5","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"afebdf59-d1cb-407e-9399-c5ba9ecd658f","path":"sprites/spr_coin/spr_coin.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe