Skip to content

Instantly share code, notes, and snippets.

@andlabs
Created October 21, 2016 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andlabs/4d161645d6e2b76c2fc3922c0e2f59b8 to your computer and use it in GitHub Desktop.
Save andlabs/4d161645d6e2b76c2fc3922c0e2f59b8 to your computer and use it in GitHub Desktop.
commit f46edd097b7d394f574ff10fd798d918b66c68eb
Author: Pietro Gagliardi <pietro10@mac.com>
Date: Fri Oct 21 16:35:46 2016 -0400
uiDrawTextWeightUtraBold.
diff --git a/README.md b/README.md
index 44c2451..9264fd8 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,9 @@ This README is being written.<br>
## Announcements
+* **21 October 2016**
+ * `uiDrawTextWeightUltraBold` is now spelled correctly. Thanks to @krakjoe.
+
* **18 June 2016**
* Help decide [the design of tables and trees in libui](https://github.com/andlabs/libui/issues/159); the implementation starts within the next few days, if not tomorrow!
diff --git a/darwin/drawtext.m b/darwin/drawtext.m
index 810a3a4..0703861 100644
--- a/darwin/drawtext.m
+++ b/darwin/drawtext.m
@@ -164,7 +164,7 @@ static void addFontSmallCapsAttr(CFMutableDictionaryRef attr)
[uiDrawTextWeightSemiBold] = ourNSFontWeightSemibold,
[uiDrawTextWeightBold] = ourNSFontWeightBold,
// for this one let's go between Bold and Heavy
- [uiDrawTextWeightUtraBold] = ourNSFontWeightBold + ((ourNSFontWeightHeavy - ourNSFontWeightBold) / 2),
+ [uiDrawTextWeightUltraBold] = ourNSFontWeightBold + ((ourNSFontWeightHeavy - ourNSFontWeightBold) / 2),
[uiDrawTextWeightHeavy] = ourNSFontWeightHeavy,
[uiDrawTextWeightUltraHeavy] = ourNSFontWeightBlack,
};
diff --git a/test/page9.c b/test/page9.c
index 5591c05..65b2d3a 100644
--- a/test/page9.c
+++ b/test/page9.c
@@ -230,7 +230,7 @@ uiBox *makePage9(void)
uiComboboxAppend(textWeight, "Medium");
uiComboboxAppend(textWeight, "Semi Bold");
uiComboboxAppend(textWeight, "Bold");
- uiComboboxAppend(textWeight, "Utra Bold");
+ uiComboboxAppend(textWeight, "Ultra Bold");
uiComboboxAppend(textWeight, "Heavy");
uiComboboxAppend(textWeight, "Ultra Heavy");
uiComboboxSetSelected(textWeight, uiDrawTextWeightNormal);
diff --git a/ui.h b/ui.h
index 70c2f12..cedfb60 100644
--- a/ui.h
+++ b/ui.h
@@ -481,7 +481,7 @@ _UI_ENUM(uiDrawTextWeight) {
uiDrawTextWeightMedium,
uiDrawTextWeightSemiBold,
uiDrawTextWeightBold,
- uiDrawTextWeightUtraBold,
+ uiDrawTextWeightUltraBold,
uiDrawTextWeightHeavy,
uiDrawTextWeightUltraHeavy,
};
diff --git a/unix/drawtext.c b/unix/drawtext.c
index d31c264..7078e1a 100644
--- a/unix/drawtext.c
+++ b/unix/drawtext.c
@@ -62,7 +62,7 @@ static const PangoWeight pangoWeights[] = {
[uiDrawTextWeightMedium] = PANGO_WEIGHT_MEDIUM,
[uiDrawTextWeightSemiBold] = PANGO_WEIGHT_SEMIBOLD,
[uiDrawTextWeightBold] = PANGO_WEIGHT_BOLD,
- [uiDrawTextWeightUtraBold] = PANGO_WEIGHT_ULTRABOLD,
+ [uiDrawTextWeightUltraBold] = PANGO_WEIGHT_ULTRABOLD,
[uiDrawTextWeightHeavy] = PANGO_WEIGHT_HEAVY,
[uiDrawTextWeightUltraHeavy] = PANGO_WEIGHT_ULTRAHEAVY,
};
diff --git a/windows/drawtext.cpp b/windows/drawtext.cpp
index 023fcdd..05a24f6 100644
--- a/windows/drawtext.cpp
+++ b/windows/drawtext.cpp
@@ -94,7 +94,7 @@ static const struct {
{ false, uiDrawTextWeightMedium, DWRITE_FONT_WEIGHT_MEDIUM },
{ false, uiDrawTextWeightSemiBold, DWRITE_FONT_WEIGHT_SEMI_BOLD },
{ false, uiDrawTextWeightBold, DWRITE_FONT_WEIGHT_BOLD },
- { false, uiDrawTextWeightUtraBold, DWRITE_FONT_WEIGHT_ULTRA_BOLD },
+ { false, uiDrawTextWeightUltraBold, DWRITE_FONT_WEIGHT_ULTRA_BOLD },
{ false, uiDrawTextWeightHeavy, DWRITE_FONT_WEIGHT_HEAVY },
{ true, uiDrawTextWeightUltraHeavy, DWRITE_FONT_WEIGHT_ULTRA_BLACK, },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment