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

Value is out of range when converting LHANDW.TTF (Lucida Handwriting Corsivo) #123

Open
mtvega opened this issue Oct 9, 2024 · 2 comments

Comments

@mtvega
Copy link

mtvega commented Oct 9, 2024

Hello, we've successfully using lv_font_conv for most TTF files, but when trying to convert the "Lucida Handwriting" font (LHANDW.TTF included in the attached zip file), we got the the following out-of-range error.

=============================
COMMAND ISSUED

lv_font_conv --font "C:\WINDOWS\Fonts\LHANDW.TTF" -r 0x0030-0x7e --size 48 --format bin --bpp 2 --no-compress -o "D:_TEST\Fonts\LHANDW_48.fnt"

=============================
OUTPUT

RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -9
at new NodeError (node:internal/errors:371:5)
at checkInt (node:internal/buffer:72:11)
at writeU_Int16LE (node:internal/buffer:722:3)
at Buffer.writeUInt16LE (node:internal/buffer:730:10)
at Head.toBin (<nodejs_path>\nodejs\node_modules\lv_font_conv\lib\font\table_head.js:63:9)
at Font.toBin (<nodejs_path>\nodejs\node_modules\lv_font_conv\lib\font\font.js:117:17)
at Object.write_images [as bin] (<nodejs_path>\nodejs\node_modules\lv_font_conv\lib\writers\bin.js:15:25)
at convert (<nodejs_path>\nodejs\node_modules\lv_font_conv\lib\convert.js:25:35)
at async Object.module.exports.run (<nodejs_path>\nodejs\node_modules\lv_font_conv\lib\cli.js:300:15)

Please note that modifying the range in -r does not change the result.
Any hints or solutions ?

Thank you for your work and support,
Massimiliano

LHANDW.zip

@kisvegabor
Copy link
Member

cc @puzrin

@mtvega
Copy link
Author

mtvega commented Nov 5, 2024

Hello kisvegabor, thanks, but I don't understand your answer. What do you mean with that link ? Has he the answer ? Where ?

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

2 participants