Skip to content
Snippets Groups Projects
Commit 4de3e5c7 authored by Adrien Lescourt's avatar Adrien Lescourt
Browse files

Replace dejavu with xorg font alias misc

To have the library working on with minimum font dependency on multiple
distribution, we use xorg font alias misc.
Font available are listed here:
Debian based: /etc/X11/fonts/misc/xfonts-base-alias
Arch based: /usr/share/fonts/misc/fonts.alias
parent 72e087e0
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,8 @@
char_size: erreur
. sol: definir une font par defaut dans InitX par une
appel a char_size(12).
- A. Lescourt oct 2017: change la font pour dejavu, (helvetica n'étant plus
. présent sur la plupart des distributation linux par defaut)
- A. Lescourt oct 2017: change la font helvetica par les xorg font alias misc
pour fonctionner avec X11 de base sur de multiple distribution
procedure POLYGONE(P : in Type_Point;
N : in Integer);
......@@ -266,33 +266,27 @@ int size;
Font fonte;
if (size == 8) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-80-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "5x8");
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
else if (size == 10) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-100-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "6x10");
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
else if (size == 12) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-120-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "6x12");
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
else if (size == 14) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-140-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "7x14");
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
else if (size == 18) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-180-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "10x20"); // no size 18 available in xorg font alias misc
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
else if (size == 24) {
font_struct = XLoadQueryFont(canal_aff,
"-*-dejavu sans mono-medium-r-normal--*-240-*-*-*-*-iso10646-1");
font_struct = XLoadQueryFont(canal_aff, "12x24");
XSetFont(canal_aff,contx_graph,font_struct->fid);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment