Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-19 06:49:13 +0300
committerCampbell Barton <campbell@blender.org>2022-08-19 06:49:13 +0300
commit1a3bc09e893308cb6d31640856d23006fac56292 (patch)
treee9c3e2701b2350c8b84fc94f9585a9cc3921c0e8 /source/blender/blenfont
parent2a15040777a04170a00c3591065b8243e40428d5 (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index f758c67be43..bc404325fc7 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -42,9 +42,11 @@
#include "BLI_strict_flags.h"
#include "BLI_string_utf8.h"
-/* Convert glyph converage amounts to lightness values. Uses a LUT that perceptually improves
+/**
+ * Convert glyph coverage amounts to lightness values. Uses a LUT that perceptually improves
* anti-aliasing and results in text that looks a bit fuller and slightly brighter. This should
- * be reconsidered in some - or all - cases when we transform the entire UI. */
+ * be reconsidered in some - or all - cases when we transform the entire UI.
+ */
#define BLF_GAMMA_CORRECT_GLYPHS
/* -------------------------------------------------------------------- */
@@ -190,19 +192,20 @@ static GlyphBLF *blf_glyph_cache_find_glyph(GlyphCacheBLF *gc, uint charcode)
#ifdef BLF_GAMMA_CORRECT_GLYPHS
-/* Gamma correction of glyph converage values with widely-recommended gamma of 1.43.
+/**
+ * Gamma correction of glyph coverage values with widely-recommended gamma of 1.43.
* "The reasons are historical. Because so many programmers have neglected gamma blending for so
* long, people who have created fonts have tried to work around the problem of fonts looking too
- * thin by just making the fonts thicker! Obviously it doesn’t help the jaggedness, but it does
+ * thin by just making the fonts thicker! Obviously it doesn't help the jaggedness, but it does
* make them look the proper weight, as originally intended. The obvious problem with this is
* that if we want to gamma blend correctly many older fonts will look wrong. So we compromise,
- * and use a lower gamma value, so we get a bit better antialiasing, but the fonts don’t look too
+ * and use a lower gamma value, so we get a bit better anti-aliasing, but the fonts don't look too
* heavy."
* https://www.puredevsoftware.com/blog/2019/01/22/sub-pixel-gamma-correct-font-rendering/
*/
static char blf_glyph_gamma(char c)
{
- /* The following is (char)(powf(c / 256.0f, 1.0f / 1.43f) * 256.0f). */
+ /* The following is `(char)(powf(c / 256.0f, 1.0f / 1.43f) * 256.0f)`. */
static const char gamma[256] = {
0, 5, 9, 11, 14, 16, 19, 21, 23, 25, 26, 28, 30, 32, 34, 35, 37, 38,
40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 64,