I thought how will Pango render Wingdings
font and tried using it directly but it wasn’t loaded directly in the pangocairo’s win32 font backend. So, I started some kind of checking to find why Pango can’t access it. First I wrote a C program to find the list of fonts, I got this idea some from the mailing list Pango: Issues with illegal characters in family names (encoding problems
I wrote a C program using that,
#include <pango/pangocairo.h>
int main()
{
PangoFontMap *fontmap = pango_cairo_font_map_new();
int n_families=0;
PangoFontFamily** families=NULL;
pango_font_map_list_families(
fontmap,
&families,
&n_families
);
int i;
for( i = 0; i< n_families; i = i + 1 ){
printf("%s\n", pango_font_family_get_name(families[i]));
}
g_free(families);
g_object_unref(fontmap);
return 0;
}
That can be compiled using gcc test.c $(pkg-config --cflags --libs pangocairo)
I redirected the output it displayed to win32.txt
Next, I rest set PANGOCAIRO_BACKEND
env var and run the same program again
export PANGOCAIRO_BACKEND=fc
./a > fc.txt
this time redirected to fc.txt
For comparing the two file I wrote a small python program.
with open('win32.txt') as f:
win32=[i.strip() for i in f.readlines()]
with open('fc.txt') as f:
fc=[i.strip() for i in f.readlines()]
print("Fonts in win32 backend but not in Fontconfig Backend")
for i in list(set(win32)-set(fc)):
print(i)
print('\n\n')
print("Fonts in Fontconfig backend but not in win32 Backend")
for i in list(set(fc)-set(win32)):
print(i)
The output the python program displayed was
Fonts in win32 backend but not in Fontconfig Backend
Lato Black
Arial Narrow
Segoe UI Semilight
Calibri Light
Segoe UI Light
Fira Code Medium
Bodoni MT Poster Compressed
Fantasy
Poppins SemiBold
Segoe UI Semibold
Texturina Medium
Bodoni MT Condensed
Source Code Pro Black
Roboto Thin
Source Sans Pro Semibold
Bodoni MT Black
Arial Black
Fira Code Retina
Source Sans Pro Black
Fonts in Fontconfig backend but not in win32 Backend
Marlett
Fira Code
Wingdings 2
MS Outlook
MT Extra
Webdings
Symbol
Wingdings
Poppins
Wingdings 3
MS Reference Specialty
Bookshelf Symbol 7
Texturina
which made me wonder, why Webdings
font isn’t accessible via win32 backend but is accessible via fontconfig backend? Am I missing something or is it a bug?