[pango] [coretext] Support PANGO_WEIGHT_SEMILIGHT
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] [coretext] Support PANGO_WEIGHT_SEMILIGHT
- Date: Sat, 26 Jul 2014 21:33:54 +0000 (UTC)
commit cda5d4ffb5ad9e48da235a7a97ae3fe8b782e6aa
Author: Behdad Esfahbod <behdad behdad org>
Date: Sat Jul 26 17:33:14 2014 -0400
[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
pango/pangocoretext-fontmap.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index bcbb173..6044773 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]