Created
August 18, 2019 10:47
-
-
Save ctrlcctrlv/a9fe2743e726a6914f82a577dbb06d9b to your computer and use it in GitHub Desktop.
IRC chat log of #inkscape-devel on 18 August 2019 in re: variable font interpolation and FontForge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 06:06:35 copypaste this is a stretch, but maybe someone here knows the answer to this question we have about variable font interpolation? and could comment ? https://github.com/fontforge/fontforge/issues/3803#issuecomment-522224005 | |
| 06:07:01 copypaste basically we just want to know how it's done and whether inkscape's interpolator is the same method | |
| 06:08:39 Mc afaik, variable fonts are rendered by harfbuzz or pango | |
| 06:12:00 Mc http://wiki.inkscape.org/wiki/index.php/Variable_Fonts_support | |
| 06:12:19 Mc Pango >= 1.41.1; FreeType >= 2.8 | |
| 06:12:35 Mc Harfbuzz >= 1.4.2 | |
| 06:13:59 copypaste ok but | |
| 06:14:08 copypaste how do we implement it | |
| 06:14:12 copypaste what kind of interpolation is in use | |
| 06:15:11 copypaste we (fontforge) also use pango. are you telling me we ought to just make pango do it and not implement the interpolation in fontforge? | |
| 06:17:18 Mc I'm not familiar enough with the font rendering code to answer that (ping @Tav ) | |
| 06:17:23 Mc Tav_: ^ | |
| 06:19:44 copypaste yeah we want to make it possible for people to *create* Variable Fonts in FontForge | |
| 06:20:10 copypaste so like, maybe we don't need an implementation, idk, for some things we already just create a font _on the fly_ and have freetype help us out | |
| 06:20:15 copypaste mostly for hinting related stuff we do that | |
| 06:20:53 Mc my guess is that would also work for variable fonts | |
| 06:21:02 Mc but don't take my word for it | |
| 06:21:25 Mc in Inkscape we just "use" variable fonts so that's probably simpler | |
| 06:21:56 inkchatbot <Tav> As Mc said, we rely on pango and harfbuzz. We get the path outline data and then fill or stroke the glyphs ourselves without making any adjustments. | |
| 06:24:12 copypaste thanks. im talking about the interpolation extension. do you know if VFs use the same type of interpolation inkscape does | |
| 06:24:31 copypaste tbh though, im looking through the harfbuzz API and you've definitely got my attention | |
| 06:24:48 copypaste we might be able to just use harfbuzz and not write our own implementation | |
| 06:25:40 copypaste like obviously VFs work via interpolation right, across multiple so-called "axes". so my Q is just, what kind of interpolation is it, at implementation level. *if* you know :-) | |
| 06:26:18 inkchatbot <Tav> No idea.... | |
| 06:26:20 Mc ah like "linear per node or control point" ? | |
| 06:26:59 copypaste yea i used the interpolation extension to make my example images | |
| 06:27:22 copypaste no font stuff was used. i converted to paths and then used interpolaiton extension letter by letter | |
| 06:27:40 copypaste im trying to figure out how this works at a more fundamental level because, well, im a developer of a font editor | |
| 06:27:43 copypaste so it matters to me :-) | |
| 06:27:47 Mc ah, the extension in inkscape ! | |
| 06:28:03 copypaste yea :-D | |
| 06:28:13 Mc https://gitlab.com/inkscape/extensions/blob/master/interp.py | |
| 06:28:16 copypaste im wondering just if you guys know if OpenType variable fonts use the same interpolator as you | |
| 06:28:27 copypaste yes that's it | |
| 06:28:30 copypaste at like a maths level | |
| 06:28:46 copypaste because the results i got were stunning tbh | |
| 06:29:53 copypaste if you don't know i understand. im trying to unravel this mystery. we don't have Google or Adobe or MS helping us. we didn't write the standard and our opinion wasnt sought | |
| 06:30:28 copypaste we weren't even given drafts of it and now a lot of people are asking for it so im exploring the possibility of getting first-party support of variable fonts in fontforge | |
| 06:31:39 Mc afaiu, interpolation looks linear per point/handle in the standard | |
| 06:31:54 Mc ( https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#algorithm-for-interpolation-of-instance-values ) | |
| 06:33:48 Mc so for interpolating paths that have the same number and type of nodes, my guess is that the extension should work the same when set to linear ? | |
| 06:34:18 copypaste now we're cooking with gas. the letter that didn't interpolate right, "a", had one too many points | |
| 06:34:34 copypaste when i added another point to the other "a", it interpolated perfectly | |
| 06:34:52 copypaste so i guess i should try to make an OT var font and see if the same thing happens to "a"! | |
| 06:35:02 copypaste then i will know whether or not the same interpolator is being used :-) | |
| 06:35:34 Mc yeah I think most of the complicated things we do in that extension is to accomodate difference in number of nodes | |
| 06:35:51 copypaste that doesn't work well :~) | |
| 06:36:06 copypaste sorry, honest truth. like maybe some people would find the effect "cool" | |
| 06:36:08 Mc I don't think that's allowed for fonts :p | |
| 06:36:13 copypaste but it doesn't look good hehe | |
| 06:36:16 copypaste FOR FONTS | |
| 06:39:47 inkchatbot <Tav> BTW, SVG allows paths to be animated by interpolation but the paths must have the exact same structure. (Discussions on relaxing this requirement have never gone anywhere.) | |
| 06:45:26 copypaste is it ok for me to put the log of this chat in our github issue? | |
| 06:46:08 Mc sure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment