Qwerasd
bd18452310
font: unify metrics calculations & separate sprite metrics
...
Unify grid metrics calculations by relying on shared logic mostly based
on values directly from the font tables, this deduplicates a lot of code
and gives us more control over how we interpret various metrics.
Also separate metrics for underlined, strikethrough, and overline
thickness and position, and box drawing thickness, so that they can
individually be adjusted as the user desires.
2024-12-11 16:55:52 -05:00
Nyaa97
7eb5563e9c
Fix linking freetype and glslang
2024-10-30 16:43:41 -04:00
Mitchell Hashimoto
1aa932f810
font/coretext: use CTFontCreateForString for final codepoint fallback
...
Fixes #2499
We rely on CoreText's font discovery to find the best font for a
fallback by using the character set attribute. It appears that for some
codepoints, the character set attribute is not enough to find a font
that supports the codepoint.
In this case, we use CTFontCreateForString to find the font that
CoreText would use. The one subtlety here is we need to ignore the
last resort font, which just has replacement glyphs for all codepoints.
We already had a function to do this for CJK characters (#1637 )
thankfully so we can just reuse that!
This also fixes a bug where CTFontCreateForString range param expects
the range length to be utf16 code units, not utf32.
2024-10-25 21:29:45 -07:00
Mitchell Hashimoto
8bb8b01e54
build: use Zig system packaging options
...
This allows dynamically linking against system libraries, which is
particularly useful for packaging.
2024-10-24 14:46:37 -07:00
Qwerasd
d38d0f30c4
font/sprite: replace pixman with z2d, extend Box coverage
...
More complete coverage of the Symbols For Legacy Computing block,
including characters from Unicode 16.0.
Pixman and the web canvas impl for Canvas have been removed in favor of
z2d for drawing, since it has a nicer API with more powerful methods,
and is in Zig with no specific platform optimizations so should compile
to wasm no problem.
2024-10-14 17:50:49 -04:00
Qwerasd
3ec36e4d23
coretext: improve strikethrough position calculation
2024-09-23 19:01:15 -06:00
Mitchell Hashimoto
c26da4ea06
pkg/macos: expose carbon API
2024-09-19 09:22:07 -07:00
Mitchell Hashimoto
35e11c09e0
pkg: add README and license
2024-09-13 19:55:11 -07:00
Jeffrey C. Ollie
f2d53b451b
wuffs: fix blend mode
2024-09-04 18:23:54 -05:00
Mitchell Hashimoto
5f1c9dd0df
pkg/wuffs: use proper apple include paths on darwin targets
2024-09-02 21:02:36 -07:00
Mitchell Hashimoto
781a721fc7
pkg/wuffs: fix builds for 32-bit systems
2024-09-02 20:57:23 -07:00
Mitchell Hashimoto
de612934a0
some tweaks for wuffs
2024-09-02 20:47:07 -07:00
Mitchell Hashimoto
c6e187865a
pkg/wuffs: define build defines separately, not in defs.zig
2024-09-02 20:47:07 -07:00
Jeffrey C. Ollie
d6e5c8e20f
remove unnecessary @constCast
2024-09-02 20:47:07 -07:00
Jeffrey C. Ollie
6edeb45e7e
kitty graphics: address review comments
...
- move wuffs code from src/ to pkg/
- eliminate stray debug logs
- make logs a warning instead of an error
- remove initialization of some structs to zero
2024-09-02 20:47:07 -07:00
Mitchell Hashimoto
d8cc19612f
crash: beforeSend needs to add contexts to the event directly
2024-09-02 09:55:57 -07:00
Mitchell Hashimoto
f0916d58e8
crash: try to attach dimensions to the crash report
2024-09-01 14:15:11 -07:00
Mitchell Hashimoto
72c1b00b0b
pkg/sentry: uuid string is null-terminated
2024-08-31 14:05:55 -07:00
Mitchell Hashimoto
920a1051e5
crash: discard envelopes that do not contain a crash
2024-08-31 12:24:11 -07:00
Mitchell Hashimoto
0f35f6267e
pkg/breakpad: add linux_syscall_support.h to the vendored files
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
7613e5f211
add pkg/breakpad, configure sentry to use breakpad
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
d66178718c
pkg/sentry: build in unwinder
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
13f1752836
build: don't include sentry on windows
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
33e9bc14ef
don't send empty envelopes
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
833efe9a81
pkg/sentry: fix darwin lib builds
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
2abdf291f4
implement sentry transport to write crash reports to XDG_STATE_HOME
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
e029490535
sentry init uses proper cache dir, sets tags
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
e4e9a19607
pkg/sentry: fix Linux builds
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
b11f0d5cc9
pkg/sentry: custom transports
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
1070068090
pkg/sentry: add more Zig APIs
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
2793cf8112
pkg/sentry: initial builds
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
915ec029ee
font/freetype: synthetic bold
2024-08-25 09:51:09 -07:00
Mitchell Hashimoto
5f0daa23b9
font/freetype: synthetic italic
2024-08-24 21:03:54 -07:00
Mitchell Hashimoto
f5234e286a
pkg/macos: copyAttribute should return optional
2024-08-24 20:35:41 -07:00
Mitchell Hashimoto
fd37e6a351
pkg/harfbuzz: yeet usingns
2024-08-16 17:00:58 -07:00
Mitchell Hashimoto
38a7a55300
pkg/fontconfig: yeet usingns
2024-08-16 16:58:16 -07:00
Mitchell Hashimoto
7a7f7da4ef
pkg: yeet more usingns
2024-08-16 16:52:28 -07:00
Mitchell Hashimoto
318dc85c02
pkg/macos: yeet more usingns
2024-08-16 16:50:41 -07:00
Mitchell Hashimoto
17d844e7bf
pkg/macos: more
2024-08-16 16:39:33 -07:00
Mitchell Hashimoto
a4c05e4a32
pkg/macos: graphics usingns yeet
2024-08-16 16:38:04 -07:00
Mitchell Hashimoto
097b978052
pkg/macos: animation yeet usingns
2024-08-16 16:35:07 -07:00
Mitchell Hashimoto
2f578a0b97
pkg/macos: foundation yeet usingns
2024-08-16 16:33:47 -07:00
Mitchell Hashimoto
480487b440
pkg/utf8proc: yeet usingns
2024-08-16 16:28:39 -07:00
Mitchell Hashimoto
59755363a3
pkg/pixman: remove usingns
2024-08-16 15:41:50 -07:00
Mitchell Hashimoto
ea73edaf7f
pkg/harfbuzz: fix c.zig
2024-08-16 15:38:18 -07:00
Mitchell Hashimoto
0e2eb85989
pkg/glslang: yeet usingns
2024-08-16 15:36:31 -07:00
Mitchell Hashimoto
91431a90a1
pkg/freetype: remove usingns
2024-08-16 15:34:46 -07:00
Mitchell Hashimoto
c49b3b94b9
pkg/oni: yeet usingnamespace
2024-08-16 15:32:21 -07:00
Mitchell Hashimoto
f13ea7cace
pkg/opengl: yeet usingns
2024-08-16 15:28:22 -07:00
Mitchell Hashimoto
14a42fcdb7
renderer/metal: load shaders from precompiled lib
2024-08-06 15:05:10 -07:00