Hajime Hoshi
b2c45a369a
text/v2: remove the suffix 'InPixels'
...
Now all the units are pixels, the suffix is redundant.
Updates #2454
2023-11-15 21:53:58 +09:00
Hajime Hoshi
a612b3c861
text/v2: reduce members in structs
2023-11-15 14:38:03 +09:00
Hajime Hoshi
586a4b6d6e
all: rename sizeInPoints -> sizeInPixels
2023-11-15 14:03:22 +09:00
Hajime Hoshi
f2180a5dc5
text/v2: rename SizeInPoints -> SizeInPixels
2023-11-15 13:14:36 +09:00
Hajime Hoshi
4694b78d54
text/v2: refactoring
2023-11-15 12:34:02 +09:00
Hajime Hoshi
5354ccc44f
examples/2048: use text/v2
...
Also, this changes fixes a bug in (*text/v2.GoTextFace).Metrics.
Updates #2454
2023-11-15 12:28:39 +09:00
Hajime Hoshi
fe35180b78
text/v2: implement GoTextFace
...
Closes #675
Updates #2143
Updates #2454
2023-11-15 03:40:45 +09:00
Hajime Hoshi
46600b42f9
text/v2: swap the arguments of Advance for consistency
2023-11-15 03:18:23 +09:00
Hajime Hoshi
2b46a77e39
text/v2: replace Rune and IndexInBytes with Start/EndIndexInBytes in Glyph
...
The relationships between runes and glyphs are n:m in general,
then Rune is not enough. Let Glyph have a range of a string.
Updates #2454
2023-11-14 01:38:45 +09:00
Hajime Hoshi
ea1d9dde4e
text/v2: add LayoutOptions
...
Now AppendGlyphs can treat multiple lines and alignments.
2023-11-13 23:47:37 +09:00
Hajime Hoshi
4a84f3697c
text/v2: refactoring: simplify implementation
2023-11-13 13:24:39 +09:00
Hajime Hoshi
29fe3f6d21
text/v2: refactoring: don't consider origin's posotion for the subpixel offset Y
2023-11-13 02:44:09 +09:00
Hajime Hoshi
e4f9d854d2
Revert "text/v2: don't consider subpixels in Y direction in StdFace"
...
This reverts commit 38a0449b44
.
Reason: the rendering result has changed unexpectedly
2023-11-13 02:41:38 +09:00
Hajime Hoshi
38a0449b44
text/v2: don't consider subpixels in Y direction in StdFace
2023-11-13 02:24:49 +09:00
Hajime Hoshi
a645fbb2b0
text/v2: refactoring
2023-11-13 02:16:17 +09:00
Hajime Hoshi
9735687d3e
text/v2: refactoring
2023-11-13 01:31:25 +09:00
Hajime Hoshi
7c40b5f922
text/v2: bug fix: fix a semantically wrong calculation
...
Updates #2454
2023-11-12 21:04:39 +09:00
Hajime Hoshi
3f180b2165
text/v2: bug fix: StdFace was never released
...
StdFace was used as a cache key, then these are never released.
This change fixes this issue by adding faceCacheKey and use it as
a cache key.
Updates #498
2023-11-12 18:49:46 +09:00
Hajime Hoshi
77f3b57d1f
text/v2: bug fix: the offset should be added at the end of each iteration
...
Updates #2454
Updates #2528
2023-11-12 17:37:36 +09:00
Hajime Hoshi
b05c272499
text/v2: add CacheGlyphs
...
Updates #2454
Updates #2528
2023-11-12 17:35:01 +09:00
Hajime Hoshi
b8b8b16098
all: add text/v2
...
This change adds some basic APIs incuding StdFace.
GoTextFace will be added later.
Updates #2454
2023-11-12 17:04:25 +09:00