# Setting font in VLC (QT5)



## MarcoB (Mar 21, 2015)

Hi,

VLC started using the qt5 toolkit recently. Does anyone know how to change the interface settings, especially the font size?

Regards,
Marco


----------



## roper (Mar 27, 2015)

I noticed some tiny fonts and toggled a couple things after updating VLC the other day. I'm using Xfce. VLC>>Settings>> checked Use native style and Forced window style to GTK+. It picked up my fonts and looks xfce-dusk pretty now.


----------



## MarcoB (Mar 27, 2015)

I'm using Fluxbox as window manager. In VLC I can't force the window style to GTK+, there's no such option. There's only Windows, Fusion and System's default. But these have no effect on the font used in VLC/Qt5.


----------



## tobik@ (Mar 27, 2015)

This works for me with x11-wm/i3:

Add 
	
	



```
export QT_STYLE_OVERRIDE=gtk
```
 to your ~/.xsession or ~/.xinitrc to make any Qt application look like a GTK+ application. 
Then add to or create ~/.kde4/share/config/kdeglobals with:

```
[General]
font=Cantarell,16,-1,5,50,0,0,0,0,0
```
The first entry is the font to use and the second entry is the font size.

Step 2 might only be necessary for me, because I am using x11-themes/gtk-oxygen-engine.


----------



## MarcoB (Mar 27, 2015)

#1: This indeed changes the style to gtk, which is nice, but not the font or fontsize.
#2: I don't have a ~/.kde4 directory, but I'll install gtk-oxygen-engine and see what happens.

Edit: Installing the gtk-oxygen-engine doesn't make a difference either.


----------



## protocelt (Mar 27, 2015)

MarcoB said:


> #2: I don't have a ~/.kde4 directory, but I'll install gtk-oxygen-engine and see what happens.


Right, you have to create the directory if it doesn't exist and the file in it.


----------



## MarcoB (Mar 27, 2015)

Added the directory and file but no luck.


----------



## tobik@ (Mar 27, 2015)

You installed x11-themes/gtk-oxygen-engine, but it is a little unclear to me if you have tried changing your GTK+ theme to oxygen-gtk?

I've attached a screenshot just as "proof" that it does work here.


----------



## MarcoB (Mar 27, 2015)

Yes I changed the gtk theme to oxygen-gtk. Don't know why it didn't work, all those things don't have any effect. Perhaps more KDE stuff should be installed.

Anyway I ended up building VLC with the ncurses interface and I'll figure out the Qt5 later. Thanks for all the help though.


----------



## tobik@ (Mar 28, 2015)

There is a new port which allows you to set Qt 5's theme, fonts, etc. that might work for you: misc/qt5ct


----------



## MarcoB (Mar 28, 2015)

I'll try this one out. Thanks for the pointer!


----------



## roper (Mar 30, 2015)

I upgraded and ran into the same thing yesterday. I tried a number of things but ended up doing a port build with QT4 instead of QT5. Did you find a solution?


----------



## MarcoB (Mar 30, 2015)

Eventually I didn't find a solution. I tried the misc/qt5ct tool first but that actually didn't do anything, so I installed vlc with the ncurses interface. Later I saw that the Qt4 option was reintroduced so ended up building it with the Qt4 interface again too.


----------



## tobik@ (Mar 30, 2015)

Seeing as my solution with kdeglobals is probably only incidental and I am interested in having this work, I tried misc/qt5ct myself now. It works, but you need to add 

```
export QT_QPA_PLATFORMTHEME=qt5ct
unset QT_STYLE_OVERRIDE
```
to ~/.xinitrc or ~/.xsession.

If you change any settings, you need to restart your Qt 5 apps for to see any results.


----------



## MarcoB (Mar 30, 2015)

I'll just stick to Qt4 for now. Also because there are some more Qt4 applications on my system, vlc would be the only Qt5 one.


----------

