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

Change the default BitmapFont texture size #6643

Merged
merged 5 commits into from May 28, 2020
Merged

Conversation

bigtimebuddy
Copy link
Member

Follow-up to #6600

The default size for generating BitmapFonts was 2048x2048, which is a very large image. Even if most of that is empty space, it's a big memory footprint for the GPU. I turned it down to something a little more reasonable: 512x512.

@SukantPal said that he might work on a heuristic to determine the optimal size based on the font size and character count. Until then, let's turn it down a bit.

Even if not all glyphs fit, they are spread across multiple pages, for instance:
https://jsfiddle.net/bigtimebuddy/et2boa51/

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2020

Codecov Report

Merging #6643 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #6643   +/-   ##
=======================================
  Coverage   76.84%   76.84%           
=======================================
  Files          29       29           
  Lines        1127     1127           
=======================================
  Hits          866      866           
  Misses        261      261           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37cb4cb...8da2bd2. Read the comment docs.

@GoodBoyDigital
Copy link
Member

yeah, good shout!

we could get an accurate enough size by biggest character size * number of chars to render!

@bigtimebuddy bigtimebuddy added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label May 28, 2020
@bigtimebuddy bigtimebuddy merged commit 1ee3a39 into dev May 28, 2020
@bigtimebuddy bigtimebuddy deleted the dev-bitmap-font-size branch May 28, 2020 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants