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

Character render width for 0 and the symbols causes overflow of a 0.13" cell when using in LibreOffice 6 Calc at 12pt #2

Open
nolteb opened this issue Jan 11, 2022 · 0 comments

Comments

@nolteb
Copy link

nolteb commented Jan 11, 2022

LibreOffice 6 font kerning and width-calculation algorithm renders font width of some characters inaccurately. This becomes especially apparent when creating cells 0.13" wide per the original spec for MICR, each of which contain one character using the GNU font at 12pt. In this scenario, the zero and some of the control characters (from a, b, c, d) cause an overflow symbol to appear in the cell and obstruct its contents. 1 - 9 are all seemingly unaffected.

It's probably due to subpixel rendering or some such nonsense.

I have not tested if LibreOffice 7 resolves the problem, itself supporting several kerning options. I have a pull request fixing this for the affected numeric character, zero ("0"). This was achieved by making the upper-case letter "O" the same symbol as zero (as it renders individually, when aligned-right to the cell boundary) but with less spacing on the left and an narrower character width, overall (so as not to trigger the overflow).

Here is the requisite pull request of the change for zero and I am going to do more testing and then upload similar fixes and tweaks for the other affected characters:

#1

This is mostly here to document the issue in case anyone else encounters it and the preceding wordiness and so on is to guide people to this explanation upon searching for the requisite keywords.

Good luck!

-Nolte

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

1 participant