Skip to content

Use Bezier curves to improve quality #16

@ianthetechie

Description

@ianthetechie

Background:

There are two approaches to SDF glyph generation in wide use today.

  1. Rasterize the glyphs directly (ex: using FreeType to get an alpha map) and compute the SDF from the bitmap. This is the approach taken by TinySDF: https://github.com/mapbox/tiny-sdf.
  2. Compute the SDF using the bezier curves from the font, as in https://github.com/mapbox/sdf-glyph-foundry/blob/master/include/mapbox/glyph_foundry_impl.hpp (used by many projects including the old node frontend and the more modern https://github.com/maplibre/font-maker).

We currently use the first method as it is fast and easy to implement. However, there is a solid case for supporting the second method, as this would improve the rendering quality of Indic, Khmer, Burmese, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions