Commit 7c47d44d authored by Geoffrey Métais's avatar Geoffrey Métais

Add bold subtitles option

parent 417c3ad0
......@@ -337,6 +337,7 @@
<string name="subtitles_color_yellow">Yellow</string>
<string name="subtitles_color_green">Green</string>
<string name="subtitles_background_title">Subtitles Background</string>
<string name="subtitles_bold_title">Bold subtitles</string>
<string name="audio_prefs_category">Audio</string>
<string name="lockscreen_cover_title">Media cover on Lockscreen</string>
......
......@@ -22,6 +22,10 @@
android:defaultValue="false"
android:key="subtitles_background"
android:title="@string/subtitles_background_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="subtitles_bold"
android:title="@string/subtitles_bold_title" />
<android.support.v14.preference.MultiSelectListPreference
android:dialogTitle="@string/preferences_languages_download"
android:entries="@array/language_entries"
......
......@@ -57,6 +57,7 @@ public class PreferencesSubtitles extends BasePreferenceFragment implements Shar
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key){
case "subtitles_size":
case "subtitles_bold":
case "subtitles_color":
case "subtitles_background":
case "subtitle_text_encoding":
......
......@@ -61,6 +61,7 @@ public class PreferencesSubtitles extends BasePreferenceFragment implements Shar
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key){
case "subtitles_size":
case "subtitles_bold":
case "subtitles_color":
case "subtitles_background":
case "subtitle_text_encoding":
......
......@@ -78,6 +78,7 @@ public class VLCOptions {
networkCaching = 0;
final String freetypeRelFontsize = pref.getString("subtitles_size", "16");
final boolean freetypeBold = pref.getBoolean("subtitles_bold", false);
final String freetypeColor = pref.getString("subtitles_color", "16777215");
final boolean freetypeBackground = pref.getBoolean("subtitles_background", false);
final int opengl = Integer.parseInt(pref.getString("opengl", "-1"));
......@@ -102,6 +103,8 @@ public class VLCOptions {
options.add(getResampler());
options.add("--freetype-rel-fontsize=" + freetypeRelFontsize);
if (freetypeBold)
options.add("--freetype-bold");
options.add("--freetype-color=" + freetypeColor);
if (freetypeBackground)
options.add("--freetype-background-opacity=128");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment