Skip to content
Snippets Groups Projects
Commit 7c47d44d authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Add bold subtitles option

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