Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis Tags must be uppercase #17

Closed
davelab6 opened this issue Feb 9, 2017 · 10 comments
Closed

Axis Tags must be uppercase #17

davelab6 opened this issue Feb 9, 2017 · 10 comments
Labels
Milestone

Comments

@davelab6
Copy link
Member

davelab6 commented Feb 9, 2017

Over in http://typedrawers.com/discussion/comment/25823/#Comment_25823 @PeterCon said,

A bit of feedback on this font -- which also applies to Amstelvar: these are using custom axes, but are not following the spec requirements for custom axis tags:

Like other OpenType tags, axis tags are four unsigned bytes that can equivalently be interpreted as a string of four ASCII characters. Axis tags must begin with a letter (0x41 to 0x5A, 0x61 to 0x7A) and must use only letters, digits (0x30 to 0x39) or space (0x20). Space characters must only occur as trailing characters in tags that have fewer than four letters or digits.

Privately-defined axis tags must begin with an uppercase letter (0x41 to 0x5A), and must use only uppercase letters or digits. Registered axis tags must not use that pattern, but can be any other valid pattern.

https://www.microsoft.com/typography/otspec/fvar.htm has details on axis tag requirements.

I'd like to request that abcA and xyz2 can be changed to ABCA and XYZ2 in order to conform to the spec's requirements.

(This is the same as googlefonts/decovar#2)

@PeterCon
Copy link

PeterCon commented Feb 10, 2017 via email

@davelab6
Copy link
Member Author

Here's the ttx dump of the current fvar table:

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="3.0">

  <fvar>

    <!-- Contrast -->
    <Axis>
      <AxisTag>cntr</AxisTag>
      <MinValue>8.0</MinValue>
      <DefaultValue>100.0</DefaultValue>
      <MaxValue>170.0</MaxValue>
      <NameID>256</NameID>
    </Axis>

    <!-- Grade -->
    <Axis>
      <AxisTag>grad</AxisTag>
      <MinValue>50.0</MinValue>
      <DefaultValue>176.0</DefaultValue>
      <MaxValue>500.0</MaxValue>
      <NameID>257</NameID>
    </Axis>

    <!-- Optical Size -->
    <Axis>
      <AxisTag>opsz</AxisTag>
      <MinValue>10.0</MinValue>
      <DefaultValue>14.0</DefaultValue>
      <MaxValue>72.0</MaxValue>
      <NameID>258</NameID>
    </Axis>

    <!-- ParaWidth -->
    <Axis>
      <AxisTag>prwd</AxisTag>
      <MinValue>84.0</MinValue>
      <DefaultValue>804.0</DefaultValue>
      <MaxValue>804.0</MaxValue>
      <NameID>259</NameID>
    </Axis>

    <!-- ParaWeight -->
    <Axis>
      <AxisTag>prwg</AxisTag>
      <MinValue>10.0</MinValue>
      <DefaultValue>176.0</DefaultValue>
      <MaxValue>1000.0</MaxValue>
      <NameID>260</NameID>
    </Axis>

    <!-- Serif Rise -->
    <Axis>
      <AxisTag>srfr</AxisTag>
      <MinValue>0.0</MinValue>
      <DefaultValue>35.0</DefaultValue>
      <MaxValue>95.0</MaxValue>
      <NameID>261</NameID>
    </Axis>

    <!-- Width -->
    <Axis>
      <AxisTag>wdth</AxisTag>
      <MinValue>120.0</MinValue>
      <DefaultValue>804.0</DefaultValue>
      <MaxValue>804.0</MaxValue>
      <NameID>262</NameID>
    </Axis>

    <!-- Weight -->
    <Axis>
      <AxisTag>wght</AxisTag>
      <MinValue>75.0</MinValue>
      <DefaultValue>176.0</DefaultValue>
      <MaxValue>500.0</MaxValue>
      <NameID>263</NameID>
    </Axis>

    <!-- xHeight -->
    <Axis>
      <AxisTag>xhgt</AxisTag>
      <MinValue>890.0</MinValue>
      <DefaultValue>1000.0</DefaultValue>
      <MaxValue>1200.0</MaxValue>
      <NameID>264</NameID>
    </Axis>
  </fvar>

</ttFont>

@davelab6 davelab6 added the bug label Mar 24, 2017
@PeterCon
Copy link

These changes would make the tags conform to the spec:
"cntr" -> "CNTR"
"grad" -> "GRAD"
"prwd" -> "PRWD"
"prwg" -> "PRWG"
"srfr" -> "SRFR"
"xhgt" -> "XHGT"

Wrt xHeight, could you envisage that becoming a registered axis in the future? (It's an axis I've seen used as an example more than once.) If so, any thoughts on a scale for that axis that would make sense across any fonts using the axis? (E.g., per-mille of em height?) If so, you might use that for your XHGT scale. (Same would be true for other custom axis scales, but I call that out just because I've seen x-height called out so often as a example.)

@dberlow
Copy link
Contributor

dberlow commented Mar 24, 2017 via email

@asaumierdemers
Copy link
Contributor

Fixed with commit a879f3f

@dberlow
Copy link
Contributor

dberlow commented Mar 27, 2017

Excellent, thanks.

I would rather "AmstelvarAlpha-VF-2017-01-23" not cause any confusion and be in an old fonts folder or something, so just "AmstelvarAlpha-VF" is there?

@davelab6
Copy link
Member Author

I would rather "AmstelvarAlpha-VF-2017-01-23" not cause any confusion and be in an old fonts folder or something, so just "AmstelvarAlpha-VF" is there?

I'll take care of this with git tags

@dberlow
Copy link
Contributor

dberlow commented Mar 27, 2017 via email

@davelab6 davelab6 mentioned this issue Mar 27, 2017
@davelab6
Copy link
Member Author

@PeterCon
Copy link

Thanks! :-)

@davelab6 davelab6 modified the milestone: v1 Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants