Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying diacritical marks in macOS #4417

Open
Catalyst-42 opened this issue Apr 12, 2024 · 1 comment
Open

Displaying diacritical marks in macOS #4417

Catalyst-42 opened this issue Apr 12, 2024 · 1 comment
Assignees
Labels

Comments

@Catalyst-42
Copy link

The problem

macOS has one strange feature when creating files. If you create files with Russian characters "ё" and "й" from the system, these characters are written as characters with diacritical marks. When displayed in Aseprite, the diacritical character cannot be displayed, forcing the entire block of text to use an antialiased font for replacement.

As a quick solution, I drew these diacritics (Unicode U+0308 ̈ COMBINING DIAERESIS and Unicode ̆ COMBINING BREVE) onto the font so that the text doesn't break instead, but just displays one extra pixel for the text.

new aseprite_font changed glyphs only
aseprite_font changed_glyphs_only

Changed symbols located at (x, y): (67, 507) and (89, 507)

Example:
example

I can also notice that when typing text inside the application, the characters are printed normally, without diacritical marks

The better solution

A better solution would be some mechanism that allows diacritics to be displayed on symbol and not after them by defining a negative glyph width. Alternatively, since all diacritics would appear as one or zero pixels on the font, a mechanism could be made that would simply skip displaying such characters without causing the smooth font to be displayed. Then it would be helpful to see a way to make the glyph image with 0 pixels wide so that it just doesn't show up and doesn't affect the text in any way. For now, in the edited font, I'm using the minimum allowable width of 1 pixel.

And here also a copyable examples of this symbols:
Diacritics: ё, й
Normal: ё, й

Aseprite and System version

  • Aseprite version: Steam Aseprite 1.3.6 (arm and intel both)
  • System: macOS Monterey and newer
@dacap dacap self-assigned this Apr 12, 2024
@dacap dacap added the i18n label Apr 12, 2024
@dacap
Copy link
Member

dacap commented Apr 12, 2024

Hi @Catalyst-42 thanks for reporting. The rendering issue is a known issue with our sprite sheet/bitmap fonts format. Didn't know that macOS does an Unicode NFD (Normalization Form Canonical Decomposition) when saving files.

I'm not sure if there is a bitmap font format that supports combining chars, but if it does, we should adopt that format.

Mean while I'll add the proposed fixes in the font 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants