Skip to content

Try different SDF granularities #38

@yhahn

Description

@yhahn

We can get better compression ratios by reducing the granularity of the SDFs -- the following commit rounds each value to the nearest multiple of 8:

c213c12

Visually it's hard to see much difference once rendered and here is the space saving for a 0-255 range:

master 43124 bytes
compress-more 23208 bytes

This is a nice boost we can get now roughly for free since it doesn't affect the format/integrating projects -- later we may try other encodings for the bitmap (PNG, etc.) but those will be format-breaking.

Next actions

  • Try this and other settings (4 and 2? 16 is where I started to see artifacts...) with a variety of different fonts
  • This could be variable/env based so if you want a very high quality SDF you can set your settings that way

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions