Comments (5)
Hi, as I ran into the same problem, I found a workaround (that does not quite address your use case with inkscape)
Convert the font as you did (well, I used the woff2_decompress
debian package but that should not make a difference) and put it somewhere the system finds (I use ~/.local/share/fonts/
)
Then add the following to a config file that fontconfig finds (I use ~/.config/fontconfig/conf.d/virgil.conf
)
Inkscape seems to still not pick it up, but conversion to PDF via cairosvg does work, and inkscape can then import that pdf corectly …
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family" qual="any" >
<string>Virgil</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Virgil 3 YOFF</string>
</edit>
</match>
</fontconfig>
from virgil.
Same here. There are multiple problems here.
- Excalidraw exports SVGs using a font
Virgil
but the provided font calls itselfVirgil 3 YOFF
. - I Installed the provided Virgil font
Virgil 3 YOFF
butfc-match
refused to find it. -> Inkscape fails to render it properly. - For emojis, Excalidraw uses
Segoe UI Emoji
what is a proprietary Microsoft font not present on non-MS systems (an open-source alternative isNoto Color Emoji
).
2.2) Apparently, Inkscape -- at least on Linux -- is not capable of rendering text-emojis at all.
So, it all depends on what one wants to do with the file.
- If you want to use it in Inkscape with editable text, you can do a simple text replacement (
Virgil
->Virgil 3 YOFF
) within the SVG file. Then it renders correctly within Inkscape for me. With emojis you appear to be out of luck here. - If you want to just get a vector graphic, Firefox renders the SVG fine (in fact, browsers are the only programs I tried that do render this correctly). From your Browser, you can print it as PDF. As this is most likely not the correct size (a4 or letter), you can cut it with your program of choice (e.g.
briss
,inkscape
, ... [for Inkscape you have to choose "Poppler/Cairo import" to convert the text to paths]). It's a hassle but at least now I have my EPS file.
from virgil.
Another workaround (on Debian / Linux): open the ttf file generated by woff2_decompress
with fontforge
and select Element -> Font Info..
from the menu. Replace font name with "Virgil" and generate a new ttf file via File -> Generate Fonts...
.
from virgil.
Hi, as I ran into the same problem, I found a workaround (that does not quite address your use case with inkscape)
Convert the font as you did (well, I used the
woff2_decompress
debian package but that should not make a difference) and put it somewhere the system finds (I use~/.local/share/fonts/
)
I confirm that it needs to be in something else than .woff2
for Inkscape to accept the font: even though fc-match 'Virgil 3 YOFF'
does return Virgil.woff2: "Virgil 3 YOFF" "Regular"
we can't use it in Inkscape.
Then add the following to a config file that fontconfig finds (I use
~/.config/fontconfig/conf.d/virgil.conf
)
Note here: it seems that I needed the config file to be prefixed by a number to be honored:
% cd ~/.config/fontconfig/conf.d
% ls
virgil.conf
% sudo -E strace -u $USER -f -e openat fc-match Virgil|& grep virgil.conf
% mv virgil.conf 01-virgil.conf
% sudo -E strace -u $USER -f -e openat fc-match Virgil|& grep virgil.conf
openat(AT_FDCWD, "/home/ux/.config/fontconfig/conf.d/01-virgil.conf", O_RDONLY|O_CLOEXEC) = 5
Also, it's interesting that fc-match Virgil
doesn't indeed match Virgil 3 YOFF
by default and we need that configuration.
Inkscape seems to still not pick it up, but conversion to PDF via cairosvg does work, and inkscape can then import that pdf corectly …
The excalidraw SVG contains this: font-family="Virgil, Segoe UI Emoji"
, and the emoji fallback is the problematic one. Here is how it behaves with fontconfig on my machine:
% fc-match "Virgil"
Virgil.ttf: "Virgil 3 YOFF" "Regular"
% fc-match "Virgil, Segoe UI Emoji"
NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"
If I do uninstall noto emoji though:
% fc-match "Virgil, Segoe UI Emoji"
Virgil.ttf: "Virgil 3 YOFF" "Regular"
And finally here it works for me in Inkscape. Alternatively, removing the Segoe references in the Excalidraw SVG also works. Note that whether you specify Virgil
before or after Segoe UI Emoji
doesn't help with the priority selection. Also, even specifying explicitly Virgil 3 YOFF
doesn't help (so this is not an issue with the fontconfig file you proposed).
To summarize, here is a summary of the multiple issues we have:
- Inkscape: missing external and embedded font support: https://gitlab.com/inkscape/inbox/-/issues/301
- Inkscape: could add support for woff2 format
- Inkscape: I think Inkscape should not pass-through the
font-family
as-is to fontconfig and instead query one by one depending on the characters requested (or maybe fontconfig should honor the order but since it doesn't know the characters infc-match
I think it makes sense to use another heuristic, but I don't know) - Fontconfig: honestly,
Virgil
should matchVirgil 3 YOFF
, I don't know why it needs the exact string here - Excalidraw: should probably embed the font so we don't have to download it
- Excalidraw: the
Virgil 3 YOFF
should be namedVirgil
to avoid that kind of nasty matching issues
from virgil.
For people who want PDFs:
After you get your SVG with the font working:
- Open it in your browser (I used a chromium based one)
- Press Ctrl+P
- If not fitting properly:
a. Go toMore Settings
b. Changer paper size to A0
c. Remove margins
d. Decrease scale value till it fits - Save as PDF
- Later you can resize the PDF using other tools
from virgil.
Related Issues (20)
- Don't allow zoom on mobile
- Lowercase k too similar to uppercase K HOT 4
- Lowercase u and v are too similar HOT 1
- Number `7` looks like `1` HOT 1
- O's and 0's too close to each other HOT 7
- increase handwritten font number readability HOT 1
- Russian handwriting question HOT 12
- The new lowercase t is harder to read HOT 5
- /1 is harder to read with new Virgil
- Capital J looks too much like T HOT 2
- Angle brackets should be symmetrical HOT 2
- tilde should be vertically-centered HOT 3
- how to install it on Mac HOT 5
- Support for ligatures
- Could the Greek font be made Classics-friendly?
- Add ß to the display page (https://virgil.excalidraw.com/)
- Multiple underscores in a row HOT 1
- Sigma
- using with google slides HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virgil.