diff options
author | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
commit | 8e27619ab489dece35cc4bec86950ee7729cd309 (patch) | |
tree | ab59dbc661e00c12ed4777cf9d0d37393c4163aa /fontconfig | |
parent | ffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff) | |
parent | fdbedba4d50e1b28b0249c83ba11c029f096e400 (diff) | |
download | vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2 vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libxcb/src/c_client.py
mesalib/include/GL/glext.h
mesalib/include/GL/glxext.h
mesalib/src/glsl/.gitignore
mesalib/src/mesa/drivers/dri/common/xmlconfig.h
mesalib/src/mesa/main/.gitignore
xorg-server/Xext/xvmain.c
xorg-server/dix/dispatch.c
xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'fontconfig')
-rw-r--r-- | fontconfig/conf.d/45-latin.conf | 8 | ||||
-rw-r--r-- | fontconfig/src/fcatomic.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fcweight.c | 15 |
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 c35a829fd..ab1340047 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; |