Skip to content

Improve font rendering #7

@jpadgett314

Description

@jpadgett314

Currently, fonts are rendered to OffscreenCanvas at 1x size. Chromium renders using vector outlines (outside of very specific scenarios like MS Gothic), and anti-aliasing is mandatory, which is harmful to the clarity of the compact bitmap font. From what I can tell, bitmap strikes are ignored even if the EBDT/EBLC tables are present in the TTF font (again, outside of certain specific fonts). Tested on Windows but should also test on Linux.

Currently, pixels below 75% brightness are ignored to improve clarity. Better ways of avoiding anti-aliasing include:

  1. avoiding the browser font engine
  2. perhaps rendering at larger size and then down sample to minimize effect of anti-aliasing (not sure how well it would work)

This isn't really necessary for the current jiskan16 font, which is already quite clear, but would be necessary for more detailed and/or compact fonts.

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