Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Investigate 2-channel signed distance fields #137

Open

Description

@kkaefer

The Valve paper mentions that using a second channel improves sharp corners:

You can see that our text is a little unsharp on the edges on Retina devices:

Activity

  1. mikemorris commented on Apr 22, 2014

    @mikemorris
    Contributor

    Wondering if this technique might help alleviate some rendering issues with glyphs from the harfbuzz branch of fontserver or if there's a simpler issue causing this problem.

    24px SDF bitmaps
    screen shot 2014-04-18 at 4 58 22 pm

    48px SDF bitmaps
    screen shot 2014-04-18 at 4 55 50 pm

  2. kkaefer commented on Apr 22, 2014

    @kkaefer
    MemberAuthor

    Nope, this looks like a different issue. It's likely that this is either a blending issue, or an issue with copying the individual glyphs to the shared glyph atlas.

  3. mikemorris commented on Apr 22, 2014

    @mikemorris
    Contributor

    @kkaefer Ah, looks like it might just be a discrepancy between the SDF code in fontserver and adding glyphs to the glyph atlas, thanks for pointing me in that direction.

  4. kkaefer commented on Jul 29, 2014

    @kkaefer
    MemberAuthor

    never mind, it's not. Here's a reddit thread that gives a little background: http://www.reddit.com/r/gamedev/comments/2879jd/just_found_out_about_signed_distance_field_text/

    The Valve paper is deeply frustrating because they deliberately hid their technique for doing sharp corners, and pretended it's simple (IIRC it's a single line explanation, which is simply wrong).

  5. jfirebaugh commented on Mar 23, 2016

    @jfirebaugh
    Contributor

    No current plans to pursue this.

  6. kkaefer commented on Apr 28, 2016

    @kkaefer
    MemberAuthor
  7. mourner commented on Apr 28, 2016

    @mourner
    Member

    @kkaefer is there a considerable file size difference between mono and multi SDF textures?

  8. mikemorris commented on Apr 28, 2016

    @mikemorris
    Contributor

    Oooh, neat find @kkaefer, I can look at this in the near future alongside other node-fontnik work.

    @mourner Our current default resolution and granularity work well for simple fonts, but it's possible we could use this to generate sharper glyphs at comparable file sizes (smaller than some of my experiments in mapbox/node-fontnik#38 for instance), particularly for swooping script fonts.

  9. self-assigned this
    on Apr 28, 2016
  10. removed their assignment
    on Oct 19, 2016
  11. added
    Core
    on Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions