-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Custom fonts ignored when exporting #1604
Comments
I've found similar. Previously I was using Source Sans 3 via the "Google Fonts" option. Now that directly using Google Fonts isn't available in draw.io, I downloaded and installed Source Sans 3 and changed my diagram to use this font locally. Despite this (and despite uninstalling/reinstalling draw.io, as well as clicking on "Reset" in the fonts dropdown), I still get the same issue. I enabled the developer tools, and saw no errors in the console when I exported the png. Hope the above adds some additional context for triaging. (I half wonder if draw.io doesn't like fonts with numbers in the title!) |
As a further discovery: I have both Source Sans 3 and Source Sans Pro (which apparently is an older variant) installed. Using "Source Sans Pro", it exports correctly. Perhaps either the Newer Source Sans 3:
Hope this helps with triage. |
Somehow, this issue is only with "Source Sans 3"! |
I do not have more information I could provide here. I was just surprised myself that Google seems to have replaced the Pro with the 3 font as the first is not available on Google Fonts anymore (and its repository here says the same). So, the only thing which seems to be special about this case seems to be the replacement. And maybe they changed something about this font internally which Draw.io Desktop cannot handle for whatever reason. Remembering that even fonts do have meta data and more to them as it seems leaves some room for possible causes. We also might just ask them: https://github.com/adobe-fonts/source-sans |
Today I found that the old error of font color is also back ... AGAIN! :-D I post it here for the moment as I have seen it while using Source Sans 3 which seems to be making more issues aside from that as discussed above. But probably this is a general problem again, as we had it several times before. Yes, I am working using the Dark Mode enabled, so it might be related to that again. However, my text has the color FFFFFF (white) explicitly defined for it this time (no auto color). Draw.io Desktop version in questions is currently 24.4.8 ... and the font mentioned is still wether printed nor exported (PDF, for example); just to update the main topic here, too. |
It even seems it now replaces the color of the text inside the document when printing as my white text was black after the print out. However, text in other colors does seem to be not affected. |
Just tested again and still an issue in 24.4.13. Any news on this? I am asking because I need to know if I should completely reaplace the font or there is still hope to getting is usable for file export (PDF) ... ? |
Please attach a test case. |
I started an issues over at the GitHub of the Source Sans 3 repository to try to get information helpful to solve this issue. It can be found here: https://github.com/adobe-fonts/source-sans/issues/278 |
Not likely an issue with the fonts (that would be changed). Could be an issue with a number in the font name. If the issue is only with the OTF fonts, that could be because Adobe removed a particular name field from the CFF table in Source Sans 3, and in Source Serif 4 (and in Minion 3 if you have access to that). First try the TTF fonts and Source Serif 4. |
24.6.1 adds quotes to font family names. |
I can confirm, at least on my end, that 24.6.1 has solved the external font bug with exporting/printing a file. Thanks for the detailed ideas for testing I was about to do today, but I guess this makes the testing obsolete. ;-) However, now the issue with the black/white replacement is back (maybe also again in context with the dark theme) we had several times before. The difference between the dotted lines below is, that the correctly displayed white one has an explicitely set color of FFFFFF and the other is »automatic« (F0F0F0). |
I'll close this up as the original issue is solved for the original poster. If you have further issue(s), you are welcome to add a new issue per problem. |
Describe the bug
When exporting a Draw.io Desktop file into another format (PNG in my case) it does ignore custom fonts used in the drawing. I was using »Source Sans 3« from Adobe (free font; available from different locations online) and it is displayed correctly inside Draw.io Desktop. When I fo export the drawing, it is replaced by some default font instead.
HOWEVER, when ONLY inserting this font into an empty drawing, it is imported correctly! I have removed the layers I was using, but that did not solved it. The file is simple: rectangle with border and filling in the background. Over it, an icon I downloaded from Bootstrap Icons (current version 5.3, https://icons.getbootstrap.com/icons/person-fill/) as SVG. The icon was imported into Affinity Designer (vector editor) to change only its color and exported as SVG again. It then was imported into the existing Draw.io Desktop drawing. Finally, over the icon, I put a text box with the custom font. All looks fine, when exporting it, the font is lost and replaced by a default (or at least different) one (with or withou layers).
When exporting as PNG in Draw.io Desktop, I only unchecked to include the drawing (bottom setting).
This especially makes no sense since this is a pixel format; I would expect something like that in a vector format or PDF where the font might missing or something.
To Reproduce
Steps to reproduce the behavior:
(Included above and not making sense separately)
Expected behavior
Obvious.
Screenshots
Inside Draw.io Desktop:
Export as PNG result:
draw.io version (In the Help->About menu of the draw.io editor):
Desktop (please complete the following information):
Additional context
All included above, I guess ...
However, there seem to be several issues with exporting currently as the problems with changed colors for PDF exports I also can confirm. Maybe this is in context to that ... ?
The text was updated successfully, but these errors were encountered: