Open Font Render 1.2
Loading...
Searching...
No Matches
OpenFontRender.h File Reference
#include <stdarg.h>
#include <stdio.h>
#include "ft2build.h"
#include <FT_CACHE_H>
#include <FT_FREETYPE_H>
#include <functional>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#include "FileSupport.h"
Include dependency graph for OpenFontRender.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OpenFontRender
 
struct  OpenFontRender::Cursor
 Structure for handling cursor position. More...
 

Macros

#define setDrawPixel(F)   set_drawPixel([&](int32_t x, int32_t y, uint16_t c) { return F(x, y, c); })
 Set function to draw pixel to screen.
 
#define setDrawFastHLine(F)   set_drawFastHLine([&](int32_t x, int32_t y, int32_t w, uint16_t c) { return F(x, y, w, c); })
 Set function to fast draw horizontal line to screen. (Optional)
 
#define setStartWrite(F)   set_startWrite([&](void) { return F(); })
 It is called only once at the beginning of a sequence of drawings. (Optional)
 
#define setEndWrite(F)   set_endWrite([&](void) { return F(); })
 It is called only once at the beginning of a sequence of drawings. (Optional)
 
#define setPrintFunc(F)   set_printFunc([&](const char *s) { return F(s); })
 Specifies the standard output destination for the system. (Optional)
 

Enumerations

enum  OFR_DEBUG_LEVEL {
  OFR_NONE = 0 , OFR_ERROR = 1 , OFR_INFO = 2 , OFR_DEBUG = 4 ,
  OFR_RAW = 8
}
 An enumeration for specifying the debug log level. More...
 
enum class  Align {
  Left , Center , Right , TopLeft ,
  TopCenter , TopRight , MiddleLeft , MiddleCenter ,
  MiddleRight , BottomLeft , BottomCenter , BottomRight
}
 An enumeration for specifying the text alignment. More...
 
enum class  BgFillMethod { None , Minimum , Block }
 An enumeration for specifying the background drawing method. More...
 
enum class  Layout { Horizontal , Vertical }
 An enumeration for specifying the direction in which characters are written. More...
 
enum class  Drawing { Execute , Skip }
 An enumeration for specifying the whether to draw to screen. More...
 

Enumeration Type Documentation

◆ Align

enum class Align
strong

An enumeration for specifying the text alignment.

See also
PREPARING figure
Enumerator
Left 

Alias of "TopLeft".

Center 

Alias of "TopCenter".

Right 

Alias of "TopRight".

TopLeft 

The cursor position is considered to be the top-left corner of the text box.

TopCenter 

The cursor position is considered to be the top-center of the text box.

TopRight 

The cursor position is considered to be the top-right corner of the text box.

MiddleLeft 

The cursor position is considered to be the middle-left of the text box.

MiddleCenter 

The cursor position is considered to be the middle-center of the text box.

MiddleRight 

The cursor position is considered to be the middle-right of the text box.

BottomLeft 

The cursor position is considered to be the bottom-left corner of the text box.

BottomCenter 

The cursor position is considered to be the bottom-center of the text box.

BottomRight 

The cursor position is considered to be the bottom-right corner of the text box.

◆ BgFillMethod

enum class BgFillMethod
strong

An enumeration for specifying the background drawing method.

Enumerator
None 

Does not fill the background.

Minimum 

Fill in the smallest area that surrounds each character.

Block 

Fill in the smallest area that surrounds the string.

◆ Drawing

enum class Drawing
strong

An enumeration for specifying the whether to draw to screen.

Enumerator
Execute 

The drawing process is executed and the screen will be updated.

Skip 

The drawing process is skiped and the screen will not be updated.

◆ Layout

enum class Layout
strong

An enumeration for specifying the direction in which characters are written.

Enumerator
Horizontal 

Write from left to right.

Vertical 

Write from top to bottom.

◆ OFR_DEBUG_LEVEL

An enumeration for specifying the debug log level.

Enumerator
OFR_NONE 

No output.

OFR_ERROR 

Output only errors.

OFR_INFO 

Output some informations.

OFR_DEBUG 

Output character rendering result.

OFR_RAW 

Use for internal.