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

Merged
merged 4 commits into from Jun 30, 2018

Conversation

@ubruhin
Member

ubruhin commented Jun 25, 2018

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:
auswahl_004

Fixes #153.

@ubruhin ubruhin added this to the 0.1 milestone Jun 25, 2018

@ubruhin ubruhin self-assigned this Jun 25, 2018

@dbrgn

This comment has been minimized.

Show comment
Hide comment
@dbrgn

dbrgn Jun 26, 2018

Contributor

Can the bundled fonts be easily replaced with system fonts during packaging?

Contributor

dbrgn commented Jun 26, 2018

Can the bundled fonts be easily replaced with system fonts during packaging?

@ubruhin

This comment has been minimized.

Show comment
Hide comment
@ubruhin

ubruhin Jun 26, 2018

Member

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).

Member

ubruhin commented Jun 26, 2018

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();

This comment has been minimized.

@rnestler

rnestler Jun 27, 2018

Member

So Qt prefers the bundled fonts?

@rnestler

rnestler Jun 27, 2018

Member

So Qt prefers the bundled fonts?

This comment has been minimized.

@rnestler

rnestler Jun 27, 2018

Member

Ah I just noticed that we provide this method ourself.

@rnestler

rnestler Jun 27, 2018

Member

Ah I just noticed that we provide this method ourself.

This comment has been minimized.

@ubruhin

ubruhin Jun 27, 2018

Member

Right :) Qt itself doesn't really distinguish between bundled or system fonts...

@ubruhin

ubruhin Jun 27, 2018

Member

Right :) Qt itself doesn't really distinguish between bundled or system fonts...

@ubruhin ubruhin merged commit 527b815 into master Jun 30, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ubruhin ubruhin deleted the 153-bundle-schematic-fonts branch Jun 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment