Comments (11)
This font does not need Format 4 Axis values tables, as far as I can tell.
All your SemiBolds are at 600, all your UltraExpandeds are at 200, etc. In other words, the instances in the design space are on an orthogonal grid, and therefore Inconsolata is best served by 17 (=8+9) Axis values tables in format 1, 2 or 3 (see table), rather than 72 (=8*9) in format 4. You in fact have 76 Axis value tables including 4 duplicates (e.g. AxisValue indices 2 and 70, both UltraExpanded ExtraLight).
axisIndex | name | value |
---|---|---|
0 | ExtraLight | 200 |
0 | Light | 300 |
0 | (Regular) | 400 |
0 | Medium | 500 |
0 | SemiBold | 600 |
0 | Bold | 700 |
0 | ExtraBold | 800 |
0 | Black | 900 |
1 | UltraCondensed | 50 |
1 | ExtraCondensed | 62.5 |
1 | Condensed | 75 |
1 | SemiCondensed | 87.5 |
1 | (Regular) | 100 |
1 | SemiExpanded | 112.5 |
1 | Expanded | 125 |
1 | ExtraExpanded | 150 |
1 | UltraExpanded | 200 |
BTW you mean format v1.2, which is the latest on the Microsoft STAT spec and in your font.
In any case, Samsa GUI should still support Format 4 :)
from samsa.
Do you know if MS Office rejects all format v1.2 STAT tables, or only the Format 4 Axis value tables inside them? /cc @robmck-ms
from samsa.
The samsa-core.js STAT parser does work with Format 4, in case you want to hack. Type GLOBAL.vf.tables["STAT"].data
into the console to see the data. Here’s an extract from Inconsolata[wdth,wght].ttf:
from samsa.
Related, a couple of weeks ago @twardoch wrote an interesting post about non-orthogonality and STAT, googlefonts-discuss, Re: Variable fonts: Do we really need so many instances, referring to @typoland’s nice diagram in his repo Instances Calculator.
from samsa.
On Windows, I recommend using FontSetViewer (https://github.com/fdwr/FontSetViewer) to see how the various APIs are enumerating the font. I agree that this font doesn't need format 4 - that format was created for something like DecoVar where the instances don't really group in any particular way, and the axes are more visual parameters.
Regarding office: The responsibility for STAT is below Office. For font enumeration, Office calls GDI, which relies on DirectWrite for much of the work, but also does it's own STAT table parsing. DWrite supports format 4; GDI doesn't yet.
from samsa.
Ugh. I can't keep up with all the threads on all the discussion forums. The intention of the weight axis user coordinates is that they are orthogonal and you use avar to map them to whatever normalized coordinate you want to get the right interpolation you want. Unfortunately, avar has it's problems... (cue XVARr/ avar2, all of which I wanted to get into the original v1.8 spec, but...)
from samsa.
Thank you both for your answers.
Apologies, I've been a complete idiot. After rereading the spec
The axis record provides information about a single design axis.
I always assumed the STAT wasn't for each axis but for all axes that make up an individual style. @Lorp I'll adopt your suggestion and yes I meant v1.2.
@robmck-ms thank you for the link to FontSetviewer. I'll check it out.
Feel free to close this issue if supporting format 4 lookups is out of scope.
from samsa.
All good. The check of what Samsa was doing with Format 4, using your sample font, made me see a bug where it wasn’t being parsed correctly :) Fixed in 75d313f.
Here are the first two records from Inconsolata in Samsa’s font.tables["STAT"].data
. In formats 1, 2 and 3 the axisIndex
and value
properties are numeric, in format 4 they are arrays of numerics.
I’ll leave the issue open until Samsa GUI supports Format 4.
from samsa.
The intention of the weight axis user coordinates is that they are orthogonal and you use avar to map them to whatever normalized coordinate you want to get the right interpolation you want.
Should this clarification be added to the ot spec?
Unfortunately, avar has it's problems...
Where are these documented? :)
from samsa.
The intention of the weight axis user coordinates is that they are orthogonal and you use avar to map them to whatever normalized coordinate you want to get the right interpolation you want.
Should this clarification be added to the ot spec?
Perhaps. It's broader than the wght axis. All axes are supposed to be independent axes (e.g. you can hold all axes constant and move one and only the feature that one controls should move). With wght, there's the added constraint that the numbers correspond to specific semantics. 400 is Regular, 700 is Bold, etc. So, if you set to wght=700, that should be the bold for whatever you have the rest of the axes set to. (or, flipside: if you keep wght=700, and move other stuff, you should always get the Bold of whatever the other axes are set to, and moving wght to 400 gives you the corresponding Regular).
So, my what I described in my previous message is implicit in the details, but this is clearly something people are stumbling on. (I've seen wdth axes that have 100 as bold and 0 as light).
Unfortunately, avar has it's problems...
Where are these documented? :)
https://github.com/Microsoft/OpenType-XVAR-proposal#the-problem plus discussions in several places about XVAR & avar2.
from samsa.
Samsa GUI now supports format 4 axisValueTables, from this commit d8830ee
Also in that commit, the STAT panel now gets amended as you move around the designspace.
from samsa.
Related Issues (20)
- Allow sidebar to resize HOT 1
- ES6 / TypeScript support on samsa-core.js HOT 2
- "use strict"
- Remember axes settings for 'similar fonts'
- svgPath() method not working like GUI HOT 3
- SVG paths should be closed using "Z" in all cases HOT 1
- SamsaGlyph.prototype.svg has hardcoded width and height
- SamsaGlyph.prototype.svg has hardcoded width and height HOT 3
- samsa-core: Different tuple produce the same svgPath HOT 5
- Samsa shows interpolated instance 500 at 499.99 HOT 2
- Can't load font URL: TypeError: process.exit is not a function. (In 'process.exit(0)', 'process.exit' is undefined)
- Support for CFF-flavored variable fonts HOT 5
- Reject fonts incompatible with Samsa (including UFO, TTX, CFF2) gracefully HOT 1
- FeatureVariation replacement missing in svg animation exports HOT 1
- Stop using Node.js Buffer HOT 1
- [web app] Are there metrics labels available? HOT 3
- avar panel sometimes does not show mappings properly
- Add search by Unicode to the the "Filter by name or id" input box. HOT 2
- Allow characters outside of BMP in the "filter by string" box
- Does not report font axes after subsetting variable font HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samsa.