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

Fail to bdfconv big u8x8 font #2403

Open
My-point-is opened this issue Mar 14, 2024 · 4 comments
Open

Fail to bdfconv big u8x8 font #2403

My-point-is opened this issue Mar 14, 2024 · 4 comments

Comments

@My-point-is
Copy link

I'm trying to obtain u8x8 font from .bdf with height greater than 1 tile but converter cuts result to 1x1 tile and I get glyph array with 8 bytes per symbol. Big u8x8 fonts from "u8x8.h" are being rendered correctly but I need unicode subset.

bdfconv -v -f 2 -m "1024-1071>128" 7x14.bdf -o u8x8_7x14_cl.c -n u8x8_7x14_cl
Parse File 7x14.bdf: 2576 glyph(s) found
Map: map_cmd_list='1024-1071>128'
Map: exclude=0 from=1024/$400 to=1071/$42f map=128/$80
Reduce: Start
Reduce: End
CalculateMaxBBX: x=0, y=-2, w=8, h=7
CalculateMaxBBX: Encodings x=1024, y=1026, w=1024, h=1024
bf_CalculateMinMaxDWidth: dx_min=7, dx_max=7
bf_CalculateMinMaxDWidth: x_min=0, x_max=1
bf_CalculateMinMaxDWidth: Monospaced font.
bf_CalculateMaxBitFieldSize: bbx.x=1, bbx.y=2, bbx.w=4, bbx.h=4, dwidth=5
Generate8x8Font: Tile size width=1 height=1
Generate8x8Font: Font size 388
Monospace Statistics: Max width extention 3, average width extention 2.1
Note: For font format 2 BBX mode has been set to 3
bf_WriteU8G2CByFilename: Write file 'u8x8_7x14_cl.c'

@My-point-is
Copy link
Author

My-point-is commented Mar 23, 2024

I get it. In order to get full size glyph u8x8 font you must specify tile width and tile height explicitly. So it should be like this instead:
bdfconv -v -f 2 -th 1 -tv 2 -m "1024-1071>128" 7x14.bdf -o u8x8_7x14_cl.c -n u8x8_7x14_cl

May be it would be better if bdfconv caculated minimal tw and th to enclose the entire glyph in case tw and th are not specified explicitly?

@olikraus
Copy link
Owner

May be it would be better if bdfconv caculated minimal tw and th to enclose the entire glyph in case tw and th are not specified explicitly?

hmmm yes, but difficult.

@My-point-is
Copy link
Author

My-point-is commented Apr 1, 2024

hmmm yes, but difficult.

As alternative you could add conversion log Note: about tv, th not being specified in case it is possible to get the sign through conversion that glyphs are probably being bigger than just 1x1 in tiles.
I think it would be helpfull for other users of converter as in my case I saw log line: Generate8x8Font: Tile size width=1 height=1 but it wasn't obvious for me that I need to specify those myself.
Thank you for you great work!

@olikraus
Copy link
Owner

olikraus commented Apr 1, 2024

this i could indeed do...

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

No branches or pull requests

2 participants