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

complicated characters render with deficient because of insufficient resolution #20

Open
farteryhr opened this issue May 23, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@farteryhr
Copy link

image

for example, 鬱矗爨齾

@donmccurdy
Copy link
Owner

Hi, thanks for the report!

The resolution options currently provided map to --texture-size from msbf-bmfont-xml. It sounds like you're hoping to modify the --font-size flag, which would need to be added to the UI and then passed in here:

async function create (fontID, fontFile, charset, textureSize) {
const fontOptions = {
filename: fontID,
outputType: 'json',
charset: charset,
textureSize: [textureSize, textureSize],
pot: true
};

This seems like a good idea for PR, although I'm not sure when I can get to it myself.

@farteryhr
Copy link
Author

i have some more aggressive idea that we could generate each character with variable/adaptive resolution (font size, internally), determined by bisection and somehow testing "it break the outline shape nowhere (under some proper given constraint on rendering)".
because of the variety of density of strokes in chinese characters, it needs double or triple the resolution only to render a small-but-tough subset of them correctly. there's much space could be saved.
though, maybe (again) it's not the right repo to talk about this improvement....

@donmccurdy
Copy link
Owner

donmccurdy commented Jun 21, 2022

Perhaps that's possible — I'm not sure. It would probably need to be proposed in the https://github.com/soimy/msdf-bmfont-xml project before it could be included here. Troika.js may also be worth a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants