-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fontscan: add function to return all matched font locations #129
Conversation
Hi @akiyosi and thank you for this contribution. Out of curiosity, could you elaborate on why you need such function, and what is the use case you would like to support ? |
@benoitkugler I am creating a GUI application in Go using Go Qt binding. The reason for the slow startup of the Qt application on Windows was that it took time to load a large number of installed fonts when building the font database called QFontDatabase. In addition, the process of building the QFontDatabase seemed unavoidable when using QFont, a common interface used by Qt applications to render text. Further investigation revealed that the QFontDatabase construction process could be avoided by using QRawFont. |
That is very interesting, thank you for the details. I would like to point down two features you won't use with this approach :
Is it intentional? |
@benoitkugler I am considering a mechanism whereby the application-side logic loads the appropriate font based on the font file filename obtained from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good addition overall, thank you !
I've added two suggestions for better consistency with the existing FindSystemFont
.
5a8e365
to
e980ef8
Compare
@benoitkugler |
@whereswaldon |
I wanted to get all of the font locations that matched a given font family.
This PR adds such a function.