Git Product home page Git Product logo

Comments (6)

be5invis avatar be5invis commented on May 11, 2024

@PeterCon
For some cases (like designing a web page in Illustrator), designers may manually select a PPEM to preview how their icon font looks like under the particular size.
(The UI section is basically a copy from the Spcaing axis... I'll fix it asap.)

from opentypedesignvariationaxistags.

be5invis avatar be5invis commented on May 11, 2024

Changes of the Suggested programmatic interactions and UI recommendations section:


Suggested programmatic interactions: A proper rasterizer should pass zero, representing “Ignore pixel alignment”, or a positive integer, strictly equal to the current PPEM value when rasterizing the glyphs in the font.

When a positive ppem value is passed to the font, the hinting mechanism (TrueType instructions or CFF hints) must be enabled. For TrueType fonts, the value should be exactly equal to the result MPPEM[] instruction, and whether passing positive ppem value should be controlled by the gasp table.

The logic of rasterizers could be described as the code below:

if do hinting then
    pass the PPEM used for hinting as the value of `ppem` axis
else
    pass 0

UI recommendations: This axis should be hidden from direct user-selection in UI, and the HIDDEN_AXIS flag in fvar should always be set.

In some special cases, like a user interface designing software, applications could provide some control to let user to select the PPEM value, but the value should be restricted to integers, and the application must properly interpret the TrueType or CFF hints when the value user selected being non-zero. The PPEM used in interpreting hints should be equal to the value the user selected.

from opentypedesignvariationaxistags.

PeterCon avatar PeterCon commented on May 11, 2024

For suggested PI, do you want to expand a bit to add the following (without the added emphasis)?

"It is recommended that this value be set by the rasterizer to the current PPEM value, and that text selection and layout processes leave this set to zero."

Also, a minor point on wording: I find the wording "pass a value to the axis" a bit confusing: it makes it sound like the axis is an active agent that will take some action on the value passed to it. But in this case, it's the rasterizer that will be taking action. So, I'd be inclined to use wording like "set the axis value".

from opentypedesignvariationaxistags.

be5invis avatar be5invis commented on May 11, 2024

@PeterCon
I've rewritten the PI section to make it more clear and precise.
The term "pass" is the same as "pass an argument into a function". I'll change the wording.

UPDATED VERSION:


Suggested programmatic interactions: A proper rasterizer should set ppem axis value to zero, representing “Ignore pixel alignment”, or a positive integer equal to the current PPEM value when rasterizing the glyphs in the font.

When a positive ppem value is set, the hinting mechanism (TrueType instructions or CFF hints) must be enabled. For TrueType fonts, the value should be exactly equal to the result MPPEM[] instruction, and whether passing positive ppem value should be controlled by the gasp table.

The logic of rasterizers could be described as the code below:

if do hinting then
    pass the PPEM used for hinting as the value of `ppem` axis
else
    pass 0

UI recommendations: This axis should be hidden from direct user-selection in UI, and the HIDDEN_AXIS flag in fvar should always be set.

In some special cases, like a user interface designing software, applications could provide some control to let user to select the PPEM value, but the value should be restricted to integers, and the application must properly interpret the TrueType or CFF hints when the value user selected being non-zero. The PPEM used in interpreting hints should be equal to the value the user selected.

from opentypedesignvariationaxistags.

twardoch avatar twardoch commented on May 11, 2024

I think the PPEM axis may be of limited interest for people who develop otherwise "static" fonts, as they may be interested in employing traditional hinting techniques for reasons of backwards compatibility. But I think the PPEM axis can be very interesting for various fonts that also have other axes — hinting variable fonts is not yet a "solved" problem, and it's somewhat unclear how one would hint in complex situations. But with the PPEM axis, a designer could easily intervene on a per-glyph basis when some important adjustments are needed in a particular region of the design space.

from opentypedesignvariationaxistags.

be5invis avatar be5invis commented on May 11, 2024

@twardoch
For IDH, as discussed with Greg Hitchcock before, it would calculate the IDH data for various selected instances (like wght = 100, 200, ..., 1000), then for one stroke, the data would become a Variation -> PPEM -> (Position, MaxWidth, MinWidth) table. For an "arbitrary" variation (like wght = 125), the instruction would choose the closest calculated instance (in this case, wght = 100), and use the data calculated for that.

from opentypedesignvariationaxistags.

Related Issues (16)

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.