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

build-glyphs binary - allow different buffer sizes #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

saskaale
Copy link

@saskaale saskaale commented Dec 7, 2016

Passing optional parameter bufferSize to the build-glyphs binary. It allows user to create bigger ( or smaller ) font chunks.

@springmeyer
Copy link
Contributor

Thanks for the contribution. This will need test coverage in https://github.com/mapbox/node-fontnik/blob/master/test/bin.test.js#L17-L33. I'm curious, what is your usecase for creating different sized font chunks?

@saskaale
Copy link
Author

saskaale commented Dec 7, 2016

Hi. Thanks. I have also prepared second pull request with the argument checking ( buffer size > 0 ). I'd send it in evening.

Ok, I'd write that test coverage.

And for the usage: I am developing library which uses the SDF fonts and I don't want to cope with the loading of all (or just necessary ) files. I'd simply tell the user to generate the range he'd need ( assuming that almost everyone would use just ASCII range, but if he'd want more, he can just simply generate for example whole UTF8 range ). With that, I can simplify the library and work with just one file load.

@saskaale
Copy link
Author

saskaale commented Dec 9, 2016

Hi Dane,
I 've already wrote that coverage. Hope, it would be OK.

@mikemorris
Copy link
Contributor

Could we use a more accurate term like rangeSize or something? buffer is already an argument to RenderSDF (currently hardcoded to 3) indicating the spacing around each rendered SDF.

If you're writing a library, could you just call RangeAsync (C++) or Range (JavaScript) directly instead of going through the CLI interface?

@saskaale
Copy link
Author

saskaale commented Jan 4, 2017

I have no problem with the renaming of the argument. RangeSize seems good to me.
I wanted to build web-based library which uses directly just the directly pbf files, so this seemed to me as an easiest solution.

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.

None yet

3 participants