Skip to content

Request/discussion: FreeType as optional rasterizing backend? #97

@solbjorn

Description

@solbjorn

I'm wondering whether it would make sense and wouldn't be too difficult to add an option to use FreeType for rendering fonts?

I'm not sure if it would produce better quality fonts, from what I understood from the comments in skb_canvas.c and skb_rasterizer.c, the current rasterizer is based on some old stb_truetype version (which lacks quality in comparison to FT, but I realize that you improved it a lot).
FreeType can also render SVG-in-OT fonts using e.g. PlutoSVG (https://github.com/sammycage/plutosvg) (I didn't try yet whether Skribidi supports SVG-in-OT).

Some example implementations:

The reason why I prefer Skribidi over SFML is because it handles complex layouts, while SFML doesn't handle line wraps at all.

FreeType font loader also supports more formats: BZIP and GZIP compressed fonts, PNG bitmaps in fonts, WOFF fonts. For now, I use hb_face_create_or_fail_using("ft") + skb_font_collection_add_hb_font() in my WIP project, so that HarfBuzz uses FreeType to load fonts.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions