2018-03-06 16:02 GMT-03:00 Tavmjong Bah <tavmjong@...8...>:
On Tue, 2018-03-06 at 13:19 -0300, Felipe Sanches wrote:
> I left this aside for the past 6 months and recently got back to
> looking at it.
>
> I think the most trivial thing would be to populate the font-styles
> combo-box with named instances. This would be almost not perceptible
> by the users, but would enable variable fonts' instances to show up
> there just like their non-variable counterparts do.

That would be good if that information can be extracted from the font.
Speaking of which, I wonder if the OpenType 'fvar' table can be easily
extracted (which contains the ranges for the axes).

Yes we can easily do that. We don't need to parse the tables ourselves because freetype already provides methods for all the relevant info regarding variation axes, min/max/defaul values and named instances.
 

> Then there's the customization aspect of varfonts. For that, I think
> the bare minimum would be a bunch of sliders for selecting the
> coordinates of each variation axis. I feel that there must be
> something better than that form a user experience perspective, but
> I'm still not sure what would that be, so I'd leave it for a second
> iteration of the UI.

Sounds good. The sliders would then fill in the 'font-variation-
settings' property:

https://www.w3.org/TR/css-fonts-4/#font-variation-settings-def


yes, that's also my understanding!

 
> Also, since one can get a multitude of combinations within the
> designspace, I think it could be practical to adopt a UI workflow
> similar to that of color gradients, in which once a user-defined
> instance is applied to a text chunk, that instance is added to a pool
> of var font instances that can be reused in other chunks of texto
> within the document. A shared varfont would then, upon tweaking of
> its design space coordiantes, affect all portions of the document
> where it was used.

This would probably require a pop-up dialog to edit (or duplicate) an
entry in the font-style drop-down menu. We'll need to set up signals so
that all text/tspan elements are updated whenever an entry is modified.

sounds good
 

> Finally, and this is not a varfont specific issue, I feel the urge to
> improve the basic text support in Inkscape in general. Yes, I know
> this is a somewhat vague statement. The overall direction I'd like to
> follow, though, would likely be something similar to the insightful
> ideas that are expressed in this article:

This might be something for GTK as more than just Inkscape could use
such a dialog.

I agree! But it could be prototyped in Inkscape and then later factored out if we like the result and decide to promote it upstream on GTK. Having a real and well-accepted use case in Inkscape would be good to support the inclusion of it on gtk.
 
GTK 3 does have a font-family dialog that we do not use
at the moment:

https://developer.gnome.org/gtk3/stable/GtkFontChooserDialog.html


Do you consider this one better then our current font selection UI?
 
> https://medium.com/@getflourish/the-anatomy-of-a-thousand-typefaces-
> f7b9088eed1


Tav

> cheers,
> Felipe Sanches