Skip to content

Update ter-u12n.bdf#5078

Merged
jepler merged 2 commits into
adafruit:mainfrom
rpavlik:patch-1
Aug 16, 2021
Merged

Update ter-u12n.bdf#5078
jepler merged 2 commits into
adafruit:mainfrom
rpavlik:patch-1

Conversation

@rpavlik
Copy link
Copy Markdown

@rpavlik rpavlik commented Jul 30, 2021

Remove duplicate ENDCHAR that made it invalid. Was trying to get » on my MacroPad screen, and a BDF viewer says it should be in the font, but the bdf2pcf thing said error on 6450 where that dupe was. (Now it says "Error on line 25220: more characters than specified" but I don't have a fix for that yet.)

Remove duplicate ENDCHAR that made it invalid
ladyada
ladyada previously approved these changes Jul 30, 2021
@rpavlik
Copy link
Copy Markdown
Author

rpavlik commented Jul 30, 2021

Actually you can remove the last character to get it to go through bdf2pcf. Not sure why it needs that though. (and the PCF is bigger? That was unexpected.)

@tannewt
Copy link
Copy Markdown
Member

tannewt commented Aug 2, 2021

Do we still need this? CircuitPython only includes characters in the error messages in order to minimize memory impact.

Copy link
Copy Markdown

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! These irregularities in the bdf file apparently don't bother the tools we use to build CircuitPython, but it would still be nice if this was a valid bdf file. As you noted, the remaining problem is of a mismatch between the count of STARTCHAR blocks and the number on the CHARS line. Probably increasing CHARS to match what is actually present is the thing to do. Do you mind adding that change to this PR?

While pcf files are often smaller than bdf files, it is apparently not always true. the default format of bdftopcf (and thus the one understood by the font library) always has one row of a glyph occupying a multiple of 32 bytes, so in the case of this very narrow font it does lead to an increased file system in bytes. As a separate issue, maybe we should investigate supporting other formats. -p 1 -u 1 should yield the smallest file, though even this is a bit bigger than the original bdf file!

-rw-r--r-- 1 jepler jepler 235912 Aug  7 14:04 ter-u12n-defaults.pcf
-rw-r--r-- 1 jepler jepler 188140 Aug  7 14:05 ter-u12n-p1u1.pcf
-rw-r--r-- 1 jepler jepler 161169 Aug  7 14:04 ter-u12n.bdf

@rpavlik
Copy link
Copy Markdown
Author

rpavlik commented Aug 15, 2021

There, thanks for the patience. I have bumped the number of chars up, and it now appears to be valid according to https://adafruit.github.io/web-bdftopcf/ anyway. Ready for re-review.

Copy link
Copy Markdown

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for sticking with it!

@jepler jepler merged commit 0553561 into adafruit:main Aug 16, 2021
@rpavlik rpavlik deleted the patch-1 branch August 16, 2021 21:59
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

Successfully merging this pull request may close these issues.

4 participants