Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Felipe Sanches-2
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.

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.

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. 

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:


cheers,
Felipe Sanches

2018-03-06 11:27 GMT-03:00 Pathum Egodawatta <[hidden email]>:
Hi Filipe!

Hope you are doing well. Thanks for taking this on! would be aweosme to have the VF support.

Whats new in this? I would love to know more about the UI interactions and tooltips.

Cheers,
Pathum

On Tuesday, May 30, 2017 at 1:18:41 AM UTC+5:30, Felipe Sanches wrote:
I'm working on implementing Opentype Variable fonts support in Inkscape (based on a mix of pango and harfbuzz APIs).

While testing the current pango-based text handling implementation in Inkscape I tried to edit some arabic text (with several ligatures, naturally) and I ended up finding a crasher bug. I have just reported it at:

https://bugs.launchpad.net/inkscape/+bug/1694323

I'll be using this thread to liberally report ongoing progress on this effort.

happy hacking,
Felipe Sanches

--
You received this message because you are subscribed to the Google Groups "Google Fonts Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/googlefonts-discuss.
To view this discussion on the web visit https://groups.google.com/d/msgid/googlefonts-discuss/89f8f75b-071b-4c26-85f5-5232780a9d0d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Tavmjong Bah
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).

> 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

> 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.

> 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. GTK 3 does have a font-family dialog that we do not use
at the moment:

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

> https://medium.com/@getflourish/the-anatomy-of-a-thousand-typefaces-
> f7b9088eed1


Tav

> cheers,
> Felipe Sanches


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Felipe Sanches-2


2018-03-06 16:02 GMT-03:00 Tavmjong Bah <[hidden email]>:
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



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Felipe Sanches-2


2018-03-06 17:49 GMT-03:00 Khaled Hosny <[hidden email]>:
FreeType/FontConfig/Cairo/Pango stack has more or less full variable
fonts support now, Inkscape needs to be updated to make use of the
support already available in all these libraries.

https://blogs.gnome.org/mclasen/2018/01/03/more-fun-with-fonts/

Wow! This is super cool!

I specially loved the CSS animation of the weight of the text when the cursor hovers over a button. 

This seems to replace Tav's opentype features selector via a GTK font-selector dialog. It also seems that we could have the innitial variable fonts support in inkscape basically hooking up to this newly improved GTK dialog. Naturally, that would require Inkscape to rely on a pretty recent version of GTK.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Felipe Sanches-2
Today I learnt about Mesonbuild and was impressed by this demo of it building gtk+ form git as well as all its main dependencies (also from git). This make life much much easier for setting up a bleeding-edge gtk+ development environment where all this new variable font stuff is available.

https://www.youtube.com/watch?v=2dB80CjH_3Q

Build progressed quite nicely up until (ironically), pango/fonts.c with an undeclared symbol related to EMOJI :-D



2018-03-06 18:15 GMT-03:00 Felipe Sanches <[hidden email]>:


2018-03-06 17:49 GMT-03:00 Khaled Hosny <[hidden email]>:
FreeType/FontConfig/Cairo/Pango stack has more or less full variable
fonts support now, Inkscape needs to be updated to make use of the
support already available in all these libraries.

https://blogs.gnome.org/mclasen/2018/01/03/more-fun-with-fonts/

Wow! This is super cool!

I specially loved the CSS animation of the weight of the text when the cursor hovers over a button. 

This seems to replace Tav's opentype features selector via a GTK font-selector dialog. It also seems that we could have the innitial variable fonts support in inkscape basically hooking up to this newly improved GTK dialog. Naturally, that would require Inkscape to rely on a pretty recent version of GTK.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

=?UTF-8?Q?Captura_de_Tela_2018=2D03=2D07_a=CC=80s_00=2E55=2E59=2Epng?= (707K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [googlefonts-discuss] Re: Variable Fonts support in Inkscape

Felipe Sanches-2
Tav, you asked me other day wether pango provides methods for setting up font variation coordinates in a design space.

Looking at the git commit logs, I can see that such API was introduced last Sept 5th, 2017 by Matthias Clasen 



2018-03-07 1:20 GMT-03:00 Felipe Sanches <[hidden email]>:
Today I learnt about Mesonbuild and was impressed by this demo of it building gtk+ form git as well as all its main dependencies (also from git). This make life much much easier for setting up a bleeding-edge gtk+ development environment where all this new variable font stuff is available.

https://www.youtube.com/watch?v=2dB80CjH_3Q

Build progressed quite nicely up until (ironically), pango/fonts.c with an undeclared symbol related to EMOJI :-D



2018-03-06 18:15 GMT-03:00 Felipe Sanches <[hidden email]>:


2018-03-06 17:49 GMT-03:00 Khaled Hosny <[hidden email]>:
FreeType/FontConfig/Cairo/Pango stack has more or less full variable
fonts support now, Inkscape needs to be updated to make use of the
support already available in all these libraries.

https://blogs.gnome.org/mclasen/2018/01/03/more-fun-with-fonts/

Wow! This is super cool!

I specially loved the CSS animation of the weight of the text when the cursor hovers over a button. 

This seems to replace Tav's opentype features selector via a GTK font-selector dialog. It also seems that we could have the innitial variable fonts support in inkscape basically hooking up to this newly improved GTK dialog. Naturally, that would require Inkscape to rely on a pretty recent version of GTK.





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

=?UTF-8?Q?Captura_de_Tela_2018=2D03=2D07_a=CC=80s_01=2E08=2E16=2Epng?= (162K) Download Attachment
=?UTF-8?Q?Captura_de_Tela_2018=2D03=2D07_a=CC=80s_01=2E08=2E55=2Epng?= (180K) Download Attachment