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
Bundle fonts used in schematics together with LibrePCB #282
Conversation
Can the bundled fonts be easily replaced with system fonts during packaging? |
Yeah, actually one can just remove the fonts directory, then Qt automatically falls back to system fonts (fonts are recognized by their name, no matter if they are system fonts or bundled fonts). |
font.setStyleStrategy(QFont::StyleStrategy(QFont::OpenGLCompatible | QFont::PreferQuality)); | ||
font.setStyleHint(QFont::TypeWriter); | ||
font.setFamily("Monospace"); | ||
QFont font = qApp->getDefaultMonospaceFont(); |
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.
So Qt prefers the bundled fonts?
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.
Ah I just noticed that we provide this method ourself.
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.
Right :) Qt itself doesn't really distinguish between bundled or system fonts...
Offset no longer required due to new fonts.
77e8d3e
to
fb429c8
Compare
This makes LibrePCB using Noto Fonts for schematics. To ensure consistent look over all platforms, the fonts are bundled together with LibrePCB. So the look of schematics no longer depends on the available system fonts.
Preview:
Fixes #153.