1
0
Fork 0

feat: add stubs and doc for text encodings

This commit is contained in:
Thomas Touhey 2024-04-02 18:50:06 +02:00
parent fbcbba4ee0
commit f62a3deead
6 changed files with 83 additions and 0 deletions

View File

@ -10,3 +10,4 @@
cahute/link
cahute/logging
cahute/picture
cahute/text

View File

@ -0,0 +1,18 @@
.. _header-cahute-text:
``<cahute/text.h>`` -- Text encoding related utilities for Cahute
=================================================================
Macro definitions
-----------------
``CAHUTE_TEXT_ENCODING_*`` are constants representing how a given
picture's data is encoded.
.. c:macro:: CAHUTE_TEXT_ENCODING_FONTCHARACTER_VARIABLE
Constant representing the :ref:`text-encoding-fontcharacter-variable`.
.. c:macro:: CAHUTE_TEXT_ENCODING_FONTCHARACTER_FIXED
Constant representing the :ref:`text-encoding-fontcharacter-fixed`.

View File

@ -9,6 +9,7 @@ happening in this project, and why it is happening.
:maxdepth: 2
topics/picture-formats
topics/text-encodings
topics/file-formats
topics/protocols
topics/usb-detection

View File

@ -0,0 +1,22 @@
Text encodings
==============
.. todo::
Introduce this section.
We will call CASIO's character table "FONTCHARACTER".
.. _text-encoding-fontcharacter-variable:
Variable width FONTCHARACTER encoding
-------------------------------------
.. todo:: Write this.
.. _text-encoding-fontcharacter-fixed:
Fixed-width FONTCHARACTER encoding
----------------------------------
.. todo:: Write this: fixed-width 16-bit, big endian.

View File

@ -34,4 +34,5 @@
#include <cahute/link.h>
#include <cahute/logging.h>
#include <cahute/picture.h>
#include <cahute/text.h>
#endif

40
include/cahute/text.h Normal file
View File

@ -0,0 +1,40 @@
/* ****************************************************************************
* Copyright (C) 2024 Thomas Touhey <thomas@touhey.fr>
*
* This software is governed by the CeCILL 2.1 license under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL 2.1 license
* as circulated by CEA, CNRS and INRIA at the following
* URL: https://cecill.info
*
* As a counterpart to the access to the source code and rights to copy, modify
* and redistribute granted by the license, users are provided only with a
* limited warranty and the software's author, the holder of the economic
* rights, and the successive licensors have only limited liability.
*
* In this respect, the user's attention is drawn to the risks associated with
* loading, using, modifying and/or developing or reproducing the software by
* the user in light of its specific status of free software, that may mean
* that it is complicated to manipulate, and that also therefore means that it
* is reserved for developers and experienced professionals having in-depth
* computer knowledge. Users are therefore encouraged to load and test the
* software's suitability as regards their requirements in conditions enabling
* the security of their systems and/or data to be ensured and, more generally,
* to use and operate it in the same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL 2.1 license and that you accept its terms.
* ************************************************************************* */
#ifndef CAHUTE_TEXT_H
#define CAHUTE_TEXT_H 1
#include "cdefs.h"
CAHUTE_BEGIN_NAMESPACE
#define CAHUTE_TEXT_ENCODING_FONTCHARACTER_VARIABLE 1
#define CAHUTE_TEXT_ENCODING_FONTCHARACTER_FIXED 2
CAHUTE_END_NAMESPACE
#endif /* CAHUTE_TEXT_H */