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
Mitchell Hashimoto
ea551990eb
renderer: disable window-padding-color=extend in certain scenarios
...
There are scenarios where this configuration looks bad. This commit
introduces some heuristics to prevent it. Here are the heuristics:
* Extension is always enabled on alt screen.
* Extension is disabled if a row contains any default bg color. The
thinking is that in this scenario, using the default bg color looks
just fine.
* Extension is disabled if a row is marked as a prompt (using semantic
prompt sequences). The thinking here is that prompts often contain
perfect fit glyphs such as Powerline glyphs and those look bad when
extended.
This introduces some CPU cost to the extension feature but it should be
minimal and respects dirty tracking. This is unfortunate but the feature
makes many terminal scenarios look much better and the performance cost
is minimal so I believe it is worth it.
Further heuristics are likely warranted but this should be a good
starting set.
2024-08-03 21:56:19 -07:00
Mitchell Hashimoto
4b5ad77b70
font: fontconfig always prefer monospace in pattern
...
Fixes #1984
2024-07-21 09:48:07 -07:00
Mitchell Hashimoto
1677e95f86
pkg/oniguruma: add additional header configs for build
...
Fixes #1887
There seems to be no issue adding these for our other platforms and it
appears to get builds on Chimera working.
2024-06-28 07:34:55 -04:00
Mitchell Hashimoto
98689413b4
disable AVX512 until Zig issue is resolved
...
https://github.com/ziglang/zig/issues/20414
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
2c2a830aa6
pkg/oniguruma: call new functions
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
a30e791c85
begin 0.13 update process -- very broken
2024-06-24 15:16:22 -07:00
Qwerasd
626ec2b5ac
perf: introduce CFReleaseThread for running CoreFoundation releases
...
Some CoreFoundation objects, such as those produced by CoreText, have
expensive callbacks that run when they are released. By offloading the
CFRelease calls to another thread, we can avoid important threads being
blocked by unexpectedly expensive callbacks.
This commit also changes the way that the coretext shaper's run iterator
builds its string. Rather than using a CFMutableString, an ArrayList of
unichars is built which is passed to CFStringCreateWithCharactersNoCopy,
which is a lot more efficient since it avoids all the CoreFoundation
overhead.
2024-06-14 01:43:02 -04:00
Mitchell Hashimoto
a205e1e2c1
pkg/freetype: use c_ulong which isn't 64-bit on windows
2024-05-28 20:49:21 -07:00
Mitchell Hashimoto
adaeffb2b5
font/freetype: CBDT/CBLC tables imply color
2024-05-28 20:40:46 -07:00
Mitchell Hashimoto
4daa49fe27
font/freetype: update to new presentation APIs
2024-05-28 20:25:49 -07:00
Mitchell Hashimoto
8920f45fd8
font/freetype: API to load font table
2024-05-28 09:48:01 -07:00
Mitchell Hashimoto
1a7cde9e3e
font/coretext: can read font tables
2024-05-27 20:23:10 -07:00
Mitchell Hashimoto
9f4d4d3c61
font: treated fonts with mixed color/non-color glyphs as text
...
Related to #1768 but doesn't fix it properly.
This is a temporary hack to avoid some issues with fonts that have mixed
color/non-color glyphs. If there are mixed presentations and the font
does not have emoji codepoints, then we assume it is text. This fixes
the typical scenarios.
This is not a long term solution. A proper long term solution is to
detect this scenario and on a per-glyph basis handle colorization (or
the lack thereof) correctly. It looks like to do this we'll have to
parse some font tables which is considerably more work so I wanted to do
this first.
2024-05-26 10:17:20 -07:00
Mitchell Hashimoto
a11c7ac785
update Dear Imgui to 1.90.6
2024-05-10 10:17:33 -07:00
Mitchell Hashimoto
3c0703eafb
Revert "pkg/libxml2: udpate"
...
This reverts commit 7df335dde9 .
2024-05-09 21:05:38 -07:00
Mitchell Hashimoto
12e059d275
pkg/zlib: update
2024-05-09 21:01:08 -07:00
Mitchell Hashimoto
7df335dde9
pkg/libxml2: udpate
2024-05-09 21:00:18 -07:00
Mitchell Hashimoto
240c60b62a
pkg/libpng: update
2024-05-09 20:59:28 -07:00
Mitchell Hashimoto
650bf3788f
pkg/glslang update
2024-05-09 20:57:28 -07:00
Mitchell Hashimoto
6672568473
pkg/harfbuzz: update
2024-05-09 20:55:02 -07:00
Mitchell Hashimoto
0c0b67c887
pkg/highway: update
2024-05-09 20:53:45 -07:00
Mitchell Hashimoto
8b7bca53c1
pkg/simdutf: update to 5.2.8
2024-05-09 20:50:54 -07:00
Qwerasd
fb913f0d9e
Enable libpng in harfbuzz freetype dep
...
Without this, this replaces the dep on the main level, breaking color glyphs
2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
1cb70d6e40
font/coretext: force LTR shaping
2024-05-08 10:11:57 -07:00
Mitchell Hashimoto
eeb7f7aa02
pkg/macos: add more text APIs
2024-05-08 09:49:16 -07:00
Mitchell Hashimoto
1189817dd8
pkg/macos: CTFontCreateForString
2024-05-05 21:38:19 -07:00
Mitchell Hashimoto
a29a0a1e5c
pkg/macos: add more CoreText APIs
2024-05-05 21:01:44 -07:00
Mitchell Hashimoto
cc72e6de23
pkg/macos: display link callback slightly more typesafe
2024-05-04 14:49:49 -07:00
Mitchell Hashimoto
f76af48613
pkg/macos: add CVDisplayLinkSetCurrentCGDisplay
2024-05-04 14:49:49 -07:00
Gordon Cassie
abd782a7aa
Fix typo.
2024-04-30 10:20:31 -07:00
Mitchell Hashimoto
595f24585e
working on more zig breaking changes
2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
026484fea6
fix more comptime var leaks
2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
61d3da1bf6
font/coretext: respect quirks fonts for shaper
2024-04-04 12:02:43 -07:00
Mitchell Hashimoto
290496d7fe
pkg/macos: add missing functions to macos/foundation
2024-04-04 11:25:34 -07:00
Krzysztof Wolicki
edaafdf57a
build API change: update usage of addCSourceFiles
2024-02-26 18:00:43 +01:00
Mitchell Hashimoto
63ca2c0f0c
pkg/apple-sdk: more descriptive error when SDK not found
2024-02-14 08:56:11 -08:00
Mitchell Hashimoto
4ae41579da
add utf8proc back for bench
2024-02-08 13:21:36 -08:00
Mitchell Hashimoto
8bbcf6821a
pkg: remove unused files, add highway API to get targets
2024-02-05 21:22:28 -08:00
Mitchell Hashimoto
120273aa1a
pkg/utfcpp
2024-02-05 21:22:27 -08:00
Mitchell Hashimoto
626d4170fe
move simdutf to a pkg
2024-02-05 21:22:27 -08:00
Mitchell Hashimoto
36b0db2a72
pkg/highway
2024-02-05 21:22:26 -08:00
Mitchell Hashimoto
7b3deb13d8
renderer/metal: apply layerContentsPlacement on macOS to fix stretching
...
Fixes #42
2024-02-02 08:39:08 -08:00
Mitchell Hashimoto
2f5f14df9f
pkg/apple-sdk: use std.zig.system.darwin.getSdk
2024-01-26 08:31:30 -08:00
Jakub Konka
f98b5b7417
apple-sdk: use zig's libstd getSdk to get active Apple SDK
2024-01-26 12:04:49 +01:00
Mitchell Hashimoto
8d4416995b
build: no more resolved target hack
...
This was necessary to fix `zig build test` but since #1305 this is not
necessary anymore.
2024-01-15 14:33:56 -08:00
Krzysztof Wolicki
f75558b387
Use addCSourceFiles with dependency instead of manually adding files in a loop
2024-01-15 23:23:41 +01:00
Mitchell Hashimoto
3360a008cd
build: build produces a broken object file for iOS
...
This gets `zig build -Dtarget=aarch64-ios` working. By "working" I mean
it produces an object file without compiler errors. However, the object
file certainly isn't useful since it uses a number of features that will
not work in the iOS sandbox.
This is just an experiment more than anything to see how hard it would be to
get libghostty working within iOS to render a terminal. Note iOS doesn't
support ptys so this wouldn't be a true on-device terminal. The
challenge right now is to just get a terminal rendering (not usable).
2024-01-13 21:38:58 -08:00
Mitchell Hashimoto
29717269ca
build: remove tracy completely
2024-01-13 14:30:56 -08:00
Mitchell Hashimoto
c24d7d6de6
pkg/harfbuzz: get zig build test working on macOS
2024-01-10 20:26:41 -08:00
Mitchell Hashimoto
5bca3a4044
pkg/apple-sdk: only exec to get xcode path once per build
2024-01-10 09:35:37 -08:00
Mitchell Hashimoto
41de9c6e97
pkg/apple-sdk: depend on macOS 14 SDK
2024-01-10 09:32:24 -08:00
Mitchell Hashimoto
7e1f1d360f
pkg/apple-sdk add comment
2024-01-09 22:32:39 -08:00
Mitchell Hashimoto
22648d60e7
pkg/apple-sdk: detect apple sdk based on target
2024-01-09 22:24:34 -08:00
Mitchell Hashimoto
829776bebd
pkg/apple-sdk: always require a module
2024-01-09 22:11:03 -08:00
Mitchell Hashimoto
fde52e9eca
pkg/macos: only link apple paths on darwin target
2024-01-09 21:58:56 -08:00
Mitchell Hashimoto
c0722b3652
build: use Xcode for the macOS SDK
2024-01-09 21:53:01 -08:00
Krzysztof Wolicki
3c78df70fb
Maybe this will help macos
2024-01-07 21:39:53 +01:00
Krzysztof Wolicki
b27fc44837
Link frameworks to macos module conditionally
2024-01-07 21:22:09 +01:00
Krzysztof Wolicki
2f5bcf2e27
Attempt to fix building on macos
2024-01-07 21:17:17 +01:00
Krzysztof Wolicki
5698607a1c
Clean pkg/fontconfig/build.zig
2024-01-07 20:54:22 +01:00
Krzysztof Wolicki
9964a55d47
Update source for zig-build-macos-sdk for pkg/apple-sdk
2024-01-07 20:48:00 +01:00
Krzysztof Wolicki
f917be968d
Merge branch 'mitchellh:main' into main
2024-01-07 19:13:06 +01:00
Krzysztof Wolicki
ddebb31b8a
Add include paths to more modules in pkg/
2024-01-07 19:07:16 +01:00
Krzysztof Wolicki
6c7c5eecce
Add include paths to freetype module
2024-01-07 18:45:07 +01:00
Krzysztof Wolicki
9e14a7ea62
Add include paths to modules in pkg/
2024-01-07 17:39:39 +01:00
Mitchell Hashimoto
efd196e5c9
pkg/freetype: unknown errors should be reported, not unreachable
2024-01-05 21:08:39 -08:00
Krzysztof Wolicki
1913243c35
WIP: Update to new build module API after Zig PR #18160
...
Temporarily change dependency sources to forks until they update
2024-01-03 21:50:32 +01:00
Mitchell Hashimoto
3fc5b02d73
pkg/fontconfig: move some dependencies to our own mirror
...
These are unmodified, so users can still verify the checksum with the
official downloads if they feel unsafe.
2024-01-02 15:27:59 -08:00
Kyaw
22d631942c
font/coretext: use `CTFontCopyFamilyName`
...
Use `CTFontCopyFamilyName` instead of `CTFontCopyDisplayName` to get
the font name to match the behavior of how it's done on freetype
backend.
2023-12-15 02:26:47 +06:30
Mitchell Hashimoto
489ed57e2f
font/harfbuzz: track x/y offsets
2023-12-11 21:41:13 -08:00
Mitchell Hashimoto
cc0b615552
pkg/macos: more APIs
2023-12-11 20:48:45 -08:00
Mitchell Hashimoto
0137f5b0d3
pkg/macos: add many more text APIs
2023-12-11 11:12:29 -08:00
Mitchell Hashimoto
ff68c56268
pkg/macos: implement CTRun
2023-12-11 11:12:28 -08:00
Carlos Alexandro Becker
25856d62aa
Remove FiraCode leftovers
...
from #993
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-06 13:36:05 -03:00
Krzysztof Wolicki
0750698b62
Update to latest master,
...
update libxev dependency,
change mach_glfw to an updated fork until upstream updates
2023-11-30 21:41:33 +01:00
Mitchell Hashimoto
5db002cb12
renderer/metal: underline urls
2023-11-29 15:30:21 -08:00
Mitchell Hashimoto
27585ae18a
pkg/oniguruma: better regex api
2023-11-29 15:29:43 -08:00
Mitchell Hashimoto
364020973c
pkg/oniguruma: search
2023-11-29 15:29:43 -08:00
Mitchell Hashimoto
4d3c7212d8
pkg/oniguruma: init regex object
2023-11-29 15:29:43 -08:00
Mitchell Hashimoto
c0a06ab523
pkg/oniguruma: basic build
2023-11-29 15:29:43 -08:00
Mitchell Hashimoto
76c76ce85e
renderer/opengl: upload kitty image textures
2023-11-19 22:08:07 -08:00
Mitchell Hashimoto
c8a51a2158
renderer/opengl: create the screen texture
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
47971e7663
renderer/opengl: setup uniform buffer objects for custom shaders
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
1fedc912f0
renderer/opengl: create ubos
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
fb0929a11b
renderer/opengl: extract cell program state to dedicated struct
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
3aa217ad2e
pkg/opengl: add Framebuffer APIs
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
8576acb89e
renderer/opengl: move opengl API to pkg/opengl
2023-11-17 21:51:04 -08:00
Mitchell Hashimoto
01a73994cb
renderer/metal: setup sampler state
2023-11-17 21:50:53 -08:00
Mitchell Hashimoto
dba78b20ca
renderer: shadertoy convert to MSL
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
1bd92619b1
renderer: shadertoy functions
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
3a4aef2dcd
pkg/spirv-cross: correct c header
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
7821e6aa3a
pkg/spirv-cross
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
6634ccc09c
pkg/spirv-cross
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
9715eef388
pkg/glslang: build SPIRV lib
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
54ee8c1e3d
pkg/glslang: complete the API
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
4afaea19d6
pkg/glslang: shader api
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
6ebbea84d5
pkg/glslang: can build
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
0230222c0d
pkg/macos: add CoreVide for DisplayLink
2023-11-17 21:50:34 -08:00
Krzysztof Wolicki
44a48f62f1
change unmodified `var`s to `const`s in anticipation of zig changes
2023-11-17 15:46:46 +01:00
Mitchell Hashimoto
4781a83e4a
replace utf8proc with ziglyph
2023-11-07 13:17:56 -08:00
Mitchell Hashimoto
cb684e35cc
font/coretext: discovery scoring should take into account symb. traits
...
Fixes #707
Our scoring algorithm previously did not take into account symbolic
traits, so when `bold = false and italic = false`, regular, bold, italic
would all be equally likely to appear first.
This modifies our scoring algorithm to prioritize matching symbolic
traits. Further, we have a special case for no symbolic traits to
prioritize "Regular" named styles. We can expand this to other styles
too but we do not do this here.
We also modified the algorithm to always prefer fonts with more glyphs
over fonts with less, hopeful that we can load fewer fonts for other
glyphs later.
2023-11-03 22:21:34 -07:00
Mitchell Hashimoto
55f681a0fd
inspector is scaled to native dpi
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
e62a8bbaae
pkg/cimgui: use freetype for font rendering
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
a6dfad9689
pkg/cimgui: requires libcpp
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
9fb4497675
pkg/cimgui: add osx backend
2023-10-24 15:27:14 -07:00