Code Monkey home page Code Monkey logo

Comments (3)

arrowtype avatar arrowtype commented on May 19, 2024

Two slight complexities of this:

  • The furthest Slant value is -15, but that corresponds to a real angle of most vertical paths at 14.04°
  • The cursive forms of glyphs are activated when slnt goes beyond -14.

So, the avar could do the following:

  • map values of 0 to -14 to real angles up to 14° (it could potentially go to 14.04°, but that might be pointlessly specific)
  • map values of -14.01 to -15 to -14.04

By default, Jens’s script prints out the following map:

            <map input="-14.000000" output="-14.000000" />
            <map input="-7.000000" output="-6.894468" />
            <map input="0.000000" output="0.000000" />

But for Recursive the required axis map is ... more complicated than expected. I need to map things to get closer to real angles, but I also have to make rvrn substitutions work beyond 14.04. Basically, I couldn’t just use the direct output of Jens’s script, because it (obviously) doesn’t take my (very) specific case into consideration.


In the end, I had to do a bit of guessing-and-checking, but I am quite happy with the results.

    <axis tag="slnt" name="Slant" minimum="-15" maximum="0" default="0">
      <labelname xml:lang="en">Slant</labelname>
      <map input="-15.000000" output="-15.000000" />
      <map input="-14.050000" output="-14.999999" />
      <map input="-14.040000" output="-14.980000" />
      <map input="-7.020000" output="-7.500000" />
      <map input="0.000000" output="0.000000" />
    </axis>

This is paired with condition sets like this:

<rule name="mono">
    <conditionset>
        <condition name="Monospace" minimum="0.500000" maximum="1" />
        <condition name="Slant" minimum="-14.985000" maximum="0" />
        <condition name="Cursive" minimum="0" maximum="0.900000" />
    </conditionset>
    <sub name="dotlessi" with="dotlessi.mono" />
    <sub name="f" with="f.mono" />
    <sub name="g" with="g.mono" />
    <!-- etc -->
</rule>
<rule name="mono autoitalic">
    <conditionset>
        <condition name="Monospace" minimum="0.500000" maximum="1" />
        <condition name="Slant" minimum="-15" maximum="-14.990000" />
        <condition name="Cursive" minimum="0.100000" maximum="1" />
    </conditionset>
    <sub name="a" with="a.italic" />
    <!-- etc -->
</rule>

Results

At -14.04 in Chrome (tested in Wakamai Fondue), the roman forms persist, but as soon as it goes past that, cursive/italic forms sub in:

image

image

Accuracy

At -15, the result is the same in slope and italic alts, because this is at the extreme of the axis in both cases:

image

At -14, it is about 1° more accurate, and allows for the full 14.04° oblique roman forms:

image

At -12, -7, and -5 it is a little more accurate:

image

image

image

And at 0, it is obviously just upright.

from recursive.

arrowtype avatar arrowtype commented on May 19, 2024

This issue is solved in the designspace updates of #435.

I will close this once I build those updates into a release. For now, here is the updated VF:

recursive-MONO_CASL_wght_slnt_ital--full_gsub-VF.ttf.zip

from recursive.

arrowtype avatar arrowtype commented on May 19, 2024

Closed with https://github.com/arrowtype/recursive/releases/tag/v1.072

from recursive.

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.