GithubHelp home page GithubHelp logo

API Clarifications about msdf-atlas-gen HOT 2 CLOSED

chlumsky avatar chlumsky commented on July 26, 2024
API Clarifications

from msdf-atlas-gen.

Comments (2)

Chlumsky avatar Chlumsky commented on July 26, 2024 1

You are correct about atlasBounds, by dividing by the atlas dimensions, you get the texture coordinates. The planeBounds are for positioning the glyphs in the output "plane" (I couldn't come up with a better term), that is, where to put the textured rectangle when typesetting the text, relative to the baseline "cursor" that then moves by advance to the right. This tells you for example that the character y should be positioned lower than Y even though they might have similar height.

As for the units, font size (-size) is specified as pixels per EM, the size of an EM is taken from the font file's metadata, and this should be the same as the px font size unit in CSS. I believe the conversion rate for point size is simply 1px = 0.75pt, so you just have to multiply your point size by 4/3. The -emrange and -pxrange values specify the width of the range of representable distances in either unit, I am not sure what is unclear about these.

from msdf-atlas-gen.

weichx avatar weichx commented on July 26, 2024

Great, that's really helpful and should be enough for me to continue working with this. Thanks a lot

from msdf-atlas-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.