Go to file
Simon Anciaux f2abe27704 4ed_font_provider_freetype.cpp: Rewrote the ft__bad_rect_pack_next function. There were several issues with the previous function that didn't manifest because the default size for the font atlas is 1024 * 1024 and the default 4coder only use about 1/8 of it.
To see the issues, you can set the font atlas size to 128 * 128 by changing line 325 "ft__bad_rect_pack_init(&pack, V2i32(1024, 1024));" to "ft__bad_rect_pack_init(&pack, V2i32(128, 128));".

The first issue was that the max_dim.y parameter was not respected. The dimension produced would always grow on Y to accommodate for more characters. And so the whole texture array thing was never use.

A second issue was that when a character didn't fit on the x axis, we created a new line, but never check that the new line fitted in the current texture slice.

A third issue was that when we ended a line because a character didn't fit vertically, we grew the line with a line height equal to the height of the character that didn't fit.
2025-07-07 12:59:37 -07:00
build_new Cleaning up build-config.sh 2025-07-07 09:37:12 -07:00
code 4ed_font_provider_freetype.cpp: Rewrote the ft__bad_rect_pack_next function. There were several issues with the previous function that didn't manifest because the default size for the font atlas is 1024 * 1024 and the default 4coder only use about 1/8 of it. 2025-07-07 12:59:37 -07:00
non-source Adding freetype.lib for x64 windows dependencies 2024-03-27 13:49:16 -07:00
triage Implement new build system 2025-07-06 12:44:54 -07:00
.gitignore Implement new build system 2025-07-06 12:44:54 -07:00
4ed.rdbg Implemented custom modal bindings 2024-02-10 15:38:37 -08:00
README.md Update Readme 2023-10-28 13:14:22 +01:00
TODO.md Added scope highlight colors 2024-05-13 17:24:33 -07:00
project.4coder set NSApp activateIgnoringOtherApps to YES 2025-04-24 16:18:01 -07:00

README.md

4Coder Community

Welcome to the 4coder community repository.

Building

Windows

  1. Setup the MSVC toolchain in your environment, this can be done with the code/custom/bin/setup_cl_x64.bat script
  2. call the package.bat script from the code directory
    1. $ cd 4cc\code
    2. .\bin\package.bat
  3. You can also use the build.bat script if you want just build the binaries, this does not copy the default config, fonts and bindings
    1. $ cd 4cc\code
    2. $ .\bin\build.bat

Linux

tested on Ubuntu 22.04:

  1. Get required libraries (apt names):

    • $ sudo apt install build-essential libx11-dev libxfixes-dev libglx-dev mesa-common-dev libasound2-dev libfreetype-dev libfontconfig-dev
  2. Use the package-linux.sh script to build and package an application

    1. $ cd 4cc/code
    2. $ ./bin/package-linux.sh
  3. You can also use the build-linux.sh script if you want just build the binaries, this does not copy the default config, fonts and bindings

    1. $ cd 4cc/code
    2. $ ./bin/build-linux.sh

Mac (Untested)

  1. The steps should be the same as linux but replace the *-linux.sh with their *-mac.sh equivalents.