Add "no font mapper" switch to LoadFont()
Posted: Tue Nov 04, 2014 6:42 am
I remain surprised that there is not a FontExists(FontName$) command in PureBasic.
It seems much less efficient to load a font and then test for a load failure to learn if a font is on the computer.
But no, it seems that PureBasic has its own special way of handling fonts by using something called a "font mapper".
This functionality prevents the use of the IsFont(#font) command to test for a font's successful loading.
For Windows® there is a hack to provide a FontExists() equivalent in PureBasic, but I know not a replacement for FontExists() in Linux.
Obviously by using such a command, the undesirable font mapping could be prevented.
When dealing with computers I am used to logical events, and asking for one font and getting another does not seem very logical.
Using PureBasic, when I instruct the computer to load "Random Font", there is no positive way to ascertain that the font was loaded or not loaded... or even what was loaded.
WTF?
Specific fonts can be an important part of many computer programs.
In my opinion this "font mapper" is not even a halfway good implementation of a questionable idea, because the replacement font is not well mapped in Linux. I can expand on the deficiencies if needed.
Without success, I looked at the LoadFont() command return codes to see if I could detect when the font mapper was invoked so I could use that information to adjust the program.
Please allow a switch into LoadFont() command to shut the font mapping off.
This would allow the IsFont() check to be used to detect if there is a need for a fallback font.
And/Or
Add the FontExists(FontName$) command.
This would allow Linux programs to have needed functionality.
It seems much less efficient to load a font and then test for a load failure to learn if a font is on the computer.
But no, it seems that PureBasic has its own special way of handling fonts by using something called a "font mapper".
This functionality prevents the use of the IsFont(#font) command to test for a font's successful loading.
For Windows® there is a hack to provide a FontExists() equivalent in PureBasic, but I know not a replacement for FontExists() in Linux.
Obviously by using such a command, the undesirable font mapping could be prevented.
When dealing with computers I am used to logical events, and asking for one font and getting another does not seem very logical.
Using PureBasic, when I instruct the computer to load "Random Font", there is no positive way to ascertain that the font was loaded or not loaded... or even what was loaded.
WTF?
Specific fonts can be an important part of many computer programs.
In my opinion this "font mapper" is not even a halfway good implementation of a questionable idea, because the replacement font is not well mapped in Linux. I can expand on the deficiencies if needed.
Without success, I looked at the LoadFont() command return codes to see if I could detect when the font mapper was invoked so I could use that information to adjust the program.
Please allow a switch into LoadFont() command to shut the font mapping off.
This would allow the IsFont() check to be used to detect if there is a need for a fallback font.
And/Or
Add the FontExists(FontName$) command.
This would allow Linux programs to have needed functionality.