fixed fonts (Motif)

Sat, 17 May 2014 10:53:57 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 17 May 2014 10:53:57 +0200
changeset 46
4a5e0b9b6992
parent 45
cfeb2d5f1332
child 47
97792f44d919

fixed fonts (Motif)

application/main.c file | annotate | diff | comparison | revisions
ui/motif/toolkit.c file | annotate | diff | comparison | revisions
ui/motif/toolkit.h file | annotate | diff | comparison | revisions
--- a/application/main.c	Sat May 17 10:48:59 2014 +0200
+++ b/application/main.c	Sat May 17 10:53:57 2014 +0200
@@ -88,9 +88,9 @@
     Person *p2 = ui_malloc(window->ctx, sizeof(Person));
     Person *p3 = ui_malloc(window->ctx, sizeof(Person));
     Person *p4 = ui_malloc(window->ctx, sizeof(Person));
-    p1->name = "Some Name";
+    p1->name = "Some Näme";
     p1->mail = "mail@host.com";
-    p2->name = "Other Person";
+    p2->name = "押井守";
     p2->mail = "other.person@provider.com";
     p3->name = "My Self";
     p3->mail = "my@self.org";
@@ -100,27 +100,9 @@
     ui_list_append(list, p2);
     ui_list_append(list, p3);
     ui_list_append(list, p4);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
-    ui_list_append(list, p1);
     
     ui_table(window, list, model);
-    
+    //ui_textarea(window, NULL);
     
     ui_show(window);
     ui_main();
--- a/ui/motif/toolkit.c	Sat May 17 10:48:59 2014 +0200
+++ b/ui/motif/toolkit.c	Sat May 17 10:53:57 2014 +0200
@@ -51,7 +51,25 @@
 int event_pipe[2];
 
 static String fallback[] = {
-	"*fontList: -dt-interface system-medium-r-normal-s*utf*:",
+    	//"*fontList: -dt-interface system-medium-r-normal-s*utf*:",    
+        "*renderTable: rt",
+        "*rt*fontType: FONT_IS_FONTSET",
+        "*rt*fontName: -dt-interface system-medium-r-normal-s*utf*:,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-1,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-10,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-15,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-2,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-3,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-4,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-5,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-iso8859-9,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-koi8-e,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-koi8-r,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-koi8-ru,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-koi8-u,"
+                "-misc-liberation sans-medium-r-normal--0-0-0-0-p-0-koi8-uni,"
+                "-misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0208",
+        "*rt*fontSize: 10",
 	NULL
 };
 
@@ -66,6 +84,7 @@
     XtToolkitInitialize();
     XtSetLanguageProc(NULL, NULL, NULL);
     app = XtCreateApplicationContext();
+    XtAppSetFallbackResources(app, fallback);
     
     display =  XtOpenDisplay(app, NULL, appname, appname, NULL, 0, &argc, argv);
     char **missing = NULL;
--- a/ui/motif/toolkit.h	Sat May 17 10:48:59 2014 +0200
+++ b/ui/motif/toolkit.h	Sat May 17 10:53:57 2014 +0200
@@ -29,6 +29,7 @@
 #ifndef TOOLKIT_H
 #define	TOOLKIT_H
 
+#include <inttypes.h>
 #include "../ui/toolkit.h"
 #include "../common/context.h"
 #include "../common/object.h"

mercurial