Dear Ivan
Thanks a lot.
I used:
windowsFonts(Helvetica = windowsFont("Helvetica"))
No warning now with Helvetica
Additionally I used "sans", similarly no warning in the first part.
But still not able to open tiff with both versions:
Using "stress" as default layout> dev.off()
TIFFOpen: figures/AES_network_bymembership.tiff: Cannot open.
RStudioGD
2
Warning message:
In dev.off() :
unable to open TIFF file 'figures/AES_network_bymembership.tiff'
Kind regards
Sibylle
-----Original Message-----
From: Ivan Krylov <ikrylov at disroot.org>
Sent: Monday, February 26, 2024 10:15 AM
To: SIBYLLE ST?CKLI via R-help <r-help at r-project.org>
Cc: sibylle.stoeckli at gmx.ch
Subject: Re: [R] igraph_vertex
? Mon, 26 Feb 2024 09:02:56 +0100
SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????:
> In the following code, which loads the tiff file, I get the following
> error
This warning is definitely worth investigating, but it shouldn't interrupt
your code. Does the figure come out wrong after you see this warning?
> In doTryCatch(return(expr), name, parentenv, handler) : Character set
> family not found in the Windows character set database
>
> --> I am unsure if mySQL is the right solution. I have no experience
> how to change mySQL.
I see you've tried to do the right thing and searched for the warning
message. Unfortunately, the search engines are wrong; this doesn't seem
related to MySQL.
A similarly-worded warning message exists in the Windows-related font functions
inside R:
>> warning(_("font family not found in Windows font database"))
If running a sufficiently new version of R, try Sys.setLanguage('en')
before reproducing the problem and searching for the exact warning message in
double quotes. (Reset it back using
Sys.setLanguage(your_language_code) or restart R afterwards.) Translated error
and warning messages are good for understanding, but they fragment the search
engine results.
I see that a few messages back you set a font family:
> vertex.label.family="Helvetica",
R probably doesn't know where to get it in order to render the plot as TIFF.
If you have a copy of Helvetica installed in your system, try registering it
using windowsFonts(Helvetica = windowsFont("how the font is named in the
system")). (See help(windowsFonts) for more
information.) Otherwise you may be limited to R's predefined font families.
It's annoying that "Helvetica" exists for PDF plots and such
seemingly without a problem, but if you change the output format to TIFF, the
set of fonts available to you changes too. Unfortunately, there are multiple
different font rendering engines in play, and their predefined lists of fonts
also differ.
--
Best regards,
Ivan