• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisiónd65fef0f6ed63df5cbdb6fdfccbf361fe20cba07 (tree)
Tiempo2004-05-16 08:48:12
AutorLars Clausen <lclausen@src....>
CommiterLars Clausen

Log Message

Fig import font prob.

Cambiar Resumen

Diferencia incremental

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
11 2004-05-15 Lars Clausen <lars@raeder.dk>
2+
3+ * plug-ins/xfig/xfig-import.c: Handle default fonts and illegal
4+ fonts better (#138655)
25
36 * doc/pl/Makefile.am (EXTRA_DIST): Also include all xml files here.
47
--- a/plug-ins/xfig/xfig-import.c
+++ b/plug-ins/xfig/xfig-import.c
@@ -1270,7 +1270,27 @@ fig_read_text(FILE *file, DiagramData *dia) {
12701270 tprop->attr.alignment = sub_type;
12711271 tprop->attr.position.x = x/FIG_UNIT;
12721272 tprop->attr.position.y = y/FIG_UNIT;
1273- tprop->attr.font = dia_font_new_from_legacy_name(fig_fonts[font]);
1273+
1274+ if (font_flags & 4) {
1275+ switch (font) {
1276+ case 0: tprop->attr.font = dia_font_new_from_legacy_name("Times-Roman"); break;
1277+ case 1: tprop->attr.font = dia_font_new_from_legacy_name("Times-Roman"); break;
1278+ case 2: tprop->attr.font = dia_font_new_from_legacy_name("Times-Bold"); break;
1279+ case 3: tprop->attr.font = dia_font_new_from_legacy_name("Times-Italic"); break;
1280+ case 4: tprop->attr.font = dia_font_new_from_legacy_name("Helvetica"); break;
1281+ case 5: tprop->attr.font = dia_font_new_from_legacy_name("Courier"); break;
1282+ default: message_warning("Can't find LaTeX font nr. %d, using sans\n", font);
1283+ tprop->attr.font = dia_font_new_from_legacy_name("Helvetica");
1284+ }
1285+ } else {
1286+ if (font == -1) font = "Times Roman"; /* "Default font" - wazzat? */
1287+ if (font < 0 || font > 34) {
1288+ message_warning("Can't find Postscript font nr. %d, using sans\n", font);
1289+ tprop->attr.font = dia_font_new_from_legacy_name("Helvetica");
1290+ } else {
1291+ tprop->attr.font = dia_font_new_from_legacy_name(fig_fonts[font]);
1292+ }
1293+ }
12741294 tprop->attr.height = font_size*3.54/72.0;
12751295 tprop->attr.color = fig_color(color);
12761296 newobj->ops->set_props(newobj, props);