Cuperino / QPrompt-Teleprompter

Teleprompter software for all video creators. Built with ease of use, productivity, control accuracy, and smooth performance in mind.
https://qprompt.app
GNU General Public License v3.0
355 stars 22 forks source link

Edited fonts not displaying properly #193

Closed videosmith closed 9 months ago

videosmith commented 1 year ago

Bug Description Edited TTF fonts do not display correctly in Qprompt

Steps to Reproduce

  1. In an attempt to create a workaround to display All Caps, I duplicated/edited the dejavu sans font family in FontForge by copying all uppercase glyphs into their corresponding lower case positions.
  2. Opened Qprompt, Welcome text.
  3. Selected the first paragraph and then selected modified font (see pic)
  4. No apparent change with the modified font, other selected fonts display as expected.
  5. Copy the selected text in Qprompt after attempting to change font, pasted in LibreOffice Writer, font displays as expected (see pic)
  6. Edited fonts attached.

Expected behavior Operation should perform the same in Qprompt as Writer.

Screenshots (optional) pic1 screen

Device information

fonts.zip

Cuperino commented 1 year ago

Hi @videosmith,

The reason that won't work with any of the following fonts:

is because these fonts are embedded into and loaded from QPrompt's binary executable, instead of loaded from the operating systems' fonts. This was done this way on purpose because embedding fonts into the binary is the only way one can provide access to a consistent set of fonts across all platforms, including platforms which provide no access to system fonts, such as: Android, iOS, and WASM.

While it should be possible to modify the CMakeLists.txt build scripts to use the embedded fonts for Android, iOS, WASM, and Haiku, but not on Windows, Mac, Linux, and FreeBSD, this is something I'd rather avoid because if I allow system fonts to be used for these fonts, I'd be opening the doors to the possibility of inconsistent prompting experiences from one operating system to the next, because of the differences present in variations of the fonts, or when a font that is expected cannot be found.

What I'm trying to say is that it’s not a bug, it’s a feature.

Cuperino commented 1 year ago

Re-opening. I just realized the fonts are showing under a different name, meaning they should load despite the original still being impossible to override without recompilation. I need to look into why the caps did not display despite the variation having a different name.

videosmith commented 1 year ago

Could be some changes I neglected to make when editing copies of the font files. At any rate, I've worked around the issue for myself by repeating the above process with another in my system fonts instead of your embedded ones, then changing the Qprompt script to the other one.

Appears to display as expected.

screen