# HG changeset patch # User faust3 # Date 1098132066 0 # Node ID 59bb11213d11fd3da86abd8c408880c2cf4abc97 # Parent dc1facd7c7b0763fcc436be534672155e48b56e0 correctly display the commas of most hebrew subtitles on the left side of the sentence with fribidi, make the old behaviour optional patch by Shachar Raindel gmail.com> diff -r dc1facd7c7b0 -r 59bb11213d11 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Mon Oct 18 20:30:07 2004 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Oct 18 20:41:06 2004 +0000 @@ -1290,6 +1290,11 @@ Turns on flipping subtitles using FriBiDi. . .TP +.B \-noflip-hebrew-commas +Change FriBiDi's assumptions about the placements of commas in subtitles. +Use this if commas in subtitles are shown at the start of a sentence +instead of at the end. +.TP .B \-font (OSD only) Search for the OSD/\:SUB fonts in an alternative directory (default for normal fonts: ~/\:.mplayer/\:font/\:font.desc, default for FreeType fonts: diff -r dc1facd7c7b0 -r 59bb11213d11 cfg-common.h --- a/cfg-common.h Mon Oct 18 20:30:07 2004 +0000 +++ b/cfg-common.h Mon Oct 18 20:41:06 2004 +0000 @@ -219,10 +219,14 @@ {"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"flip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"noflip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL}, #else {"fribidi-charset", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"flip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif #ifdef USE_ICONV {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL}, diff -r dc1facd7c7b0 -r 59bb11213d11 subreader.c --- a/subreader.c Mon Oct 18 20:30:07 2004 +0000 +++ b/subreader.c Mon Oct 18 20:41:06 2004 +0000 @@ -33,6 +33,7 @@ #include char *fribidi_charset = NULL; int flip_hebrew = 1; +int fribidi_flip_commas = 0; #endif extern char* dvdsub_lang; @@ -1208,7 +1209,7 @@ break; } len = fribidi_charset_to_unicode (char_set_num, ip, len, logical); - base = FRIBIDI_TYPE_ON; + base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L; log2vis = fribidi_log2vis (logical, len, &base, /* output */ visual, NULL, NULL, NULL); diff -r dc1facd7c7b0 -r 59bb11213d11 subreader.h --- a/subreader.h Mon Oct 18 20:30:07 2004 +0000 +++ b/subreader.h Mon Oct 18 20:41:06 2004 +0000 @@ -59,6 +59,12 @@ int sub_errs; } sub_data; +#ifdef USE_FRIBIDI +extern char *fribidi_charset; +extern int flip_hebrew; +extern int fribidi_flip_commas; +#endif + sub_data* sub_read_file (char *filename, float pts); subtitle* subcp_recode1 (subtitle *sub); // enca_fd is the file enca uses to determine the codepage.