aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-08-11 21:14:48 +0200
committermarha <marha@users.sourceforge.net>2014-08-11 21:14:48 +0200
commitfdbedba4d50e1b28b0249c83ba11c029f096e400 (patch)
treea80ccb6275fd99644c79c67856e9c1bf1b323d62 /fontconfig
parentb33b8d8ae86876b50df96881b96074b3fe177cce (diff)
downloadvcxsrv-fdbedba4d50e1b28b0249c83ba11c029f096e400.tar.gz
vcxsrv-fdbedba4d50e1b28b0249c83ba11c029f096e400.tar.bz2
vcxsrv-fdbedba4d50e1b28b0249c83ba11c029f096e400.zip
fontconfig libX11 libxcb libxcb/xcb-proto mesa xserver xkeyboard-config git update 11 Aug 2014
xserver commit 3714f5401690b288045090c4bcd9cb01c6e4860e libxcb commit 966fba6ba4838949d0727dfa45eeb9392d1f85d9 libxcb/xcb-proto commit 4b384d2a015c50d0e93dcacda4b8260a3fd37640 xkeyboard-config commit 651a00ab656a1754b9183a383970a735209bbb50 libX11 commit 368a6401c6a3275d3497fec38a3dcbc38cd9df60 libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f libXext commit efdcbb7634501e1117d422636a0a75d7ea84b16b libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909 libXau commit 1e4635be11154dd8262f37b379511bd627defa2a xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 pixman commit 6d2cf40166d81bfc63108504c8022dc4fec37ff5 xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 glproto commit f84853d97d5749308992412a215fa518b6536eb3 mkfontscale commit 47908fd7a0d061fdcd21e3498da4e223ca9136d9 xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647 libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738 libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63 libxtrans commit a57a7f62242e1ea972b81414741729bf3dbae0a4 fontconfig commit 841753a93f0e5698663b7931b8456e7b96259f54 mesa commit f24be7340162c6a831b392d46d6637e9656e7a8a
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/conf.d/45-latin.conf8
-rw-r--r--fontconfig/src/fcatomic.c2
-rw-r--r--fontconfig/src/fcweight.c15
3 files changed, 16 insertions, 9 deletions
diff --git a/fontconfig/conf.d/45-latin.conf b/fontconfig/conf.d/45-latin.conf
index aa62ed42e..996fb81e6 100644
--- a/fontconfig/conf.d/45-latin.conf
+++ b/fontconfig/conf.d/45-latin.conf
@@ -57,10 +57,6 @@
<family>Palatino Linotype</family>
<default><family>serif</family></default>
</alias>
- <alias>
- <family>Trebuchet MS</family>
- <default><family>serif</family></default>
- </alias>
<!--
Sans-serif faces
-->
@@ -104,6 +100,10 @@
<family>Luxi Sans</family>
<default><family>sans-serif</family></default>
</alias>
+ <alias>
+ <family>Trebuchet MS</family>
+ <default><family>sans-serif</family></default>
+ </alias>
<!--
Monospace faces
-->
diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c
index c1daed938..2ce419f74 100644
--- a/fontconfig/src/fcatomic.c
+++ b/fontconfig/src/fcatomic.c
@@ -131,7 +131,7 @@ FcAtomicLock (FcAtomic *atomic)
return FcFalse;
}
ret = link ((char *) atomic->tmp, (char *) atomic->lck);
- if (ret < 0 && errno == EPERM)
+ if (ret < 0 && (errno == EPERM || errno == ENOTSUP))
{
/* the filesystem where atomic->lck points to may not supports
* the hard link. so better try to fallback
diff --git a/fontconfig/src/fcweight.c b/fontconfig/src/fcweight.c
index 87bbe67ab..77b78ad54 100644
--- a/fontconfig/src/fcweight.c
+++ b/fontconfig/src/fcweight.c
@@ -45,15 +45,22 @@ static int lerp(int x, int x1, int x2, int y1, int y2)
{
int dx = x2 - x1;
int dy = y2 - y1;
- assert (dx > 0 && dy > 0 && x1 <= x && x <= x2);
+ assert (dx > 0 && dy >= 0 && x1 <= x && x <= x2);
return y1 + (dy*(x-x1) + dx/2) / dx;
}
-FcPublic int
+int
FcWeightFromOpenType (int ot_weight)
{
int i;
- if (ot_weight <= 0 || ot_weight > 1000)
+
+ /* Follow WPF Font Selection Model's advice. */
+ if (1 <= ot_weight && ot_weight <= 9)
+ ot_weight *= 100;
+
+ /* WPF Font Selection Model rejects 1000, we allow it
+ * because Pango uses that number. */
+ if (ot_weight < 1 || ot_weight > 1000)
return -1;
for (i = 1; ot_weight > map[i].ot; i++)
@@ -66,7 +73,7 @@ FcWeightFromOpenType (int ot_weight)
return lerp (ot_weight, map[i-1].ot, map[i].ot, map[i-1].fc, map[i].fc);
}
-FcPublic int
+int
FcWeightToOpenType (int fc_weight)
{
int i;