Commit Graph

215 Commits

Author SHA1 Message Date
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
Hajime Hoshi
a3d084e2de text/v2: add Glyph.Origin{X,Y}
Closes #3070
2024-08-23 00:00:30 +09:00
Hajime Hoshi
b131264c77 text/v2: add comments 2024-08-20 21:06:27 +09:00
Hajime Hoshi
c5974390a8 text/v2: add glyphImageCache.atime
If many runes were added at the same time, GCing the current cache
did nothing and wasted time.
2024-07-03 18:40:40 +09:00
Matúš Ollah
7ddc349ae6
text/v2: fix typo (#3004) 2024-05-31 00:57:32 +09:00
Hajime Hoshi
bf7acd54bb text/v2: refactoring 2024-04-21 22:46:51 +09:00
Hajime Hoshi
11223d9fae text/v2: reuse HarfBuzzShaper
Updates #2963
2024-04-17 15:59:53 +09:00
lvyaoting
f6927232f2
all: fix function names in comment (#2957)
Signed-off-by: lvyaoting <lvyaoting@outlook.com>
2024-04-08 14:27:27 +09:00
Hajime Hoshi
6eee7ccc5f text/v2: rename a file 2024-04-08 10:20:01 +09:00
Hajime Hoshi
c9a3ef28eb text/v2: avoid creating an option struct when the given option is nil 2024-04-07 22:28:21 +09:00
Hajime Hoshi
2b9e307ec2 text/v2: bug fix: given options were unexpectedly modified
Closes #2954
2024-04-07 22:16:17 +09:00
Hajime Hoshi
85c0f4444b text/v2: update comments 2024-04-07 19:22:37 +09:00
Hajime Hoshi
dfa8f21e52 text/v2: update go-text and remove unnecessary string conversions
Updates go-text/typesetting#152
2024-04-03 03:41:57 +09:00
Hajime Hoshi
cd90f083bc text/v2: rename StdFace to GoXFace
Closes #2925
2024-03-20 02:42:31 +09:00
Hajime Hoshi
4c7ed56077 text/v2: add a comment 2024-03-11 23:24:38 +09:00
Hajime Hoshi
f57703175e text/v2: rename LineSpaceInPixels -> LineSpace for consistency
Updates #2454
2023-12-24 15:06:19 +09:00
Hajime Hoshi
f0396ba915 text/v2: always use Segmenter
Updates go-text/typesetting#127
2023-12-24 03:30:27 +09:00
Hajime Hoshi
6878bd79fc text/v2: bug fix: correct rendering vertical texts in Mongolian
Closes #2849
Updates go-text/typesetting#111
2023-12-21 22:58:15 +09:00
bsski
b8df1217c3
all: fix typos (#2864) 2023-12-17 22:42:34 +09:00
Hajime Hoshi
769de21ad1 text/v2: bug fix: some OpenType fonts didn't work
NotoSansJP-VF.otf from https://github.com/notofonts/noto-cjk/releases/tag/Sans2.004
was not rendered correctly. This change fixes this issue.

Updates go-text/typesetting#122
2023-12-12 14:45:41 +09:00
Hajime Hoshi
c903cea637 text/v2: adjust offsets for vertical texts 2023-12-12 01:40:42 +09:00
Hajime Hoshi
d8af9dff28 text/v2: bug fix: Glyph's XOffset/YOffset should be considered 2023-12-12 01:33:25 +09:00
Hajime Hoshi
159c19a671 text: cache metrics 2023-12-11 17:40:10 +09:00
Hajime Hoshi
5a8cfb2561 text/v2: refactoring 2023-12-11 03:43:13 +09:00
Hajime Hoshi
e0741dcd94 text/v2: refactoring 2023-12-09 22:07:17 +09:00
Hajime Hoshi
6a8f37453e text/v2: bug fix: MultiFace should use the last face as the final resort 2023-12-05 21:40:53 +09:00
Hajime Hoshi
668124d25c text/v2: add a non-image glyphs for index info 2023-12-05 20:06:06 +09:00
Hajime Hoshi
800835d081 Revert "text/v2: rename Glyph -> Cluster"
This reverts commit f0d23de3d3.

Reason: Cluster doesn't represent a cluster but a part of a cluster.
2023-12-05 19:44:32 +09:00
Hajime Hoshi
f0d23de3d3 text/v2: rename Glyph -> Cluster
This also changes AppendClusters to return cluster info even if a
cluster doesn't have a glyph.
2023-12-05 18:00:30 +09:00
Hajime Hoshi
800101da90 text/v2: fix an error message
Updates #2845
2023-12-04 01:17:46 +09:00
Hajime Hoshi
81e0e61a43 text/v2: let NewMultiFace return an error
Updates #2845
2023-12-04 01:16:47 +09:00
Hajime Hoshi
fa3ec12731 text/v2: bug fix: the given slice to MultiFace should be copied
Updates #2845
2023-12-02 22:59:14 +09:00
Hajime Hoshi
dfa058a961 text/v2: change the signature of NewMultiFace
Updates #2845
2023-12-02 22:51:37 +09:00
Hajime Hoshi
5790597a15 text/v2: add LimitedFace
Closes #2857
2023-12-02 16:01:28 +09:00