Skip to content

Consistent spacing for monospace font #4932

Answered by jerch
JesseCSlater asked this question in Q&A
Discussion options

You must be logged in to vote

Ideally, I would like to ensure that every character is exactly 8x16px, and that they tile without gaps.

Imho thats not easily possible across different browsers and devices. Main reasons - the devices may have different DPR, OS may provide different monospace fonts and last but not least the font renderer may scale fonts differently on different devices for better legibility. The latter point is also the reason why forcing things into a fixed scheme might lead to poor output quality on certain device types while it looks perfect on others.
xterm.js goes the other way around - it takes the selected font and measures its "natural" output appearance done by the font renderer to derive its…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TylerBloom
Comment options

@jerch
Comment options

Answer selected by JesseCSlater
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants