Commit Graph

9177 Commits

Author SHA1 Message Date
Hajime Hoshi
83fc5fdd50 go mod tidy 2023-11-16 13:52:57 +09:00
Hajime Hoshi
68d5fa46e2 text/v2: add variations to glyph cache keys 2023-11-16 13:15:51 +09:00
Hajime Hoshi
c7843a4e2b text/v2: make glyphVariationCount more flexible
Updates #2843
2023-11-16 12:49:34 +09:00
Hajime Hoshi
8352be9369 text/v2: increase the soft limit of the glyph cache if the face is small
Updates #2843
2023-11-16 12:07:15 +09:00
Hajime Hoshi
2e60c67ec9 text/v2: improve rendering quality for small faces
Closes #2843
2023-11-16 12:02:50 +09:00
Hajime Hoshi
006777220c examples/piano: use text/v2
Updates #2454
2023-11-16 02:20:18 +09:00
Hajime Hoshi
bf338eb76b examples/ui: use a sub-image instead of a buffer image 2023-11-15 23:05:43 +09:00
Hajime Hoshi
2641f65863 examples/ui: use text/v2
Updates #2454
2023-11-15 23:03:06 +09:00
Hajime Hoshi
9c95b4accc examples/block: use text/v2 2023-11-15 22:38:28 +09:00
Hajime Hoshi
acd5207142 examples/text: use GoTextFace 2023-11-15 22:01:29 +09:00
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
5fa2c00014 examples/texti18n: adjust positions and texts 2023-11-15 12:46:06 +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
3080d361ec examples/texti18n: remove unnecessary variables 2023-11-15 03:54:19 +09:00
Hajime Hoshi
c24ade7af9 examples/texti18n: bug fix: wrong language was specified 2023-11-15 03:43:27 +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
1e78c2e6b0 internal/shaderir: bug fix: constants must be truncated correctly in an array
Closes #2840
2023-11-15 00:40:20 +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
cca4e78651 examples/text: add an example to use alignments of text/v2
Closes #2143
2023-11-13 23:02:15 +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
56faf34932 examples/text: adjust the rendering position
text/v2's Draw uses the given position as the upper-left position
of the bounds by default, while text (v1) uses the given position
as the origin position. In order to approximate the same result of
the original text version, adjust the Y values.

Updates #2454
2023-11-13 01:37:36 +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
Hajime Hoshi
1d4c210ff2 text: update comments 2023-11-12 00:20:47 +09:00
Hajime Hoshi
ca24a411bb text: update comments 2023-11-11 20:22:30 +09:00
Hajime Hoshi
81bbc4db0a update dependencies 2023-11-11 15:37:21 +09:00
Hajime Hoshi
4676fd26f0 all: update dependencies 2023-11-07 02:20:42 +09:00
Hajime Hoshi
3ca6184294 ebiten: add a new FillRule: NonZero
Closes #2782
2023-11-06 12:11:38 +09:00
Hajime Hoshi
358106bdc0 internal/graphicsdriver/playstation5: bug fix: compile failure 2023-11-05 21:45:40 +09:00
Hajime Hoshi
95fcbb1e51 internal/graphicsdriver/playstation5: add a binding
Updates #2799
2023-11-05 21:27:30 +09:00
Hajime Hoshi
3df2ffebd1 internal/ui: refactoring: integrate Run except for mobiles 2023-11-05 00:49:53 +09:00
Hajime Hoshi
563bbda615 internal/ui: bug fix: build failure on mobiles 2023-11-05 00:43:02 +09:00
Hajime Hoshi
c654242301 ebiten: update documentations for the single thread mode 2023-11-05 00:19:35 +09:00
Hajime Hoshi
2313373b88 ebiten: update documentations for the single thread mode 2023-11-05 00:15:07 +09:00
Hajime Hoshi
2db10b1e9c ebiten: add RunGameOptions.SingleThread and deprecate ebitenginesinglethread build tag
Closes #2830
2023-11-05 00:01:44 +09:00
Hajime Hoshi
4d8bb1a5dd internal/graphicsdriver/playstation5: bug fix: build failure 2023-11-04 19:45:45 +09:00