== bugfix ==
authorAndrea Weikert <elubie@gmx.net>
Thu, 8 May 2008 20:55:16 +0000 (20:55 +0000)
committerAndrea Weikert <elubie@gmx.net>
Thu, 8 May 2008 20:55:16 +0000 (20:55 +0000)
fix for [#10284] Activate International font hiding text in bookmark window in image browser
- use same font handling for bookmarks as for the regular files.

source/blender/src/drawimasel.c

index 891bf488d17e8db0f829eb7467274432bc41bcfa..e93f7391e321131902bfb03e45dda2e89ce5edcd 100644 (file)
@@ -308,11 +308,33 @@ static void draw_imasel_bookmarks(ScrArea *sa, SpaceImaSel *simasel)
                                        BIF_ThemeColor(TH_TEXT);
                                }
                                ui_rasterpos_safe(sx, sy, simasel->aspect);
+
+                               /* handling of international fonts.
+                                       TODO: proper support for utf8 in languages different from ja_JP abd zh_CH
+                                       needs update of iconv in lib/windows to support getting the system language string
+                               */
+#ifdef WITH_ICONV
+                               {
+                                       struct LANGMenuEntry *lme;
+                                       lme = find_language(U.language);
+
+                                       if ((lme !=NULL) && (!strcmp(lme->code, "ja_JP") || 
+                                               !strcmp(lme->code, "zh_CN")))
+                                       {
+                                               BIF_RasterPos(sx, sy);
 #ifdef WIN32
-                               BIF_DrawString(simasel->curfont, sname, ((U.transopts & USER_TR_MENUS) | CONVERT_TO_UTF8));
+                                               BIF_DrawString(simasel->curfont, sname, ((U.transopts & USER_TR_MENUS) | CONVERT_TO_UTF8));
 #else
-                               BIF_DrawString(simasel->curfont, sname, (U.transopts & USER_TR_MENUS));
+                                               BIF_DrawString(simasel->curfont, sname, (U.transopts & USER_TR_MENUS));
 #endif
+                                       } else {
+                                               BMF_DrawString(simasel->curfont, sname);
+                                       }
+                               }
+#else
+                               BMF_DrawString(simasel->curfont, sname);
+#endif /* WITH_ICONV */
+
                                sy -= linestep;
                        } else {
                                cpack(0xB0B0B0);