rustversion
fe9ab4a12b
all: fix the inconsistent method names in the comments ( #3342 )
...
Signed-off-by: rustversion <rustverion@outlook.com >
2025-11-10 13:42:37 +09:00
Hajime Hoshi
cd18587fcd
text/v2: bug fix: go-vet error
2025-08-01 00:33:03 +09:00
Hajime Hoshi
c48112392d
text/v2: add tests for GoTextFace
...
Updates #3284
2025-08-01 00:21:39 +09:00
Hajime Hoshi
ddc0e8e768
text/v2: bug fix: Advance could crash when the text included invalid sequence
...
Closes #3284
2025-08-01 00:15:26 +09:00
Hajime Hoshi
2b339a7e57
text/v2: add comments about bounding box
...
Updates #3269
2025-07-14 01:09:29 +09:00
Hajime Hoshi
82efbae533
text/v2: clear the glyph slice before putting git back
2025-06-09 04:28:43 +09:00
Hajime Hoshi
61426ac72d
text/v2, exp/textinput: bug fix: RuneLen could return -1 for errors
2025-06-09 01:32:21 +09:00
Hajime Hoshi
a034565163
text/v2: use RuneLen instead of DecodeRuneInString for performance
2025-06-09 00:29:09 +09:00
Hajime Hoshi
95d47b04a9
text/v2/internal/textutil: performance optimization: avoid string concatenations
2025-06-08 22:56:14 +09:00
Hajime Hoshi
1b9fe09c0e
text/v2: refactoring: move some functions to internal/textutil
2025-06-08 22:48:24 +09:00
Hajime Hoshi
6ea0aafd8e
text/v2: bug fix: put back a slice after growing
2025-06-08 22:26:21 +09:00
Hajime Hoshi
ec79527450
text/v2: performance optimization: reuse glyph buffers at Draw
2025-06-08 21:24:16 +09:00
Hajime Hoshi
b5fe7426c0
text/v2: performance optimization for UnicodeRanges
...
This change optimizes the performance especially when there is no
replacement.
2025-06-08 21:06:57 +09:00
Hajime Hoshi
cd31850015
text/v2: reland: cache glyph data
...
The cache key should include variations (e.g. font weights), and
sideways.
2025-05-18 19:31:47 +09:00
Hajime Hoshi
0bf489db4c
Revert "text/v2: reland: cache glyph data"
...
This reverts commit fc86fe2132 .
Reason: examples/texti18n caused rendering issues for vertical texts.
2025-05-18 19:27:58 +09:00
Hajime Hoshi
fc86fe2132
text/v2: reland: cache glyph data
...
The cache key should include variations (e.g. font weights).
2025-05-18 19:25:56 +09:00
Hajime Hoshi
84b1765f53
Revert "text/v2: cache glyph data"
...
This reverts commit 14a223d8a5 .
Reason: wrong glyph data was cached for different weights
2025-05-18 19:13:36 +09:00
Hajime Hoshi
14a223d8a5
text/v2: cache glyph data
2025-05-18 18:52:49 +09:00
Hajime Hoshi
fe54a6c068
text/v2: reduce allocations
2025-05-18 18:38:50 +09:00
Hajime Hoshi
f978dddfff
all: update bitmapfont to v4
2025-05-10 20:34:41 +09:00
Hajime Hoshi
15b253fd21
text/v2: avoid unnecessary stringifying
2025-04-21 23:17:02 +09:00
Hajime Hoshi
1b06587435
text/v2: add a cache for hasGlyph
...
hasGlyph was a performance bottleneck with I18N texts in some cases.
2025-04-20 15:48:14 +09:00
Hajime Hoshi
b6c68d22b3
text/v2: set the cache size of a shaper explicitly
...
Closes #3228
2025-04-20 13:54:10 +09:00
Hajime Hoshi
4c219926ee
text/v2: consider other new line characters than U+000A
...
Closes #3227
2025-04-19 01:11:00 +09:00
Hajime Hoshi
60b4297274
text/v2: use iter.Seq to avoid slice allocations
2025-04-12 16:39:16 +09:00
Hajime Hoshi
eb6ad3f816
text/v2: refactoring: have one cached metrics
...
Updates #3223
2025-04-10 04:09:38 +09:00
Hajime Hoshi
65714dc4c7
text/v2: cache GoTextFace's metrics
...
Updates #3223
2025-04-10 03:24:45 +09:00
Hajime Hoshi
02a931fec2
text/v2: remove the temporal hack for XHeight and CapHeight
...
This is already fixed at the latest go-text/typesettings. See also
go-text/typesetting#169 .
2025-04-10 03:19:20 +09:00
Hajime Hoshi
26740ac0a6
text/v2: refactoring
2025-04-10 02:34:54 +09:00
Hajime Hoshi
71f88ddfa4
ebiten: add Tick
...
Closes #3213
2025-03-24 22:39:04 +09:00
Hajime Hoshi
db07dcfe9f
text/v2: deprecate GoTextFace.Script
...
Updates #3175
2024-12-27 17:47:19 +09:00
Hajime Hoshi
88a2c14a8e
text/v2: add a test to parse a collection file
...
This test failed at c985e9bdc6 , but
fixed at 999c64cb78 accidentally.
This issue was introduced in 2.9 (maybe d19a774316 ),
so this doesn't have to be cherry-picked.
2024-12-25 23:24:40 +09:00
Hajime Hoshi
999c64cb78
text/v2: refactoring
2024-12-25 17:38:14 +09:00
Hajime Hoshi
f0a335d3cc
text/v2: improve Draw comments for multiline rendering
...
Updates #3169
2024-12-14 19:02:13 +09:00
Hajime Hoshi
48daae08ef
text/v2: cache origin X positions for GoXFace
...
Closes #3149
2024-10-29 02:16:20 +09:00
Hajime Hoshi
d8348abcc9
text/v2: add comments
2024-10-29 00:37:02 +09:00
Hajime Hoshi
2748f31fc4
text/v2: refactoring: rename receivers of GoXFace
2024-10-27 23:03:31 +09:00
Hajime Hoshi
d19a774316
text/v2: refactoring: unify a cache struct
2024-10-27 22:45:02 +09:00
Hajime Hoshi
41e8d063e8
text/v2: refactoring
2024-10-27 22:45:02 +09:00
Hajime Hoshi
17c2b1b325
text/v2: refactoring
2024-10-27 18:39:10 +09:00
Hajime Hoshi
f78025a3e3
text/v2: typo
2024-10-27 05:00:01 +09:00
Hajime Hoshi
0da99e2c37
text/v2: add comments to CacheGlyphs
2024-10-25 17:41:24 +09:00
Hajime Hoshi
9449e0a8a6
Revert "text/v2: remove faceWithCache's mutex"
...
This reverts commit d5c6fd174f .
Reason: CacheGlyphs and Measure should be concurrent safe.
2024-10-25 14:52:02 +09:00
Hajime Hoshi
d5c6fd174f
text/v2: remove faceWithCache's mutex
...
faceWithCache is not exported, and the functions using faceWithCache
are not concurrent safe. Thus, it doesn't make sense to protect
faceWithCache by mutex. Rather, this affects performance.
2024-10-25 13:58:18 +09:00
Hajime Hoshi
03faba10b4
text/v2: add comments about size
2024-09-30 03:09:29 +09:00
Hajime Hoshi
60883e1a44
text/v2: add comments
2024-09-11 00:22:17 +09:00
Hajime Hoshi
813e3b28af
text/v2: add Metrics.XHeight and Metrics.CapHeight
...
Closes #3082
2024-09-11 00:15:57 +09:00
Hajime Hoshi
e058bb6fd3
all: update go-text
...
Unfortunately this adds a breaking change to (*GoTextFaceSource).UnsafeInternal.
Updates #3082
2024-09-09 23:29:49 +09:00
Hajime Hoshi
df266e8acf
text/v2: add Glyph.OriginOffset{X,Y}
...
Closes #3070
2024-08-23 03:59:16 +09:00
Hajime Hoshi
6056fc59eb
text/v2: update comments about CacheGlyphs
...
The example was not clear.
2024-08-23 00:13:20 +09:00