SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.55k stars 894 forks source link

Problem with fonts in the navigation bar. #7071

Closed retromaniak closed 6 months ago

retromaniak commented 1 year ago

Hi. I recently downloaded subtitle edit on archlinux from the AUR repositories. The problem is that the top navigation bar is just terribly unreadable. In the windows version I don't have this problem. What is the issue? Link to the screenshot below. Alt text

retromaniak commented 1 year ago

I tried to install the application via SNAP, however, the application did not start at all,and only threw the following errors:

[1] 22923
[retromaniak@animango ~]$ Warning: GTK2 does not support Wayland!
SE data folder is /home/retromaniak/snap/subtitle-edit/7/se_data
Could not set X locale modifiers
Gtk-Message: 07:27:05.266: Failed to load module "canberra-gtk-module"
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: The requested FontFamily could not be found [GDI+ status: FontFamilyNotFound]
  at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x001ce] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at System.Drawing.FontFamily..ctor (System.Drawing.Text.GenericFontFamilies genericFamily) [0x0004d] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.FontFamily..ctor(System.Drawing.Text.GenericFontFamilies)
  at System.Drawing.FontFamily.get_GenericSansSerif () [0x00000] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at System.Drawing.Font.CreateFont (System.String familyName, System.Single emSize, System.Drawing.FontStyle style, System.Drawing.GraphicsUnit unit, System.Byte charSet, System.Boolean isVertical) [0x00011] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at System.Drawing.Font..ctor (System.String familyName, System.Single emSize, System.Drawing.FontStyle style, System.Drawing.GraphicsUnit unit, System.Byte gdiCharSet, System.Boolean gdiVerticalFont) [0x00011] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at System.Drawing.Font..ctor (System.String familyName, System.Single emSize, System.String systemName) [0x00000] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Font..ctor(string,single,string)
  at System.Drawing.SystemFonts.get_DefaultFont () [0x00000] in <509ee10245254454ac9e4c812f7a6dba>:0 
  at System.Windows.Forms.Theme.get_DefaultFont () [0x0000a] in <69e4940ac30645898b9c63f67c310dba>:0 
  at System.Windows.Forms.Control.get_DefaultFont () [0x00005] in <69e4940ac30645898b9c63f67c310dba>:0 
  at System.Windows.Forms.Control.get_Font () [0x00028] in <69e4940ac30645898b9c63f67c310dba>:0 
  at System.Windows.Forms.Form..ctor () [0x00018] in <69e4940ac30645898b9c63f67c310dba>:0 
  at Nikse.SubtitleEdit.Forms.Main..ctor () [0x0013d] in <dd4d8381b3a849069794f762552a477b>:0 
  at (wrapper remoting-invoke-with-check) Nikse.SubtitleEdit.Forms.Main..ctor()
  at Nikse.SubtitleEdit.Program.Main () [0x00038] in <dd4d8381b3a849069794f762552a477b>:0 

I also tried to deduce what's wrong with the help of ChatGPT, however, this one says that I may have fonts that are under-installed, but I don't know much about what fonts are required for the program to work properly.

niksedk commented 1 year ago

Make sure that you have the font DejaVu Serif installed.

I can no longer test Linux :( Virtual Box just crashes...

retromaniak commented 1 year ago

Font installed, this message, on the other hand, I see in the terminal when starting the program with the command. The program installed from the AUR repositories.

retromaniak commented 1 year ago

dejavu serif installed too.

niksedk commented 1 year ago

Could you try a few different fonts in the tag SystemSubtitleFontNameOverride in the file Settings.xml ?

retromaniak commented 1 year ago

As soon as I get home I'll check it out. For now I'm at work I'll be at work in about 10 hours.

retromaniak commented 1 year ago

Could you try a few different fonts in the tag SystemSubtitleFontNameOverride in the file Settings.xml?

I tried to change the place you wrote about exactly this <SubtitleFontName> however all the time there is the same problem with the interface.

GrampaWildWilly commented 1 year ago

I think Nik means you to try this. With SE not running, update the Settings.xml file so that the line you have highlighted looks like this:

<SystemSubtitleFontNameOverride>a font name</SystemSubtitleFontNameOverride>

Then see what happens in SE. Then close SE again & update Settings.xml so that same line looks like this:

<SystemSubtitleFontNameOverride>a different font name</SystemSubtitleFontNameOverride>

Then try that in SE. Do this for a few diffferent font names. I would guess that when you're done with these experiments, you would restore that line in Settings.xml to its original state:

<SystemSubtitleFontNameOverride />

Of course, whenever you edit Settings.xml, SE must not be running.

GrampaWildWilly commented 1 year ago

Of course, when I say "a font name" you are not supposed to supply the value "a font name." Replace that with the name of an actual font. I must say I'm not too sure what font names to supply there. Arial? Tahoma? Courier New? Times New Roman? Those are names of fonts that I can think of off the top of my head. I'm assuming those are the values to try in that line in the Settings.xml file. If there's some special internal code name you're supposed to use instead of one of those names we all know, I don't know what that would be. So I think one example of what you should try is this:

<SystemSubtitleFontNameOverride>Arial</SystemSubtitleFontNameOverride>

Experiment. What's the worst that could happen? SE fails to launch? You can recover from that.

retromaniak commented 1 year ago

The program runs in each case, but the effect of modifying the XML file is missing.

<SystemSubtitleFontNameOverride>Arial</SystemSubtitleFontNameOverride>

I modified this line, however, the effect is lacking. Alternatively, if you are working on Linux and in you SE displays normally then maybe you could send me the contents of your XML?

DJXJD commented 7 months ago

I'm having the same issue, also having installed SE from that aur package. In case it makes any difference, I'm running hyprland, and SE is running under xwayland