How to change font style and size of subtitles in Celluloid?

How to change font family, font size, or even font color for subtitles in Celluloid? There are no relevant options in the settings (Preferences) like in VLC or Totem.


Celluloid has no point-and-click option in the settings to change the styling of subtitles (as of yet, maybe), but since it is a frontend for mpv, it can use mpv (command line) options, including those for subtitles:

Method 1: Put the options in Celluloid's Preferences

  • From this: Open Celluloid and go to PreferencesMiscellaneous tab.

  • Put the relevant subtitles options in the Extra MPV options box (if there are more than one option, separate each one with a space). For example:

    --sub-font=Tahoma --sub-font-size=48 --sub-color=1.0/1.0/0.0
    

    This sets the default font to Tahoma, font size to 48 (against a window height of 720), font color to yellow (255,255,0).

  • Hit Save and restart Celluloid.

This method is pretty fast and convenient, but it has a major drawback: it will not apply the options containing quotation marks (" or '), which are required for font types with spaces in their names or for using color value in hex form (which is way easier than having to convert RGB 0-255 to RGB 0.0-1.0). For example, this line will not be applied:

--sub-font='Comic Sans MS' --sub-color='#FFFF00'

That brings us to the 2nd method.

Method 2: Load an external config file into Celluloid

  • Create a file named mpv.conf in ~/Documents or wherever (or in ~/.config/mpv/ if also using mpv separately)

  • Put the relevant options into the file, without the double dash (--). For example:

    # Font type
    sub-font='Comic Sans MS'
    # Font size
    sub-font-size=48
    # Font color
    sub-color='#FFFF00'
    # Font format  
    sub-bold=yes
    sub-italic=no
    # Text background/box (black with 75% alpha) 
    sub-back-color='#C0000000'
    
  • Save the file.

  • Open Celluloid and go to PreferencesConfig Files tab.

  • Check Load MPV configuration file and browse to the mpv.conf file just created.

  • Hit Save and restart Celluloid.

Note: If both the config file and the Extra MPV options box are used, options in the box will take priority. For example, if there are --sub-font=Tahoma and sub-font='Comic Sans MS', the font will be Tahoma.

With the power of mpv, one can even set custom keyboard shortcuts for subtitles. For example, to set key bindings for changing the sub font size and text background size:

  • Create a file named input.conf in ~/Documents or wherever (or in ~/.config/mpv/ if also using mpv separately)

  • Put these lines in the file (based on this):

    # Increase sub font size (set to [Alt] + [k])
    ALT+k add sub-font-size +1
    # Decrease sub font size (set to [Alt] + [j])
    ALT+j add sub-font-size -1 
    # Increase sub text background size (set to [Alt] + [.])
    ALT+. add sub-shadow-offset +1
    # Increase sub text background size (set to [Alt] + [,])
    ALT+, add sub-shadow-offset -1
    
  • Save the file.

  • Open Celluloid and go to PreferencesConfig Files tab.

  • Check Load MPV input configuration file and browse to the input.conf file just created.

  • Hit Save and restart Celluloid.