Skip to content

Commit

Permalink
docs: improve manual
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoDornelles committed Nov 10, 2024
1 parent 0dff3c4 commit 0b4a7c7
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.h linguist-language=C
*.css linguist-generated
*.cpp linguist-generated
6 changes: 6 additions & 0 deletions .github/workflows/DOCS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
-
run: |
docker run --rm -v $(pwd):/app -w /app rodrigodornelles/doxygen doxygen
-
run: |
make doxfilter
- run: |
rm html/index.html
mv html/gly__type__render_8h.html html/index.html
-
uses: actions/configure-pages@v3
-
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.zip
ascii
segments
doxfilter
html/
latex/
DS_Store
Expand Down
26 changes: 13 additions & 13 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "GlyType"
PROJECT_NUMBER = 0.0.7
PROJECT_NUMBER = 0.1
PROJECT_BRIEF = "a ultra lightweight font renderer and font"
PROJECT_LOGO =
OUTPUT_DIRECTORY = .
RECURSIVE = YES
RECURSIVE = NO
CREATE_SUBDIRS = NO
STRIP_CODE_COMMENTS = NO
CALL_GRAPH = YES
HAVE_DOT = YES
EXTRACT_ALL = YES
USE_MATHJAX = YES
EXTRACT_STATIC = YES
CALL_GRAPH = NO
HAVE_DOT = NO
EXTRACT_ALL = NO
USE_MATHJAX = NO
EXTRACT_STATIC = NO
SHORT_NAMES = NO
OPTIMIZE_OUTPUT_FOR_C = YES
INLINE_GROUPED_CLASSES = YES
INLINE_SIMPLE_STRUCTS = YES
TYPEDEF_HIDES_STRUCT = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
SOURCE_BROWSER = NO
VERBATIM_HEADERS = NO
REPEAT_BRIEF = NO
PREDEFINED = DOXYGEN=
INPUT_FILTER = ./doxfilter
PLANTUML_JAR_PATH = $(PLANTUML_JAR_PATH)
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
Expand All @@ -29,9 +30,8 @@ FILE_PATTERNS = *.c *.h
EXTENSION_MAPPING = h=c
INPUT = gly_type_render.h
MARKDOWN_ID_STYLE = GITHUB
# Theme: https://jothepro.github.io/doxygen-awesome-css/
GENERATE_TREEVIEW = YES
GENERATE_TREEVIEW = NO
DISABLE_INDEX = NO
FULL_SIDEBAR = NO
HTML_EXTRA_STYLESHEET = $(DOXYGEN_AWESOME_PATH)/doxygen-awesome.css
HTML_EXTRA_STYLESHEET = zeebo.css
HTML_COLORSTYLE = LIGHT
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
all: segments ascii
@

doxfilter: tools/doxfilter.cpp
$(CXX) -I. -o $@ $< -static

ascii: tools/ascii.c gly_type_render.h
$(CC) -I. -o $@ tools/ascii.c

Expand Down
28 changes: 23 additions & 5 deletions gly_type_render.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @file gly_type_render.h
* @short GlyType Renderer
* @short gly_type_render.h
* @brief a ultra lightweight font renderer and font
* @date 2024
* @version 0.0.7
* @version 0.1
* @author RodrigoDornelles
* @copyright
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
* as published by Sam Hocevar. @n See http://www.wtfpl.net/ for more details.
*
* @par Style
* The font style is inspired by digital displays, but not outdated,
Expand Down Expand Up @@ -43,21 +43,39 @@
* EEDDDDDDDDDDCC
* EDDDDDDDDDDDDC
* @endcode
*
* @par Source Code
*
* @sourcecode
*/

#ifndef H_GLY_TYPE_RENDER
#define H_GLY_TYPE_RENDER

#ifndef GLY_TYPE_INT
/**
* The @c GLY_TYPE_INT defines the integer type used for coordinates and sizes
* in @ref gly_type_render.
*
* @li @c int but size varies by compiler/architecture. Common in rendering
* libraries.
* @li @c uint8_t suitable for small screens or limited coordinate ranges.
* @li @c uint16_t often ideal for most cases, balancing range and
* memory efficiency.
*
* @par
* @code
* #define GLY_TYPE_INT uint16_t // Recommended for most applications
* @endcode
*/
#define GLY_TYPE_INT unsigned char
#endif

#ifdef DOXYGEN
/**
* @short safety
* @details
* The @c GLY_TYPE_SAFE macro enables a length parameter to ensure safe string
* handling in the `gly_type_render` function. When defined, it activates an
* handling in the @ref gly_type_render function. When defined, it activates an
* additional check to limit the number of processed characters, preventing
* access beyond the string's end.
*/
Expand Down
39 changes: 39 additions & 0 deletions tools/doxfilter.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions zeebo.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b4a7c7

Please sign in to comment.