228 Commits

Author SHA1 Message Date
Mitchell Hashimoto
869e4133f1 apprt/gtk: can render imgui 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
efddef9d1c build: add cimgui to build 2023-10-24 15:27:13 -07:00
Mitchell Hashimoto
aaa74c40c3 pkg/cimgui 2023-10-24 15:27:13 -07:00
Mitchell Hashimoto
cbdf52864a Merge pull request #704 from der-teufel-programming/windows-test
Get `zig build test` working on Windows
2023-10-23 08:52:43 -07:00
Mitchell Hashimoto
b9b33ab25d pkg/fontconfig: make iconv build param non-windows specific 2023-10-23 08:40:25 -07:00
Mitchell Hashimoto
4cb185c593 pkg/harfbuzz: update to 8.2.2 2023-10-20 09:10:34 -07:00
Krzysztof Wolicki
b830deb8a9 pkg/fontconfig: windows check more readable 2023-10-19 17:21:23 +02:00
Krzysztof Wolicki
3936b471a8 Disable iconv on Windows by default (enabled via cli flag).
Skip various tests not implemented on windows.
2023-10-19 09:39:20 +02:00
James Tucker
5007e90ae5 pkg/fontconfig: move defines to fix x86_64-windows targets
Some targets were duplicated in the all-targets definition list that
will not build for a Windows target. They're all moved to the
non-Windows configuration. The target now builds against a mingw64
prefix with the appropriate dependencies installed.

Updates #437
2023-10-17 23:24:20 -07:00
Mitchell Hashimoto
eda0e8ad04 pkg/apple-sdk: update to not have any broken symlinks 2023-10-17 13:11:27 -07:00
Mitchell Hashimoto
1411015038 font: fallback search should search full discovery chain
Fixes #668

We were previously only checking the first font result in the search.
This also fixes our CoreText scoring algorithm to prioritize faces that
have the codepoint we're searching for.
2023-10-13 12:25:27 -07:00
Mitchell Hashimoto
01a8013533 pkg/harfbuzz: remove accidentally committed archive file 2023-10-09 16:05:55 -07:00
Mitchell Hashimoto
17032632cf pkg/apple-sdk: do not git clone anymore 2023-10-07 15:31:17 -07:00
Mitchell Hashimoto
8ec6828713 pkg/harfbuzz: download source using zig package manager 2023-10-07 14:51:25 -07:00
Mitchell Hashimoto
6e550bbd6b pkg/libxml2: download using zig package manager 2023-10-07 14:48:41 -07:00
Mitchell Hashimoto
1127330b3a font/coretext: score discovered fonts 2023-10-03 09:17:41 -07:00
Mitchell Hashimoto
fda56fd11f pkg/macos: MutableArray, sorting 2023-10-02 22:26:47 -07:00
Mitchell Hashimoto
0021b290cf pkg: add test targets 2023-10-01 18:43:25 -07:00
Mitchell Hashimoto
f0d4e9c7c3 pkg: remove all old build.zig files 2023-10-01 18:35:31 -07:00
Mitchell Hashimoto
4e1b3b3224 fix failing test, freetype needs libpng 2023-10-01 18:33:37 -07:00
Mitchell Hashimoto
d71197dc59 no more system_sdk 2023-10-01 17:38:30 -07:00
Mitchell Hashimoto
3a4842a0a5 fix build on linux 2023-10-01 17:32:59 -07:00
Mitchell Hashimoto
d1c993b093 pkg/tracy 2023-10-01 17:11:40 -07:00
Mitchell Hashimoto
8395bb7470 pkg/tracy 2023-10-01 17:11:04 -07:00
Mitchell Hashimoto
ec26fb7cee pkg/macos 2023-10-01 17:02:12 -07:00
Mitchell Hashimoto
fefbd7afbe pkg/pixman, utf8proc 2023-10-01 16:59:24 -07:00
Mitchell Hashimoto
2237b43df0 pkg/freetype, harfbuzz modules 2023-10-01 16:57:45 -07:00
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