Add a way to specify ligatures for Bitmap fonts #8001
JustCozzie
started this conversation in
GUI
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the project you are working on:
GBC style pixel-perfect RPG
Describe the problem or limitation you are having in your project:


characters that would traditionally be combined in fixed width fonts (such as 's or 'd) instead take up two full character widths and it is not possible to use different open/close speech marks. At a low render resolution space for text is very limited (typically half of the above example) so with this limitation it becomes more difficult to fit text and often results in uneven spacing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Ligatures for Bitmap fonts would allow the user to specify sequences that should be combined into a chosen character. This allows for space to be saved, helping prevent text from overflowing available space. It could also be used to create special rules such as:
that would currently only be possible by pre-processing all text to replace instances of those combinations occurring with an unused ASCII code - creating friction between writing and implementation.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

The import editor currently specifies character type based on a string array, with each character being indexed from the top left and assigned to an ASCII code. This process already supports ranges using a hyphen ('a'-'z'), in my proposal it would also support using a + ('X'+'P') to define that this one character is assigned to that combination and order of ASCII codes.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
While I think it would see good use by the portion of people developing pixel/retro style games, it would also not take any effort to work around. Those who find it unnecessary would simply not specify any ligatures in the font importer.
Is there a reason why this should be core and not an add-on in the asset library?:
The Bitmap font system already requires outside resources to use efficiently (ASCII mapper/BMFont) so I think adding to that would be a bad idea. Probably more practically it seems too small in scope to get an addon, as the ones available favour large reworks/overhauls.
Beta Was this translation helpful? Give feedback.
All reactions