1 --- fbterm-1.6/src/fbconfig.cpp.old 2010-01-16 18:38:19.000000000 +0100
2 +++ fbterm-1.6/src/fbconfig.cpp 2010-01-16 18:40:26.000000000 +0100
3 @@ -172,6 +172,8 @@ void Config::checkConfigFile(const s8 *n
4 "# and using a fixed width font as the first is strongly recommended\n"
7 + "# default language for fontconfig\n"
10 "# force font width, usually for non-fixed width fonts\n"
11 "# legal value format: n (fw_new = n), +n (fw_new = fw_old + n), -n (fw_new = fw_old - n)\n"
12 @@ -223,6 +225,7 @@ bool Config::parseArgs(s32 argc, s8 **ar
13 { "verbose", no_argument, 0, 'v' },
14 { "font-names", required_argument, 0, 'n' },
15 { "font-size", required_argument, 0, 's' },
16 + { "font-lang", required_argument, 0, 'l' },
17 { "color-foreground", required_argument, 0, 'f' },
18 { "color-background", required_argument, 0, 'b' },
19 { "text-encodings", required_argument, 0, 'e' },
20 @@ -238,7 +241,7 @@ bool Config::parseArgs(s32 argc, s8 **ar
24 - while ((index = getopt_long(argc, argv, "Vvhn:s:f:b:e:r:i:", options, 0)) != -1) {
25 + while ((index = getopt_long(argc, argv, "Vvhn:s:l:f:b:e:r:i:", options, 0)) != -1) {
28 printf("FbTerm version " VERSION "\n");
29 @@ -256,6 +259,7 @@ bool Config::parseArgs(s32 argc, s8 **ar
30 " -n, --font-names=TEXT specify font family names\n"
31 " -s, --font-size=NUM specify font pixel size\n"
32 " --font-width=NUM force font width\n"
33 + " -l, --font-lang=TEXT default language used by fontconfig\n"
34 " -f, --color-foreground=NUM specify foreground color\n"
35 " -b, --color-background=NUM specify background color\n"
36 " -e, --text-encodings=TEXT specify additional text encodings\n"
37 --- fbterm-1.6/src/font.cpp.old 2010-01-16 18:38:30.000000000 +0100
38 +++ fbterm-1.6/src/font.cpp 2010-01-16 18:38:48.000000000 +0100
39 @@ -48,7 +48,9 @@ Font *Font::createInstance()
44 Config::instance()->getOption("font-names", buf, sizeof(buf));
45 + Config::instance()->getOption("font-lang", lang, sizeof(lang));
47 FcPattern *pat = FcNameParse((FcChar8 *)(*buf ? buf : "mono"));
49 @@ -56,7 +58,7 @@ Font *Font::createInstance()
50 Config::instance()->getOption("font-size", pixel_size);
51 FcPatternAddDouble(pat, FC_PIXEL_SIZE, (double)pixel_size);
53 - FcPatternAddString(pat, FC_LANG, (FcChar8 *)"en");
54 + FcPatternAddString(pat, FC_LANG, (FcChar8 *)(*lang ? lang : "en"));
56 FcConfigSubstitute(NULL, pat, FcMatchPattern);
57 FcDefaultSubstitute(pat);