kkartaltepe / obs-text-pango

Text Source using Pango for OBS Studio
GNU General Public License v2.0
49 stars 16 forks source link

Bug: Incorrect Font Is Used #21

Open mattcalabrese opened 2 years ago

mattcalabrese commented 2 years ago

When selecting a font, the correct font is used when showing the name of the font, however, the preview and actual font rendered for the source are incorrect (Note, too, that the built-in text source works fine).

incorrect font

kkartaltepe commented 2 years ago

You would need to provide more information such as what OS this is on, preferably a log from obs, it seems it may be windows where you could install fonts in places that cannot be found by pango.

Do note that I don't have the means to cut a new release depsite some bug fixes in the past year so its unlikely ill cut another release if this is actually a bug.

mattcalabrese commented 2 years ago

Thanks for the quick reply. The way I installed the fonts is through the built-in windows context menu option so I'm surprised there is an issue. As-in I download a font and right-click to select "install font". If I can figure out a workaround (such as just putting the font into some other directory) that'd be good enough for me even if you cannot cut a release. I'll dig into this a little here and get back to you with a log if it's not obvious what's going on.

kkartaltepe commented 2 years ago

https://github.com/kkartaltepe/obs-text-pango/blob/master/data/win32/fonts.conf#L26 these are the only directories used for the font search, if there are user specific font dirs they will be missed but this at least worked when i used windows where you needed administrative permissions to install fonts.

If you find the dir with your font you can add that dir to this file in the plugin's data dir where you installed it.

mattcalabrese commented 2 years ago

Some further investigation: When using the context menu to install, windows does seem to copy the fonts to "C:\Windows\Fonts", which is listed there. If I go to that directory I can see them, and they work with the built-in OBS text source and with other windows applications. So I am thoroughly confuse as to what's wrong.

However, your workaround did seem to fix it -- I copied the fonts to the fonts subdirectory of the plugin and now they work!

Attached directory listing for "C:\Windows\Fonts" with the fonts in there:

font-in-dir