dy / linefont

Font for rendering line chart data
https://dy.github.io/linefont/scripts
SIL Open Font License 1.1
385 stars 6 forks source link

STAT and instances #9

Closed RosaWagner closed 1 year ago

RosaWagner commented 1 year ago

If possible you could tweak the value to range:

wdth and wght being common axes, you don't need to include the stat entry in config.yaml, gftools would build it correctly.

Instances in FVAR table should follow this: #6244

dy commented 1 year ago

Ok, I will adjust defaults, but as for mapping to 100..900 - I had that initially, but removed in order to be compatible with wavefont. Eg. if user switches font from wavefont to linefont the weight keeps persistent. Also it directly reflects UPM value.

RosaWagner commented 1 year ago

The thing is in linefont is that the larger weight looks extremely heavy compared to wavefont. If you want consistency, I'd rather change wavefont to range from 100 to 900 (which is still possible, a problem in the API prevent to push it in sandbox for now), it would also gives more instances/flexibility to users.

dy commented 1 year ago

Makes sense. Weight=400 for wavefont looks like super-heavy

image

I guess I can extend both to 100..900

dy commented 1 year ago

Ok, I have updated both fonts to support 100..900 range (maps to 5..200 ups internally). Also removed weight from stat config. Not sure how to provide defaults in designspace - if I indicate default=400 it requires a master with that weight, but any additional master increases font size up to 30%. I'd prefer to keep default axis values to min values instead. @RosaWagner

RosaWagner commented 1 year ago

Also removed weight from stat config.

Nope, if the stat entry is specified (such as when there are custom axis) then it has to be complete. The entire entry can be removed, only when all the axes can be generated by gftools (wdth, wght, ital).

dy commented 1 year ago

Got it. Updated, thank you @RosaWagner

RosaWagner commented 1 year ago

Since you are keeping the minimal values as default we would need the font to be named after the origin:

font name: Linefont SuperCondensed style: Thin

dy commented 1 year ago

So that's postscriptFullName or styleName, or everything? What should I change in fontinfo.plist:

  ...
  <key>familyName</key>
  <string>Linefont</string>
  <key>styleName</key>
  <string>Thin</string>
  <key>postscriptFontName</key>
  <string>Linefont-Thin</string>
  <key>postscriptFullName</key>
  <string>Linefont Thin</string>
  <key>postscriptWeightName</key>
  <string>Thin</string>
  ...

Also - do I have to change designspace instance to SuperCondensed?:

<instance filename="instance_ufo/Linefont-Thin.ufo" name="Linefont Thin" familyname="Linefont" stylename="Thin">
          ...

Also - it doesn't build with latest gftools (I mentioned in wavefont PR):

...
fontmake.errors.FontmakeError: In 'Linefont.designspace': Generating fonts from Designspace failed: 

Couldn't merge the fonts, because one of the values in a list was empty when
it shouldn't have been. This happened while performing the following
operation: GPOS.table.LookupList.Lookup[0][0][1].EntryAnchor

The problem is likely to be in Linefont Thin:
.EntryAnchor==[None, None, None, None, None, None, None, None]

Would you be able to help point out where I can post that issue? https://github.com/googlefonts/gftools/issues?

RosaWagner commented 1 year ago

The instances don't change cause they are at 100 (normal), but the Master Source yes it should be Linefont SuperCondensed

In plist I guess it should be:

  <key>familyName</key>
  <string>Linefont SuperCondensed</string>
  <key>styleName</key>
  <string>Thin</string>
  <key>postscriptFontName</key>
  <string>LinefontSuperCondensed-Thin</string>
  <key>postscriptFullName</key>
  <string>Linefont SuperCondensed Thin</string>
  <key>postscriptWeightName</key>
  <string>Thin</string>

For the error, can you open an issue in fontmake and tag me in it? I gonna be in holidays in a couple of days and it's better if the maintainer communicate with you directly

dy commented 1 year ago

@RosaWagner it seems default width value here isn't necessarily 25 (SuperCondensed) - I can pick wdth to be 100, because I have that master. So the SuperCondensed isn't necessary I suppose?

RosaWagner commented 1 year ago

Yes that would be even better

dy commented 1 year ago

Ok, font is building now. I will close it.