[SOLVED] Ubuntu variable font can't be found and doesn't work in Inkscape

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

[SOLVED] Ubuntu variable font can't be found and doesn't work in Inkscape

Post by sebastjava »

I am using Inkscape version 1.2.2. I recently started using variable fonts.
  • In Inkscape menu, i go to Text > Text and font: I choose the Montserrat variable font.
  • There in this dialog box, i switch from some font weight to some other. i.e.: switch from normal to bold. Then a sliding cursor appears and i can choose any font weight i want, e.g.: 750.
  • I try to do the same with the Ubuntu font, but i never get that sliding cursor to appear.
Inkscape > Text > Text-and-font (click to enlarge)
Inkscape > Text > Text-and-font (click to enlarge)

On https://design.ubuntu.com/font they claim their font styles include a variable one.
The Ubuntu font family is a sans-serif typeface family available in 22 styles plus a variable font with adjustable weight and width axes.
I checked in /usr/share/fonts/truetype/ubuntu and i can't find any Ubuntu-VariableFont_wght.ttf in there. So i downloaded from https://design.ubuntu.com/font. Same thing. I guess they just removed the variable feature from the font pack and just did not update the info on their website yet. End of story. Case closed.

But there is one thing that is still puzzling me... On https://design.ubuntu.com/font there is a nice Ubuntu font tester and from there, i can get to choose any font weight i want, say 555, for example. So, obviously, THERE IS a Ubuntu-VariableFont_wght.ttf somewhere on some server on this planet. And it works! But i don't just want to look at it on my Firefox, i want to get it to work in Inkscape !?

Ubuntu font tester on website (click to enlarge)
Ubuntu font tester on website (click to enlarge)
Last edited by LockBot on Fri Jul 28, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Ubuntu variable font can't be found and doesn't work in Inkscape

Post by sebastjava »

Alternately, i would just need to insert a CSS link inside my SVG file to temporarily access the Ubuntu font server. Looking at the source code (HTML+CSS) on the Ubuntu font website, i guess i need this or something like this:

Code: Select all

@font-face{font-family:"Ubuntu variable";font-stretch:100%;font-style:normal;font-weight:100 800;src:url("https://assets.ubuntu.com/v1/f3b9cc97-Ubuntu[wdth,wght]-latin.woff2") format("woff2-variations")}
I want this inside my "nice-file.svg". Just for a few seconds, time to convert "one-single-word" to path... and then i don't need that font, for now. :)

I don't know if this is possible.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Ubuntu variable font can't be found and doesn't work in Inkscape

Post by sebastjava »

I managed to quickly build a small font-import.html with internal CSS:

Code: Select all

<!DOCTYPE html>
<html>
<head>
<style>
@font-face{font-family:"Ubuntu variable";font-stretch:100%;font-style:normal;font-weight:100 800;src:url("https://assets.ubuntu.com/v1/f3b9cc97-Ubuntu[wdth,wght]-latin.woff2") format("woff2-variations")}
h1   {color: blue; font-family: "Ubuntu variable"; font-weight:650; font-size: 144px;}
</style>
</head>
<body>

<h1>linuxmint</h1>

</body>
</html>
Try it ! Just copy-paste this into an empty font-import.html and save. Then open it in Firefox. See ? Now change the values for font-weight to anything in the 100-800 range. Save and refresh the Firefox page. See ? That's exactly what i need. The problem is... i want that in Inkscape ! I know it is possible to insert some CSS styles into an Inkscape SVG document. But i am not sure i could get my custom CSS to work in Inkscape. I just want to convert to path. In Inkscape or by any other means...

Or else, maybe convert this format("woff2-variations") to TTF ?
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: [SOLVED] Ubuntu variable font can't be found and doesn't work in Inkscape

Post by sebastjava »

Not really solved but i took another route, in Inkscape: Path > Path Effects: Offset. I get ultra-precise, custom adjustments from there. Operating on some text previously converted to path, using the Object to Path function.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
Locked

Return to “Software & Applications”