added libgrapheme

font_atlas
Alessandro Mauri 2 weeks ago
parent 373243d138
commit 8cf3881b6b
  1. 1
      .gitignore
  2. 6
      TODO
  3. 3
      lib/libgrapheme.c3l/Makefile
  4. 46
      lib/libgrapheme.c3l/libgrapheme.c3i
  5. 9
      lib/libgrapheme.c3l/manifest.json
  6. 44
      lib/libgrapheme.c3l/project.json
  7. 1
      lib/libgrapheme.c3l/thirdparty/libgrapheme

1
.gitignore vendored

@ -1,3 +1,4 @@
*.o *.o
*.a
build/* build/*
**/.ccls-cache **/.ccls-cache

@ -6,6 +6,8 @@
[ ] Write a README.md [ ] Write a README.md
[ ] Use an arena allocator for cache [ ] Use an arena allocator for cache
[ ] Do not redraw if there was no update (no layout and no draw) [ ] Do not redraw if there was no update (no layout and no draw)
[ ] Better handling of the active and focused widgets, try
to maintain focus until mouse release (fix scroll bars)
## Commands ## Commands
[x] rect commads should have: [x] rect commads should have:
@ -19,11 +21,11 @@
## Fonts ## Fonts
[ ] Fix the missing alpha channel [ ] Fix the missing alpha channel
[ ] Fix the allignment [x] Fix the alignment
## Raylib ## Raylib
[ ] Implement type (Rect, Color, Point) conversion functions between rl:: and ugui:: [ ] Implement type (Rect, Color, Point) conversion functions between rl:: and ugui::
[ ] Implement pixel radius rounding for border radius [x] Implement pixel radius rounding for border radius
## Widgets ## Widgets
[ ] Dynamic text box to implement an fps counter [ ] Dynamic text box to implement an fps counter

@ -0,0 +1,3 @@
all:
make -C thirdparty/libgrapheme
cp thirdparty/libgrapheme/libgrapheme.a linux-x64/libgrapheme.a

@ -0,0 +1,46 @@
module grapheme;
const uint GRAPHEME_INVALID_CODEPOINT UINT32_C = 0xFFFD;
enum BidirectionalDirection {
GRAPHEME_BIDIRECTIONAL_DIRECTION_NEUTRAL,
GRAPHEME_BIDIRECTIONAL_DIRECTION_LTR,
GRAPHEME_BIDIRECTIONAL_DIRECTION_RTL,
}
fn isz bidirectional_get_line_embedding_levels(uint *, isz, ichar *, isz) @extern("grapheme_bidirectional_get_line_embedding_levels");
fn isz bidirectional_preprocess_paragraph(uint *, isz, BidirectionalDirection, uint *, isz, BidirectionalDirection *) @extern("grapheme_bidirectional_preprocess_paragraph");
fn isz bidirectional_reorder_line(uint *, uint *, isz, uint *, isz) @extern("grapheme_bidirectional_reorder_line");
fn isz decode_utf8(char *, isz, uint *) @extern("grapheme_decode_utf8");
fn isz encode_utf8(uint, char *, isz) @extern("grapheme_encode_utf8");
fn bool is_character_break(uint, uint, ushort *) @extern("grapheme_is_character_break");
fn bool is_lowercase(uint *, isz, isz *) @extern("grapheme_is_lowercase");
fn bool is_titlecase(uint *, isz, isz *) @extern("grapheme_is_titlecase");
fn bool is_uppercase(uint *, isz, isz *) @extern("grapheme_is_uppercase");
fn bool is_lowercase_utf8(char *, isz, isz *) @extern("grapheme_is_lowercase_utf8");
fn bool is_titlecase_utf8(char *, isz, isz *) @extern("grapheme_is_titlecase_utf8");
fn bool is_uppercase_utf8(char *, isz, isz *) @extern("grapheme_is_uppercase_utf8");
fn isz next_character_break(uint *, isz) @extern("grapheme_next_character_break");
fn isz next_line_break(uint *, isz) @extern("grapheme_next_line_break");
fn isz next_sentence_break(uint *, isz) @extern("grapheme_next_sentence_break");
fn isz next_word_break(uint *, isz) @extern("grapheme_next_word_break");
fn isz next_character_break_utf8(char *, isz) @extern("grapheme_next_character_break_utf8");
fn isz next_line_break_utf8(char *, isz) @extern("grapheme_next_line_break_utf8");
fn isz next_sentence_break_utf8(char *, isz) @extern("grapheme_next_sentence_break_utf8");
fn isz next_word_break_utf8(char *, isz) @extern("grapheme_next_word_break_utf8");
fn isz to_lowercase(uint *, isz, uint *, isz) @extern("grapheme_to_lowercase");
fn isz to_titlecase(uint *, isz, uint *, isz) @extern("grapheme_to_titlecase");
fn isz to_uppercase(uint *, isz, uint *, isz) @extern("grapheme_to_uppercase");
fn isz to_lowercase_utf8(char *, isz, char *, isz) @extern("grapheme_to_lowercase_utf8");
fn isz to_titlecase_utf8(char *, isz, char *, isz) @extern("grapheme_to_titlecase_utf8");
fn isz to_uppercase_utf8(char *, isz, char *, isz) @extern("grapheme_to_uppercase_utf8");

@ -0,0 +1,9 @@
{
"provides": "grapheme",
"targets": {
"linux-x64": {
"dependencies": [],
"linked-libraries": ["grapheme", "c"]
}
}
}

@ -0,0 +1,44 @@
{
// Language version of C3.
"langrev": "1",
// Warnings used for all targets.
"warnings": ["no-unused"],
// Directories where C3 library files may be found.
"dependency-search-paths": [".."],
// Libraries to use for all targets.
"dependencies": ["grapheme"],
// Authors, optionally with email.
"authors": ["Alessandro Mauri <alemauri001@gmail.com"],
// Version using semantic versioning.
"version": "0.1.0",
// Sources compiled for all targets.
"sources": [],
// C sources if the project also compiles C sources
// relative to the project file.
// "c-sources": [ "csource/**" ],
// Output location, relative to project file.
"output": "build",
// Architecture and OS target.
// You can use 'c3c --list-targets' to list all valid targets.
// "target": "windows-x64",
"features": [
// See rcore.c3
//"SUPPORT_INTERNAL_MEMORY_MANAGEMENT",
//"SUPPORT_STANDARD_FILEIO",
//"SUPPORT_FILE_SYSTEM_FUNCTIONS",
//"SUPPORT_DATA_ENCODER",
// See text.c3
//"SUPPORT_TEXT_CODEPOINTS_MANAGEMENT",
//"SUPPORT_TEXT_C_STRING_MANAGEMENT",
//"SUPPORT_RANDOM_GENERATION",
//"SUPPORT_RAYGUI",
//"RAYGUI_NO_ICONS",
//"RAYGUI_CUSTOM_ICONS",
],
// Global settings.
// CPU name, used for optimizations in the LLVM backend.
"cpu": "generic",
// Optimization: "O0", "O1", "O2", "O3", "O4", "O5", "Os", "Oz".
"opt": "O0"
// See resources/examples/project_all_settings.json and 'c3c --list-project-properties' to see more properties.
}

@ -0,0 +1 @@
Subproject commit 65b354f0fcb1d925f4340dbb4415ea06e8af2bec
Loading…
Cancel
Save