401 Commits

Author SHA1 Message Date
Mitchell Hashimoto
bc0f5c3012 pkg/fontconfig module 2023-10-01 16:52:36 -07:00
Mitchell Hashimoto
3ed6a02176 pkg/utf8proc 2023-10-01 16:45:39 -07:00
Mitchell Hashimoto
5d52a94792 pkg/apple-sdk: set sysroot 2023-10-01 16:39:19 -07:00
Mitchell Hashimoto
b9cc763a3a pkg/harfbuzz needs to use apple sdk for coretext 2023-10-01 15:33:40 -07:00
Mitchell Hashimoto
5feeac66b2 pkg/pixman 2023-10-01 15:04:55 -07:00
Mitchell Hashimoto
5f8dbb498f pkg/fontconfig: depend on libxml2 2023-10-01 14:55:47 -07:00
Mitchell Hashimoto
7a27228660 pkg/libxml2 2023-10-01 12:56:20 -07:00
Mitchell Hashimoto
7edb86f9e1 pkg/fontconfig 2023-10-01 12:43:36 -07:00
Mitchell Hashimoto
2312c465c6 use package manager for font stack 2023-10-01 12:32:17 -07:00
Mitchell Hashimoto
6aef48288a pkg/harfbuzz 2023-10-01 12:23:38 -07:00
Mitchell Hashimoto
7dc3fcc41e pkg/freetype 2023-10-01 12:12:05 -07:00
Mitchell Hashimoto
6e2b7c607e pkg/libpng, pkg/zlib use package manager 2023-10-01 11:25:18 -07:00
Jonathan Marler
a0911c954e windows: fix fontconfig into libxml runtime crash from implicit func decl
Fixes the next issue on windows.  The fontconfig library is calling
the function xmlCreatePushParserCtxt from libxml2, however, the function
declaration was being omitted because fontconfig was not defining
the LIBXML_PUSH_ENABLED preprocessor symbol.  However, instead of a
compile error, C's support for implicit function declrations allows it
to happily call the function anyway, with the wrong ABI.  The main issue
was the return type being implicitly declared as "int" instead of a
pointer.  On my system this was causing the return pointer to be
truncated to 32 bits and then sign-extended which caused a segfault
once it was dereferenced.

I've gone ahead and added the -Werror=implicit-function-declaration
to fontconfig to avoid these issues in the future.  However, this
flag didn't compile on linux so I've left it as Windows only for now.

I also needed to add the LIBXML_STATIC define because not defining it
causes some functions on windows to be declared with
`__declspec(dllimport)` which results in linker errors since we are
actually statically linking libxml2.
2023-09-18 01:12:56 -06:00
Jonathan Marler
a2e881ff4e windows: initial support for zig build test
Makes progress getting "zig build test" to work on windows.  Mostly
fixed issues around build configuration and added some branches throughout
the Zig code to return/throw errors for unimplemented parts.

I also added an initial implementation for getting the home dir.
2023-09-14 03:15:40 -06:00
Mitchell Hashimoto
1ee5b7f91c font: freetype supports font variation settings 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
9d0729f17c font/coretext: ability to set variation axes 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
fb0f80f9ca macos: add necessary functions for variation axes querying 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
ea3b957bc7 quirks: Menlo/Monaco should disable ligatures by default (#331)
* font: disable default font features for Menlo and Monaco

Both of these fonts have a default ligature on "fi" which makes terminal
rendering super ugly. The easiest thing to do is special-case these
fonts and disable ligatures. It appears other terminals do the same
thing.
2023-08-25 09:29:15 -07:00
Mitchell Hashimoto
ec69644de6 move stb to src/stb, add stb_image for png decoding 2023-08-20 22:03:20 -07:00
Mitchell Hashimoto
7ccf86b175 remove imgui and devmode
imgui has been a source of compilation challenges (our fault not theirs)
and devmode hasn't worked in awhile, so drop it.
2023-08-20 08:50:24 -07:00
Mitchell Hashimoto
7659a2a733 build: fix linking bugs for macos test 2023-08-18 08:23:58 -07:00
Mitchell Hashimoto
3d23f26326 input, macos: initial work on keymapper and macos usage of it 2023-08-11 12:01:58 -07:00
Kevin Hovsäter
22b8173164 Fix typos 2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
dd18eaab5d fix various build scripts 2023-08-02 15:06:24 -07:00
Mitchell Hashimoto
d649b3f6d4 update zig 2023-08-02 14:39:19 -07:00
Mitchell Hashimoto
4bf8a0d149 font: support skew transform for auto-italics 2023-07-03 15:54:50 -07:00
Mitchell Hashimoto
0a718ec3eb pkg/macos: do not use bitCast through a function
workaround Zig issue: https://github.com/ziglang/zig/issues/16290
2023-07-01 13:38:10 -07:00
Mitchell Hashimoto
d39e3f5428 coretext: improved baseline calculation 2023-07-01 09:23:40 -07:00
Mitchell Hashimoto
a74e49833b coretext: colored glyph rendering 2023-07-01 09:23:40 -07:00
Mitchell Hashimoto
552a1b51d0 coretext: rasterization looking cleaner 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
45da58188c fix up for new zig 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
2a1cbb4f21 coretext: calculate units per em/point 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
314f9287b1 Update Zig (#164)
* update zig

* pkg/fontconfig: clean up @as

* pkg/freetype,harfbuzz: clean up @as

* pkg/imgui: clean up @as

* pkg/macos: clean up @as

* pkg/pixman,utf8proc: clean up @as

* clean up @as

* lots more @as cleanup

* undo flatpak changes

* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b Update zig, mach, fmt 2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
7116ce0806 update zig version 2023-05-29 08:24:12 -07:00
Mitchell Hashimoto
b196e43ee4 fix some issues for future Zig update 2023-05-19 08:34:07 -07:00
Mitchell Hashimoto
97d9157d22 update zig version 2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
5dc98da9a0 build compiles at least 2023-03-24 19:39:50 -07:00
Mitchell Hashimoto
2b73fbaa0d iterating on the new for loop syntax 2023-02-27 21:53:09 -08:00
Mitchell Hashimoto
8db30107ae pkg: fmt 2023-02-27 21:46:59 -08:00
Mitchell Hashimoto
ff9af8a07b lots of progress running a surface but still crashes 2023-02-19 10:44:56 -08:00
Mitchell Hashimoto
be75109a1d new build system 2023-02-14 20:58:33 -08:00
Mitchell Hashimoto
18f20add34 pkg/libuv: delete 2023-02-06 13:07:47 -08:00
Mitchell Hashimoto
e9bf2a5680 pkg/objc: extract to zig-objc repo 2023-01-02 21:35:32 -08:00
Mitchell Hashimoto
6f3bc5186d update to latest zig 2022-12-21 18:30:21 -08:00
Mitchell Hashimoto
e210c91d10 update zig version, update @call for newer zig version 2022-12-16 22:34:54 -08:00
Mitchell Hashimoto
b21e18a9e6 font: start converting Box font to our abstract canvas interface 2022-12-13 16:16:56 -08:00
Mitchell Hashimoto
c8252133a3 update zig version 2022-12-12 22:10:52 -08:00
Mitchell Hashimoto
6ad45f0237 update zig 2022-11-30 16:54:04 -08:00
Mitchell Hashimoto
abfffdcabe pkg/pixman: more getters 2022-11-27 13:54:30 -08:00