Skip to content

pangofc-fontmap: Fix check for variable font

Niels De Graef requested to merge nielsdg/fix-variable-font-check into main

FcPatternGetBool() queries for a given property and returns an FcResult to notify whether the property was found and if so (when the return value is FcResultMatch), stores the result in the given argument.

Before this commit, we were passing on the same variable for both the return value and the out argument. So when a variable font was encountered, the variable was set to TRUE by fontconfig, but was then overwritten with the return value FcResultMatch which is defined as 0, aka FALSE in C.

Fix this by using a different variable for the result and the actual value, and check that both match our expectations.

Merge request reports