summaryrefslogtreecommitdiff
path: root/pango/pangocoretext-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-07-26 17:33:14 -0400
committerBehdad Esfahbod <behdad@behdad.org>2014-07-26 17:33:14 -0400
commitcda5d4ffb5ad9e48da235a7a97ae3fe8b782e6aa (patch)
tree949eb1193af1baecd01f5e338184419b548cf7bf /pango/pangocoretext-fontmap.c
parent40f5c151e911464cb9da569d8ceee88f52fcbfbf (diff)
downloadpango-cda5d4ffb5ad9e48da235a7a97ae3fe8b782e6aa.tar.gz
[coretext] Support PANGO_WEIGHT_SEMILIGHT
We should interpolate. Added TODO. Don't have a coretext build so don't want to break it. Bug 733764 - Support more / free font weights
Diffstat (limited to 'pango/pangocoretext-fontmap.c')
-rw-r--r--pango/pangocoretext-fontmap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index bcbb1734..6044773e 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -115,13 +115,14 @@ const float ct_weight_min = -1.00f;
const float ct_weight_max = 1.00f;
static const PangoCTWeight ct_weight_limits[] = {
- { -0.70, PANGO_WEIGHT_THIN},
- { -0.50, PANGO_WEIGHT_ULTRALIGHT },
- { -0.35, PANGO_WEIGHT_LIGHT },
+ { -0.00, PANGO_WEIGHT_THIN },
+ { -0.75, PANGO_WEIGHT_ULTRALIGHT },
+ { -0.50, PANGO_WEIGHT_LIGHT },
+ { -0.25, PANGO_WEIGHT_SEMILIGHT },
{ -0.10, PANGO_WEIGHT_BOOK },
- { 0.10, PANGO_WEIGHT_NORMAL },
- { 0.24, PANGO_WEIGHT_MEDIUM },
- { 0.36, PANGO_WEIGHT_SEMIBOLD },
+ { 0.00, PANGO_WEIGHT_NORMAL },
+ { 0.10, PANGO_WEIGHT_MEDIUM },
+ { 0.25, PANGO_WEIGHT_SEMIBOLD },
{ 0.50, PANGO_WEIGHT_BOLD },
{ 0.75, PANGO_WEIGHT_ULTRABOLD },
{ 1.00, PANGO_WEIGHT_HEAVY }
@@ -310,6 +311,7 @@ ct_font_descriptor_get_weight (CTFontDescriptorRef desc)
for (i = 0; i < G_N_ELEMENTS(ct_weight_limits); i++)
if (value < ct_weight_limits[i].bound)
{
+ /* TODO interpolate weight. */
weight = ct_weight_limits[i].weight;
break;
}