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

Discussion: proper text shaping & layout for consoles or character grids #11

Open
be5invis opened this issue Apr 4, 2019 · 5 comments

Comments

@be5invis
Copy link

be5invis commented Apr 4, 2019

This is a discussion thread about how to properly support complex script in a console or a character grid.

Cases may get involved:
image

@mhosken
Copy link
Collaborator

mhosken commented Apr 4, 2019

I agree that it would be good to have a table of monowidths for characters. I can imagine values from -1 (or even -2) to 2 (or more?) Where negative means the character inserts before other characters and 0 for traditional diacritics. Characters like U+1000 would have width 2 and so on. BTW The example myanmar cluster is not real (thankfully). The width of a cluster should be the same as the sum of the absolute widths of the characters in it.

On further (edited) thought, the negative value is for characters that add width to an existing cluster. So in effect we are also specifying a clustering algorithm at the same time. If the value is > 0 then it is a new cluster. If it is <=0 then it is part of an existing cluster.

Clearly a font would have to be trusted to fit within the space specified.

@be5invis
Copy link
Author

be5invis commented Apr 4, 2019

@mhosken
From my personal view, text layout on consoles is more like a weird case of justification.
Also, most fonts for east asian / complex script are not monospace, even if they are, they may not share the width of the Latin fonts. For example, CJK fonts use width 1 EM for all EA glyphs, but Latin monospaces fonts are often wider than 1/2 EM, which means that if we fit one EA character into two Latin cells, we need to insert extra space around it.

@mhosken
Copy link
Collaborator

mhosken commented Apr 4, 2019 via email

@stone-zeng
Copy link

I think math can also be considered as a kind of complex script and there is actually such demand to support monospaced math font.

@davelab6
Copy link

cc @raphlinus

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

No branches or pull requests

4 participants