Weak font name check
Description
Current behavior: KiCad compares font names using a very weak string comparison, so I get misleading warnings.
I get: Warning: Font 'Archivo SemiBold' not found; substituting 'Archivo:SemiBold'
This is the same font! Installed using the same TTF file, just two different systems.
Note that on my system if I run fc-list
I get /home/user/.fonts/Archivo-SemiBold.ttf: Archivo,Archivo SemiBold:style=SemiBold,Regular
Here the name is Archivo SemiBold
not Archivo:SemiBold
as KiCad says.
Steps to reproduce
- Install the Archivo SemiBold font on Linux (I used Debian 11). The font can be downloaded from here
- Load the following PCB example
- You get the misleading warning
KiCad Version
Application: KiCad
Version: 7.0.1.1-36-gbcf78dbe24-dirty-deb11, release build
Libraries:
wxWidgets 3.0.5
FreeType 2.10.4
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3
Platform: , 64 bit, Little endian, wxGTK, ,
Build Info:
Date: Mar 12 2023 16:40:58
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.1
Curl: 7.74.0
ngspice: 34
Compiler: GCC 10.2.1 with C++ ABI 1014
Build settings:
KICAD_SPICE=ON