Commit 720241d
committed
Port font editor to SDL2
Replace X11 with SDL2 to improve the portability and cross-platform support
Migrated window creation from X11's `XCreateWindow` to `SDL_CreateWindow`.
Replaced X11 event handling with SDL2’s event loop (`SDL_PollEvent`)
to capture input events such as keyboard and mouse interactions.
Updated rendering to use `SDL_Renderer` and `SDL_Surface`,
replacing X11's rendering functions.
* Modified some key event logic:
1. SDLK_ESCAPE: ESC now exits the program.
2. SDL_QUIT: Clicking the "X" on the window exits the program.
* Unchanged key event logic:
1. SDLK_q: Switches to the next font.
* Features not fully implemented yet:
1. SDLK_s, SDLK_u, SDLK_f, SDLK_d, SDLK_DOWN:
Handling logic for stripe drawing operations.
2. SDL_WINDOWEVENT, SDL_MOUSEBUTTONDOWN.1 parent 9efea6e commit 720241d
File tree
4 files changed
+161
-146
lines changed- tools/font-edit
4 files changed
+161
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments