-
Notifications
You must be signed in to change notification settings - Fork 0
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
Is Anisotropic interpolation a good thing to have? #2
Comments
A better document will be Tim Ahrens MSc thesis / "Size-specific adjustments to type designs" book, which both explains powerful things that can e done with anisotropic interpolation as well as its problems / limitations. |
Yes you can. If you look into the delta-rect level you can see any variable "quantities" can be expressed into this form: where are the variation rects of a given VQ. So extending the rect set is pretty simple and safe: simply assign zero deltas to the new rects and it is solved. VQs form a module so you can safely define addition or scale of VQs. Though I'd like to extend it a little so it can form a ring (allows you to define multiplication of VQs). |
I believe there are two separate questions:
1. Whether the gvar and CFF2 machineries have some smart ways to re-use
deltas across multiple axes, but only partially ( so it's a compression
issue). I'm too stupid to answer that.
2. Whether a next-gen avar (xvar / avar2 table) would let us do it. I
believe a simple answer would be: yes. There could be one hidden axis that
only has deltas in the x direction, another hidden axis that only has
deltas in y direction. And then some virtual axes could freely mix instance
selections from those hidden axes, picking some values from the x-only axis
and some other values from the y-only axis. Because, really, anisotropic
interpolation at its core is simply treating one axis as two axes. That's
it.
A feasible addition to a potential next-gen avar would then be scaling (in
x and y) — i.e. after you've interpolated, you scale the result
geometrically in x and y separately. And then, ideally, also shift. Maybe
not the full transform matrix, but why not.
Whether this could be done with next-gen avar, I'm not sure. But it
obviously has benefits beyond anisotropic.
This would let us have a virtual superscript, subscript or small caps axis
for example:
If the font has opsz, or wght+wdth, or wgHt (which is my codename for
x-only wght) and wghT (which is my codename for y-only wght), or even just
plain wght, a virtual smcp axis could request a lower opsz and scale the
glyphs down, or could request a higher wght and a higher wdth and scale the
glyphs down, or request different values from wgHt & wghT and scale
differently in x and y (Ahrens-style), or even just request a higher wght
and scale down.
All those approaches world give you some "small caps". Superscripts &
subscripts world work the same but also require shift. And there would be
need for some tracking.
In fact, this small caps approach could be generalized into a general
"size" axis, that — unlike opsz, which only changes the outlines but keeps
the em size unchanged — would do the same as opsz (or pseudo-opsz, done via
the mechanisms described above), but would also perform the actual scaling.
Kind of what fake superscripts/subscripts and fake small caps do. So in the
same point size, you'd get lower opsz instances that are also scaled down
appropriately.
And then at some point we'd need variable components of we want to be able
to do this for the Unicode superscript/subscript and other characters that
are in fact size-reduced versions of other glyphs'in the font.
But of course all this could also be done with today's mechanism: we could
register the axes and define how they'd be built from design axes, and some
software would just derive the values and put this derived data into the
font.
It would blow up the font, and not all could be easily compressed, but
people could start doing it already today, and then appropriate mechanisms
could be added to the format later to, effectively, facilitate the
compression.
A.
…On Wed, 26 Jun 2019 at 08:17, Dave Crossland ***@***.***> wrote:
@dberlow <https://github.com/dberlow> @Lorp <https://github.com/Lorp> do
you know if this was possible in GX?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AAD6XRFGNFIYX5HLXWQNY4TP4MCZFA5CNFSM4G3OENR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYSOT7I#issuecomment-505735677>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD6XRBZD7KAGBYIUIAYRK3P4MCZFANCNFSM4G3OENRQ>
.
|
It’s easy to separate the x and y effects of all the delta sets, i.e. split them into two axes. This is fine in original GX. If you wanted to split I wondered about this technique when writing a It’s possible that on real data it would give better compression in itself, and also better IUP compression. |
In the original design doc, "OpenType GX" by @behdad, there is a "Further discussion" section which says,
For (1), https://help.fontlab.com/fontlab-vi/Variations-panel/#anisotropic-interpolation (I believe by @twardoch) says it well:
For (2), I wonder if @be5invis knows.
For (3), I wonder if a counter-case (that it would be a bad thing to have) was made, and that's why it never made it into OT1.8.
The text was updated successfully, but these errors were encountered: