├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── include └── README ├── lib ├── NJU72341 │ ├── NJU72341.cpp │ └── NJU72341.h ├── OpenFontRender │ ├── .clang-format │ ├── FileSupport.cpp │ ├── FileSupport.h │ ├── OpenFontRender.cpp │ ├── OpenFontRender.h │ ├── base │ │ ├── Jamfile │ │ ├── basepic.c │ │ ├── basepic.h │ │ ├── ftadvanc.c │ │ ├── ftapi.c │ │ ├── ftbase.c │ │ ├── ftbase.h │ │ ├── ftbbox.c │ │ ├── ftbdf.c │ │ ├── ftbitmap.c │ │ ├── ftcalc.c │ │ ├── ftcid.c │ │ ├── ftdbgmem.c │ │ ├── ftdebug.c │ │ ├── ftfstype.c │ │ ├── ftgasp.c │ │ ├── ftgloadr.c │ │ ├── ftglyph.c │ │ ├── ftgxval.c │ │ ├── ftinit.c │ │ ├── ftlcdfil.c │ │ ├── ftmm.c │ │ ├── ftobjs.c │ │ ├── ftotval.c │ │ ├── ftoutln.c │ │ ├── ftpatent.c │ │ ├── ftpfr.c │ │ ├── ftpic.c │ │ ├── ftrfork.c │ │ ├── ftsnames.c │ │ ├── ftstream.c │ │ ├── ftstroke.c │ │ ├── ftsynth.c │ │ ├── ftsystem.cpp │ │ ├── fttrigon.c │ │ ├── fttype1.c │ │ ├── ftutil.c │ │ ├── ftwinfnt.c │ │ ├── ftxf86.c │ │ ├── md5.c │ │ ├── md5.h │ │ └── rules.mk │ ├── cache │ │ ├── Jamfile │ │ ├── ftcache.c │ │ ├── ftcbasic.c │ │ ├── ftccache.c │ │ ├── ftccache.h │ │ ├── ftccback.h │ │ ├── ftccmap.c │ │ ├── ftcerror.h │ │ ├── ftcglyph.c │ │ ├── ftcglyph.h │ │ ├── ftcimage.c │ │ ├── ftcimage.h │ │ ├── ftcmanag.c │ │ ├── ftcmanag.h │ │ ├── ftcmru.c │ │ ├── ftcmru.h │ │ ├── ftcsbits.c │ │ ├── ftcsbits.h │ │ └── rules.mk │ ├── freetype │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ └── ftstdlib.h │ │ ├── freetype.h │ │ ├── ftadvanc.h │ │ ├── ftautoh.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftcffdrv.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── ftxf86.h │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdriver.h │ │ │ ├── ftgloadr.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftpic.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── ftvalid.h │ │ │ ├── internal.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── services │ │ │ │ ├── svbdf.h │ │ │ │ ├── svcid.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svgxval.h │ │ │ │ ├── svkern.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svotval.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svprop.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svtteng.h │ │ │ │ ├── svttglyf.h │ │ │ │ ├── svwinfnt.h │ │ │ │ └── svxf86nm.h │ │ │ ├── sfnt.h │ │ │ ├── t1types.h │ │ │ └── tttypes.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ ├── tttags.h │ │ └── ttunpat.h │ ├── ft2build.h │ ├── module_description.h │ ├── ofrfs │ │ ├── M5Stack_SD_Preset.h │ │ ├── M5Stack_SPIFFS_Preset.h │ │ ├── VisualStudio_Preset.h │ │ └── WioTerminal_SD_Preset.h │ ├── sfnt │ │ ├── Jamfile │ │ ├── module.mk │ │ ├── rules.mk │ │ ├── sfdriver.c │ │ ├── sfdriver.h │ │ ├── sferrors.h │ │ ├── sfnt.c │ │ ├── sfntpic.c │ │ ├── sfntpic.h │ │ ├── sfobjs.c │ │ ├── sfobjs.h │ │ ├── ttbdf.c │ │ ├── ttbdf.h │ │ ├── ttcmap.c │ │ ├── ttcmap.h │ │ ├── ttcmapc.h │ │ ├── ttkern.c │ │ ├── ttkern.h │ │ ├── ttload.c │ │ ├── ttload.h │ │ ├── ttmtx.c │ │ ├── ttmtx.h │ │ ├── ttpost.c │ │ ├── ttpost.h │ │ ├── ttsbit.c │ │ ├── ttsbit.h │ │ └── ttsbit0.c │ ├── smooth │ │ ├── Jamfile │ │ ├── ftgrays.c │ │ ├── ftgrays.h │ │ ├── ftsmerrs.h │ │ ├── ftsmooth.c │ │ ├── ftsmooth.h │ │ ├── ftspic.c │ │ ├── ftspic.h │ │ ├── module.mk │ │ ├── rules.mk │ │ └── smooth.c │ └── truetype │ │ ├── Jamfile │ │ ├── module.mk │ │ ├── rules.mk │ │ ├── truetype.c │ │ ├── ttdriver.c │ │ ├── ttdriver.h │ │ ├── tterrors.h │ │ ├── ttgload.c │ │ ├── ttgload.h │ │ ├── ttinterp.c │ │ ├── ttinterp.h │ │ ├── ttobjs.c │ │ ├── ttobjs.h │ │ ├── ttpic.c │ │ ├── ttpic.h │ │ ├── ttpload.c │ │ ├── ttpload.h │ │ ├── ttsubpix.c │ │ └── ttsubpix.h ├── SI5351 │ ├── SI5351.cpp │ └── SI5351.hpp ├── fm │ ├── fm.cpp │ └── fm.h ├── fonts │ └── fonts.h └── pics │ └── pics.h ├── platformio.ini ├── resoures ├── Gear_icon_svg.svg ├── add.svg ├── calendar.svg ├── down.bmp ├── icon_usb.bmp ├── icon_usb.psd ├── icons_white.bmp ├── icos.psd ├── left.bmp ├── options2_111009.svg ├── rgb565toRGB24.js ├── right.bmp ├── up.bmp ├── サブセット文字集.txt └── 設定.psd ├── src ├── common.h ├── config.cpp ├── config.h ├── disp.cpp ├── disp.h ├── file.cpp ├── file.h ├── input.cpp ├── input.h ├── main.cpp ├── serialman.cpp ├── serialman.h ├── vgm.cpp └── vgm.h └── xgm_test ├── sharrier.gwi ├── sharrier.xgm └── wavs ├── hihat+.wav ├── hihat.wav ├── kick.wav ├── kick2+.wav ├── kick2.wav ├── o2a#+hihat+.wav ├── o2a#.wav ├── o2a.wav ├── o2b.wav ├── o2c.wav ├── o2d+hihat+.wav ├── o2d.wav ├── o2e.wav ├── o2f.wav ├── o2g#.wav ├── o2g.wav ├── o3a#.wav ├── o3a.wav ├── o3b.wav ├── o3c.wav ├── o3d.wav ├── o3e.wav ├── o3f.wav ├── o3g#.wav ├── o3g.wav ├── snare.wav ├── snare2.wav ├── tom-h.wav ├── tom-l.wav └── tom-m.wav /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | PCB 7 | docs -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "platformio.platformio-ide" 6 | ], 7 | "unwantedRecommendations": [ 8 | "ms-vscode.cpptools-extension-pack" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.page-template": "vue", 4 | "*.layout-template": "vue", 5 | "*.vue": "vue", 6 | "thread": "cpp", 7 | "*.tcc": "cpp", 8 | "deque": "cpp", 9 | "list": "cpp", 10 | "string": "cpp", 11 | "unordered_map": "cpp", 12 | "unordered_set": "cpp", 13 | "vector": "cpp", 14 | "system_error": "cpp", 15 | "array": "cpp", 16 | "string_view": "cpp", 17 | "codecvt": "cpp", 18 | "atomic": "cpp", 19 | "cctype": "cpp", 20 | "chrono": "cpp", 21 | "clocale": "cpp", 22 | "cmath": "cpp", 23 | "condition_variable": "cpp", 24 | "cstdarg": "cpp", 25 | "cstddef": "cpp", 26 | "cstdint": "cpp", 27 | "cstdio": "cpp", 28 | "cstdlib": "cpp", 29 | "cstring": "cpp", 30 | "ctime": "cpp", 31 | "cwchar": "cpp", 32 | "cwctype": "cpp", 33 | "exception": "cpp", 34 | "algorithm": "cpp", 35 | "functional": "cpp", 36 | "iterator": "cpp", 37 | "map": "cpp", 38 | "memory": "cpp", 39 | "memory_resource": "cpp", 40 | "numeric": "cpp", 41 | "optional": "cpp", 42 | "random": "cpp", 43 | "ratio": "cpp", 44 | "tuple": "cpp", 45 | "type_traits": "cpp", 46 | "utility": "cpp", 47 | "fstream": "cpp", 48 | "initializer_list": "cpp", 49 | "iomanip": "cpp", 50 | "iosfwd": "cpp", 51 | "iostream": "cpp", 52 | "istream": "cpp", 53 | "limits": "cpp", 54 | "mutex": "cpp", 55 | "new": "cpp", 56 | "ostream": "cpp", 57 | "sstream": "cpp", 58 | "stdexcept": "cpp", 59 | "streambuf": "cpp", 60 | "cinttypes": "cpp", 61 | "typeinfo": "cpp" 62 | } 63 | } -------------------------------------------------------------------------------- /include/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for project header files. 3 | 4 | A header file is a file containing C declarations and macro definitions 5 | to be shared between several project source files. You request the use of a 6 | header file in your project source file (C, C++, etc) located in `src` folder 7 | by including it, with the C preprocessing directive `#include'. 8 | 9 | ```src/main.c 10 | 11 | #include "header.h" 12 | 13 | int main (void) 14 | { 15 | ... 16 | } 17 | ``` 18 | 19 | Including a header file produces the same results as copying the header file 20 | into each source file that needs it. Such copying would be time-consuming 21 | and error-prone. With a header file, the related declarations appear 22 | in only one place. If they need to be changed, they can be changed in one 23 | place, and programs that include the header file will automatically use the 24 | new version when next recompiled. The header file eliminates the labor of 25 | finding and changing all the copies as well as the risk that a failure to 26 | find one copy will result in inconsistencies within a program. 27 | 28 | In C, the usual convention is to give header files names that end with `.h'. 29 | It is most portable to use only letters, digits, dashes, and underscores in 30 | header file names, and at most one dot. 31 | 32 | Read more about using header files in official GCC documentation: 33 | 34 | * Include Syntax 35 | * Include Operation 36 | * Once-Only Headers 37 | * Computed Includes 38 | 39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html 40 | -------------------------------------------------------------------------------- /lib/NJU72341/NJU72341.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NJU72341, NJU72342 I2C Volume Controller 3 | */ 4 | 5 | #ifndef __NJU72341_H 6 | #define __NJU72341_H 7 | 8 | #include 9 | 10 | #include "../../src/config.h" 11 | 12 | #define NJU72341_ADDR 0x44 // I2C address 13 | #define NJU72342_ADDR 0x40 // I2C address 14 | 15 | typedef enum { 16 | GAIN0 = 0, 17 | GAIN3 = 0b01010101, 18 | GAIN6 = 0b10101010, 19 | GAIN9 = 0b11111111 20 | } tNJU72341_GAIN; 21 | 22 | typedef enum { 23 | FADEOUT_BEFORE, // フェードアウト前 24 | FADEOUT_PROCESSING, // フェードアウト処理中 25 | FADEOUT_COMPLETED, // フェードアウト完了 26 | } tFadeOutStatus; 27 | 28 | class NJU72341 { 29 | public: 30 | tFadeOutStatus fadeOutStatus = FADEOUT_BEFORE; 31 | void init(uint16_t fadeOutDuration, bool NJU72342); 32 | void reset(int8_t att); 33 | void setInputGain(tNJU72341_GAIN newInputGain); 34 | void setVolume_1B_2B(uint8_t newGain); 35 | void setVolume_3B_4B(uint8_t newGain); 36 | void setVolumeAll(uint8_t newGain); 37 | void setAVolume(uint8_t step); 38 | void mute(); 39 | void unmute(); 40 | void startFadeout(); 41 | void setFadeoutDuration(uint16_t fadeOutDuration); 42 | void resetFadeout(); 43 | 44 | private: 45 | tNJU72341_GAIN _inputGain = GAIN0; 46 | bool _isMuted = false; 47 | uint8_t _currentGain = 96; 48 | uint8_t _attenuation = 0; // 音量調整値 49 | uint32_t _fadeoutStarted; // フェードアウト開始時間 50 | bool _isFadeoutEnabled; // フェードアウトするか 51 | uint16_t _fadeOutDuration; 52 | byte _slaveAddress; 53 | bool _isNJU72342; 54 | }; 55 | 56 | extern NJU72341 nju72341; 57 | 58 | #endif -------------------------------------------------------------------------------- /lib/OpenFontRender/.clang-format: -------------------------------------------------------------------------------- 1 | { BasedOnStyle: LLVM, UseTab: ForIndentation, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Attach, AllowShortIfStatementsOnASingleLine: false, AllowShortCaseLabelsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false, AlignConsecutiveAssignments: true, AlignAfterOpenBracket: true, AlignTrailingComments: true, IndentPPDirectives: BeforeHash } -------------------------------------------------------------------------------- /lib/OpenFontRender/FileSupport.h: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------- 2 | // FileSupport.h 3 | // 4 | // Copyright (c) 2021 takkaO 5 | // 6 | // If you use, modify or redistribute this file as part of 7 | // the original repository, please follow the repository's license. 8 | // 9 | // ------------------------------------------------------- 10 | 11 | #ifndef FILE_SUPPORT_H 12 | #define FILE_SUPPORT_H 13 | 14 | #include 15 | 16 | #define FT_FILE void 17 | #define ft_fclose OFR_fclose 18 | #define ft_fopen OFR_fopen 19 | #define ft_fread OFR_fread 20 | #define ft_fseek OFR_fseek 21 | #define ft_ftell OFR_ftell 22 | 23 | #if defined(_MSC_VER) // Support for VisualStudio 24 | 25 | extern "C" { 26 | void OFR_fclose(FT_FILE *stream); 27 | FT_FILE *OFR_fopen(const char *filename, const char *mode); 28 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream); 29 | int OFR_fseek(FT_FILE *stream, long int offset, int whence); 30 | long int OFR_ftell(FT_FILE *stream); 31 | 32 | void _default_OFR_fclose(FT_FILE *stream); 33 | FT_FILE *_default_OFR_fopen(const char *filename, const char *mode); 34 | size_t _default_OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream); 35 | int _default_OFR_fseek(FT_FILE *stream, long int offset, int whence); 36 | long int _default_OFR_ftell(FT_FILE *stream); 37 | } 38 | 39 | #pragma comment(linker, "/alternatename:OFR_fclose=_default_OFR_fclose") 40 | #pragma comment(linker, "/alternatename:OFR_fopen=_default_OFR_fopen") 41 | #pragma comment(linker, "/alternatename:OFR_fread=_default_OFR_fread") 42 | #pragma comment(linker, "/alternatename:OFR_fseek=_default_OFR_fseek") 43 | #pragma comment(linker, "/alternatename:OFR_ftell=_default_OFR_ftell") 44 | 45 | #else 46 | 47 | void OFR_fclose(FT_FILE *stream); 48 | FT_FILE *OFR_fopen(const char *filename, const char *mode); 49 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream); 50 | int OFR_fseek(FT_FILE *stream, long int offset, int whence); 51 | long int OFR_ftell(FT_FILE *stream); 52 | 53 | #endif 54 | 55 | #ifdef CONFIG_SPIRAM_SUPPORT 56 | #define ft_scalloc ps_calloc 57 | #define ft_smalloc ps_malloc 58 | #define ft_srealloc ps_realloc 59 | #else 60 | #define ft_scalloc calloc 61 | #define ft_smalloc malloc 62 | #define ft_srealloc realloc 63 | #endif 64 | 65 | #endif -------------------------------------------------------------------------------- /lib/OpenFontRender/base/Jamfile: -------------------------------------------------------------------------------- 1 | # FreeType 2 src/base Jamfile 2 | # 3 | # Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by 4 | # David Turner, Robert Wilhelm, and Werner Lemberg. 5 | # 6 | # This file is part of the FreeType project, and may only be used, modified, 7 | # and distributed under the terms of the FreeType project license, 8 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 9 | # indicate that you have read the license and understand and accept it 10 | # fully. 11 | 12 | SubDir FT2_TOP $(FT2_SRC_DIR) base ; 13 | 14 | 15 | { 16 | local _sources ; 17 | 18 | if $(FT2_MULTI) 19 | { 20 | _sources = ftadvanc ftcalc ftdbgmem ftgloadr 21 | ftobjs ftoutln ftrfork ftsnames 22 | ftstream fttrigon ftutil 23 | basepic ftpic 24 | ; 25 | } 26 | else 27 | { 28 | _sources = ftbase ; 29 | } 30 | 31 | Library $(FT2_LIB) : $(_sources).c ; 32 | } 33 | 34 | # Add the optional/replaceable files. 35 | # 36 | { 37 | local _sources = bbox bdf bitmap debug gasp 38 | glyph gxval init lcdfil mm 39 | otval pfr stroke synth system 40 | type1 winfnt xf86 patent 41 | ; 42 | 43 | Library $(FT2_LIB) : ft$(_sources).c ; 44 | } 45 | 46 | # Add Macintosh-specific file to the library when necessary. 47 | # 48 | if $(MAC) 49 | { 50 | Library $(FT2_LIB) : ftmac.c ; 51 | } 52 | else if $(OS) = MACOSX 53 | { 54 | if $(FT2_MULTI) 55 | { 56 | Library $(FT2_LIB) : ftmac.c ; 57 | } 58 | } 59 | 60 | # end of src/base Jamfile 61 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/basepic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* basepic.h */ 4 | /* */ 5 | /* The FreeType position independent code services for base. */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __BASEPIC_H__ 20 | #define __BASEPIC_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | #include FT_INTERNAL_PIC_H 26 | 27 | #ifndef FT_CONFIG_OPTION_PIC 28 | 29 | #define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class 30 | #define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class 31 | #define FT_DEFAULT_MODULES_GET ft_default_modules 32 | 33 | #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 34 | #define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table 35 | #endif 36 | 37 | #else /* FT_CONFIG_OPTION_PIC */ 38 | 39 | #include FT_GLYPH_H 40 | 41 | #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 42 | #include FT_INTERNAL_RFORK_H 43 | #endif 44 | 45 | 46 | typedef struct BasePIC_ 47 | { 48 | FT_Module_Class** default_module_classes; 49 | FT_Glyph_Class ft_outline_glyph_class; 50 | FT_Glyph_Class ft_bitmap_glyph_class; 51 | 52 | #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 53 | ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; 54 | #endif 55 | 56 | } BasePIC; 57 | 58 | 59 | #define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) ) 60 | 61 | #define FT_OUTLINE_GLYPH_CLASS_GET \ 62 | ( &GET_PIC( library )->ft_outline_glyph_class ) 63 | #define FT_BITMAP_GLYPH_CLASS_GET \ 64 | ( &GET_PIC( library )->ft_bitmap_glyph_class ) 65 | #define FT_DEFAULT_MODULES_GET \ 66 | ( GET_PIC( library )->default_module_classes ) 67 | 68 | #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 69 | #define FT_RACCESS_GUESS_TABLE_GET \ 70 | ( GET_PIC( library )->ft_raccess_guess_table ) 71 | #endif 72 | 73 | 74 | /* see basepic.c for the implementation */ 75 | void 76 | ft_base_pic_free( FT_Library library ); 77 | 78 | FT_Error 79 | ft_base_pic_init( FT_Library library ); 80 | 81 | #endif /* FT_CONFIG_OPTION_PIC */ 82 | 83 | /* */ 84 | 85 | FT_END_HEADER 86 | 87 | #endif /* __BASEPIC_H__ */ 88 | 89 | 90 | /* END */ 91 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftbase.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbase.c */ 4 | /* */ 5 | /* Single object library component (body only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | 21 | #define FT_MAKE_OPTION_SINGLE_OBJECT 22 | 23 | //#include "ftpic.c" 24 | //#include "basepic.c" 25 | //#include "ftadvanc.c" 26 | //#include "ftcalc.c" 27 | //#include "ftdbgmem.c" 28 | //#include "ftgloadr.c" 29 | //#include "ftobjs.c" 30 | //#include "ftoutln.c" 31 | //#include "ftrfork.c" 32 | //#include "ftsnames.c" 33 | //#include "ftstream.c" 34 | //#include "fttrigon.c" 35 | //#include "ftutil.c" 36 | 37 | #ifdef FT_MACINTOSH 38 | //#include "ftmac.c" 39 | #endif 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftbase.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbase.h */ 4 | /* */ 5 | /* The FreeType private functions used in base module (specification). */ 6 | /* */ 7 | /* Copyright 2008, 2010 by */ 8 | /* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __FTBASE_H__ 20 | #define __FTBASE_H__ 21 | 22 | 23 | #include 24 | #include FT_INTERNAL_OBJECTS_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | /* Assume the stream is sfnt-wrapped PS Type1 or sfnt-wrapped CID-keyed */ 31 | /* font, and try to load a face specified by the face_index. */ 32 | FT_LOCAL( FT_Error ) 33 | open_face_PS_from_sfnt_stream( FT_Library library, 34 | FT_Stream stream, 35 | FT_Long face_index, 36 | FT_Int num_params, 37 | FT_Parameter *params, 38 | FT_Face *aface ); 39 | 40 | 41 | /* Create a new FT_Face given a buffer and a driver name. */ 42 | /* From ftmac.c. */ 43 | FT_LOCAL( FT_Error ) 44 | open_face_from_buffer( FT_Library library, 45 | FT_Byte* base, 46 | FT_ULong size, 47 | FT_Long face_index, 48 | const char* driver_name, 49 | FT_Face *aface ); 50 | 51 | 52 | #if defined( FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK ) && \ 53 | !defined( FT_MACINTOSH ) 54 | /* Mac OS X/Darwin kernel often changes recommended method to access */ 55 | /* the resource fork and older methods makes the kernel issue the */ 56 | /* warning of deprecated method. To calm it down, the methods based */ 57 | /* on Darwin VFS should be grouped and skip the rest methods after */ 58 | /* the case the resource is opened but found to lack a font in it. */ 59 | FT_LOCAL( FT_Bool ) 60 | ft_raccess_rule_by_darwin_vfs( FT_Library library, FT_UInt rule_index ); 61 | #endif 62 | 63 | 64 | FT_END_HEADER 65 | 66 | #endif /* __FTBASE_H__ */ 67 | 68 | 69 | /* END */ 70 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftbdf.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbdf.c */ 4 | /* */ 5 | /* FreeType API for accessing BDF-specific strings (body). */ 6 | /* */ 7 | /* Copyright 2002-2004, 2013 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_INTERNAL_OBJECTS_H 21 | #include FT_SERVICE_BDF_H 22 | 23 | 24 | /* documentation is in ftbdf.h */ 25 | 26 | FT_EXPORT_DEF( FT_Error ) 27 | FT_Get_BDF_Charset_ID( FT_Face face, 28 | const char* *acharset_encoding, 29 | const char* *acharset_registry ) 30 | { 31 | FT_Error error; 32 | const char* encoding = NULL; 33 | const char* registry = NULL; 34 | 35 | 36 | error = FT_ERR( Invalid_Argument ); 37 | 38 | if ( face ) 39 | { 40 | FT_Service_BDF service; 41 | 42 | 43 | FT_FACE_FIND_SERVICE( face, service, BDF ); 44 | 45 | if ( service && service->get_charset_id ) 46 | error = service->get_charset_id( face, &encoding, ®istry ); 47 | } 48 | 49 | if ( acharset_encoding ) 50 | *acharset_encoding = encoding; 51 | 52 | if ( acharset_registry ) 53 | *acharset_registry = registry; 54 | 55 | return error; 56 | } 57 | 58 | 59 | /* documentation is in ftbdf.h */ 60 | 61 | FT_EXPORT_DEF( FT_Error ) 62 | FT_Get_BDF_Property( FT_Face face, 63 | const char* prop_name, 64 | BDF_PropertyRec *aproperty ) 65 | { 66 | FT_Error error; 67 | 68 | 69 | error = FT_ERR( Invalid_Argument ); 70 | 71 | aproperty->type = BDF_PROPERTY_TYPE_NONE; 72 | 73 | if ( face ) 74 | { 75 | FT_Service_BDF service; 76 | 77 | 78 | FT_FACE_FIND_SERVICE( face, service, BDF ); 79 | 80 | if ( service && service->get_property ) 81 | error = service->get_property( face, prop_name, aproperty ); 82 | } 83 | 84 | return error; 85 | } 86 | 87 | 88 | /* END */ 89 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftcid.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftcid.c */ 4 | /* */ 5 | /* FreeType API for accessing CID font information. */ 6 | /* */ 7 | /* Copyright 2007, 2009, 2013 by Derek Clegg, Michael Toftdal. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | 18 | #include 19 | #include FT_CID_H 20 | #include FT_INTERNAL_OBJECTS_H 21 | #include FT_SERVICE_CID_H 22 | 23 | 24 | /* documentation is in ftcid.h */ 25 | 26 | FT_EXPORT_DEF( FT_Error ) 27 | FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, 28 | const char* *registry, 29 | const char* *ordering, 30 | FT_Int *supplement) 31 | { 32 | FT_Error error; 33 | const char* r = NULL; 34 | const char* o = NULL; 35 | FT_Int s = 0; 36 | 37 | 38 | error = FT_ERR( Invalid_Argument ); 39 | 40 | if ( face ) 41 | { 42 | FT_Service_CID service; 43 | 44 | 45 | FT_FACE_FIND_SERVICE( face, service, CID ); 46 | 47 | if ( service && service->get_ros ) 48 | error = service->get_ros( face, &r, &o, &s ); 49 | } 50 | 51 | if ( registry ) 52 | *registry = r; 53 | 54 | if ( ordering ) 55 | *ordering = o; 56 | 57 | if ( supplement ) 58 | *supplement = s; 59 | 60 | return error; 61 | } 62 | 63 | 64 | FT_EXPORT_DEF( FT_Error ) 65 | FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, 66 | FT_Bool *is_cid ) 67 | { 68 | FT_Error error = FT_ERR( Invalid_Argument ); 69 | FT_Bool ic = 0; 70 | 71 | 72 | if ( face ) 73 | { 74 | FT_Service_CID service; 75 | 76 | 77 | FT_FACE_FIND_SERVICE( face, service, CID ); 78 | 79 | if ( service && service->get_is_cid ) 80 | error = service->get_is_cid( face, &ic); 81 | } 82 | 83 | if ( is_cid ) 84 | *is_cid = ic; 85 | 86 | return error; 87 | } 88 | 89 | 90 | FT_EXPORT_DEF( FT_Error ) 91 | FT_Get_CID_From_Glyph_Index( FT_Face face, 92 | FT_UInt glyph_index, 93 | FT_UInt *cid ) 94 | { 95 | FT_Error error = FT_ERR( Invalid_Argument ); 96 | FT_UInt c = 0; 97 | 98 | 99 | if ( face ) 100 | { 101 | FT_Service_CID service; 102 | 103 | 104 | FT_FACE_FIND_SERVICE( face, service, CID ); 105 | 106 | if ( service && service->get_cid_from_glyph_index ) 107 | error = service->get_cid_from_glyph_index( face, glyph_index, &c); 108 | } 109 | 110 | if ( cid ) 111 | *cid = c; 112 | 113 | return error; 114 | } 115 | 116 | 117 | /* END */ 118 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftfstype.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftfstype.c */ 4 | /* */ 5 | /* FreeType utility file to access FSType data (body). */ 6 | /* */ 7 | /* Copyright 2008, 2009 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | #include 19 | #include FT_TYPE1_TABLES_H 20 | #include FT_TRUETYPE_TABLES_H 21 | #include FT_INTERNAL_SERVICE_H 22 | #include FT_SERVICE_POSTSCRIPT_INFO_H 23 | 24 | 25 | /* documentation is in freetype.h */ 26 | 27 | FT_EXPORT_DEF( FT_UShort ) 28 | FT_Get_FSType_Flags( FT_Face face ) 29 | { 30 | TT_OS2* os2; 31 | 32 | 33 | /* first, try to get the fs_type directly from the font */ 34 | if ( face ) 35 | { 36 | FT_Service_PsInfo service = NULL; 37 | 38 | 39 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 40 | 41 | if ( service && service->ps_get_font_extra ) 42 | { 43 | PS_FontExtraRec extra; 44 | 45 | 46 | if ( !service->ps_get_font_extra( face, &extra ) && 47 | extra.fs_type != 0 ) 48 | return extra.fs_type; 49 | } 50 | } 51 | 52 | /* look at FSType before fsType for Type42 */ 53 | 54 | if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, ft_sfnt_os2 ) ) != NULL && 55 | os2->version != 0xFFFFU ) 56 | return os2->fsType; 57 | 58 | return 0; 59 | } 60 | 61 | 62 | /* END */ 63 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftgasp.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftgasp.c */ 4 | /* */ 5 | /* Access of TrueType's `gasp' table (body). */ 6 | /* */ 7 | /* Copyright 2007 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_GASP_H 21 | #include FT_INTERNAL_TRUETYPE_TYPES_H 22 | 23 | 24 | FT_EXPORT_DEF( FT_Int ) 25 | FT_Get_Gasp( FT_Face face, 26 | FT_UInt ppem ) 27 | { 28 | FT_Int result = FT_GASP_NO_TABLE; 29 | 30 | 31 | if ( face && FT_IS_SFNT( face ) ) 32 | { 33 | TT_Face ttface = (TT_Face)face; 34 | 35 | 36 | if ( ttface->gasp.numRanges > 0 ) 37 | { 38 | TT_GaspRange range = ttface->gasp.gaspRanges; 39 | TT_GaspRange range_end = range + ttface->gasp.numRanges; 40 | 41 | 42 | while ( ppem > range->maxPPEM ) 43 | { 44 | range++; 45 | if ( range >= range_end ) 46 | goto Exit; 47 | } 48 | 49 | result = range->gaspFlag; 50 | 51 | /* ensure that we don't have spurious bits */ 52 | if ( ttface->gasp.version == 0 ) 53 | result &= 3; 54 | } 55 | } 56 | Exit: 57 | return result; 58 | } 59 | 60 | 61 | /* END */ 62 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftotval.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftotval.c */ 4 | /* */ 5 | /* FreeType API for validating OpenType tables (body). */ 6 | /* */ 7 | /* Copyright 2004, 2006, 2008, 2010, 2013 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | #include 19 | #include FT_INTERNAL_DEBUG_H 20 | 21 | #include FT_INTERNAL_OBJECTS_H 22 | #include FT_SERVICE_OPENTYPE_VALIDATE_H 23 | #include FT_OPENTYPE_VALIDATE_H 24 | 25 | 26 | /* documentation is in ftotval.h */ 27 | 28 | FT_EXPORT_DEF( FT_Error ) 29 | FT_OpenType_Validate( FT_Face face, 30 | FT_UInt validation_flags, 31 | FT_Bytes *BASE_table, 32 | FT_Bytes *GDEF_table, 33 | FT_Bytes *GPOS_table, 34 | FT_Bytes *GSUB_table, 35 | FT_Bytes *JSTF_table ) 36 | { 37 | FT_Service_OTvalidate service; 38 | FT_Error error; 39 | 40 | 41 | if ( !face ) 42 | { 43 | error = FT_THROW( Invalid_Face_Handle ); 44 | goto Exit; 45 | } 46 | 47 | if ( !( BASE_table && 48 | GDEF_table && 49 | GPOS_table && 50 | GSUB_table && 51 | JSTF_table ) ) 52 | { 53 | error = FT_THROW( Invalid_Argument ); 54 | goto Exit; 55 | } 56 | 57 | FT_FACE_FIND_GLOBAL_SERVICE( face, service, OPENTYPE_VALIDATE ); 58 | 59 | if ( service ) 60 | error = service->validate( face, 61 | validation_flags, 62 | BASE_table, 63 | GDEF_table, 64 | GPOS_table, 65 | GSUB_table, 66 | JSTF_table ); 67 | else 68 | error = FT_THROW( Unimplemented_Feature ); 69 | 70 | Exit: 71 | return error; 72 | } 73 | 74 | 75 | FT_EXPORT_DEF( void ) 76 | FT_OpenType_Free( FT_Face face, 77 | FT_Bytes table ) 78 | { 79 | FT_Memory memory; 80 | 81 | 82 | if ( !face ) 83 | return; 84 | 85 | memory = FT_FACE_MEMORY( face ); 86 | 87 | FT_FREE( table ); 88 | } 89 | 90 | 91 | /* END */ 92 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftpic.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpic.c */ 4 | /* */ 5 | /* The FreeType position independent code services (body). */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_FREETYPE_H 21 | #include FT_INTERNAL_OBJECTS_H 22 | #include "basepic.h" 23 | 24 | #ifdef FT_CONFIG_OPTION_PIC 25 | 26 | /* documentation is in ftpic.h */ 27 | 28 | FT_BASE_DEF( FT_Error ) 29 | ft_pic_container_init( FT_Library library ) 30 | { 31 | FT_PIC_Container* pic_container = &library->pic_container; 32 | FT_Error error = FT_Err_Ok; 33 | 34 | 35 | FT_MEM_SET( pic_container, 0, sizeof ( *pic_container ) ); 36 | 37 | error = ft_base_pic_init( library ); 38 | if ( error ) 39 | return error; 40 | 41 | return FT_Err_Ok; 42 | } 43 | 44 | 45 | /* Destroy the contents of the container. */ 46 | FT_BASE_DEF( void ) 47 | ft_pic_container_destroy( FT_Library library ) 48 | { 49 | ft_base_pic_free( library ); 50 | } 51 | 52 | #endif /* FT_CONFIG_OPTION_PIC */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftsnames.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsnames.c */ 4 | /* */ 5 | /* Simple interface to access SFNT name tables (which are used */ 6 | /* to hold font names, copyright info, notices, etc.) (body). */ 7 | /* */ 8 | /* This is _not_ used to retrieve glyph names! */ 9 | /* */ 10 | /* Copyright 1996-2001, 2002, 2009 by */ 11 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 12 | /* */ 13 | /* This file is part of the FreeType project, and may only be used, */ 14 | /* modified, and distributed under the terms of the FreeType project */ 15 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 16 | /* this file you indicate that you have read the license and */ 17 | /* understand and accept it fully. */ 18 | /* */ 19 | /***************************************************************************/ 20 | 21 | 22 | #include 23 | #include FT_SFNT_NAMES_H 24 | #include FT_INTERNAL_TRUETYPE_TYPES_H 25 | #include FT_INTERNAL_STREAM_H 26 | 27 | 28 | #ifdef TT_CONFIG_OPTION_SFNT_NAMES 29 | 30 | 31 | /* documentation is in ftsnames.h */ 32 | 33 | FT_EXPORT_DEF( FT_UInt ) 34 | FT_Get_Sfnt_Name_Count( FT_Face face ) 35 | { 36 | return ( face && FT_IS_SFNT( face ) ) ? ((TT_Face)face)->num_names : 0; 37 | } 38 | 39 | 40 | /* documentation is in ftsnames.h */ 41 | 42 | FT_EXPORT_DEF( FT_Error ) 43 | FT_Get_Sfnt_Name( FT_Face face, 44 | FT_UInt idx, 45 | FT_SfntName *aname ) 46 | { 47 | FT_Error error = FT_ERR( Invalid_Argument ); 48 | 49 | 50 | if ( aname && face && FT_IS_SFNT( face ) ) 51 | { 52 | TT_Face ttface = (TT_Face)face; 53 | 54 | 55 | if ( idx < (FT_UInt)ttface->num_names ) 56 | { 57 | TT_NameEntryRec* entry = ttface->name_table.names + idx; 58 | 59 | 60 | /* load name on demand */ 61 | if ( entry->stringLength > 0 && entry->string == NULL ) 62 | { 63 | FT_Memory memory = face->memory; 64 | FT_Stream stream = face->stream; 65 | 66 | 67 | if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) || 68 | FT_STREAM_SEEK( entry->stringOffset ) || 69 | FT_STREAM_READ( entry->string, entry->stringLength ) ) 70 | { 71 | FT_FREE( entry->string ); 72 | entry->stringLength = 0; 73 | } 74 | } 75 | 76 | aname->platform_id = entry->platformID; 77 | aname->encoding_id = entry->encodingID; 78 | aname->language_id = entry->languageID; 79 | aname->name_id = entry->nameID; 80 | aname->string = (FT_Byte*)entry->string; 81 | aname->string_len = entry->stringLength; 82 | 83 | error = FT_Err_Ok; 84 | } 85 | } 86 | 87 | return error; 88 | } 89 | 90 | 91 | #endif /* TT_CONFIG_OPTION_SFNT_NAMES */ 92 | 93 | 94 | /* END */ 95 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/fttype1.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* fttype1.c */ 4 | /* */ 5 | /* FreeType utility file for PS names support (body). */ 6 | /* */ 7 | /* Copyright 2002-2004, 2011 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_INTERNAL_OBJECTS_H 21 | #include FT_INTERNAL_SERVICE_H 22 | #include FT_SERVICE_POSTSCRIPT_INFO_H 23 | 24 | 25 | /* documentation is in t1tables.h */ 26 | 27 | FT_EXPORT_DEF( FT_Error ) 28 | FT_Get_PS_Font_Info( FT_Face face, 29 | PS_FontInfoRec* afont_info ) 30 | { 31 | FT_Error error = FT_ERR( Invalid_Argument ); 32 | 33 | 34 | if ( face ) 35 | { 36 | FT_Service_PsInfo service = NULL; 37 | 38 | 39 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 40 | 41 | if ( service && service->ps_get_font_info ) 42 | error = service->ps_get_font_info( face, afont_info ); 43 | } 44 | 45 | return error; 46 | } 47 | 48 | 49 | /* documentation is in t1tables.h */ 50 | 51 | FT_EXPORT_DEF( FT_Int ) 52 | FT_Has_PS_Glyph_Names( FT_Face face ) 53 | { 54 | FT_Int result = 0; 55 | FT_Service_PsInfo service = NULL; 56 | 57 | 58 | if ( face ) 59 | { 60 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 61 | 62 | if ( service && service->ps_has_glyph_names ) 63 | result = service->ps_has_glyph_names( face ); 64 | } 65 | 66 | return result; 67 | } 68 | 69 | 70 | /* documentation is in t1tables.h */ 71 | 72 | FT_EXPORT_DEF( FT_Error ) 73 | FT_Get_PS_Font_Private( FT_Face face, 74 | PS_PrivateRec* afont_private ) 75 | { 76 | FT_Error error = FT_ERR( Invalid_Argument ); 77 | 78 | 79 | if ( face ) 80 | { 81 | FT_Service_PsInfo service = NULL; 82 | 83 | 84 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 85 | 86 | if ( service && service->ps_get_font_private ) 87 | error = service->ps_get_font_private( face, afont_private ); 88 | } 89 | 90 | return error; 91 | } 92 | 93 | 94 | /* documentation is in t1tables.h */ 95 | 96 | FT_EXPORT_DEF( FT_Long ) 97 | FT_Get_PS_Font_Value( FT_Face face, 98 | PS_Dict_Keys key, 99 | FT_UInt idx, 100 | void *value, 101 | FT_Long value_len ) 102 | { 103 | FT_Int result = 0; 104 | FT_Service_PsInfo service = NULL; 105 | 106 | 107 | if ( face ) 108 | { 109 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 110 | 111 | if ( service && service->ps_get_font_value ) 112 | result = service->ps_get_font_value( face, key, idx, 113 | value, value_len ); 114 | } 115 | 116 | return result; 117 | } 118 | 119 | 120 | /* END */ 121 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftwinfnt.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftwinfnt.c */ 4 | /* */ 5 | /* FreeType API for accessing Windows FNT specific info (body). */ 6 | /* */ 7 | /* Copyright 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_WINFONTS_H 21 | #include FT_INTERNAL_OBJECTS_H 22 | #include FT_SERVICE_WINFNT_H 23 | 24 | 25 | /* documentation is in ftwinfnt.h */ 26 | 27 | FT_EXPORT_DEF( FT_Error ) 28 | FT_Get_WinFNT_Header( FT_Face face, 29 | FT_WinFNT_HeaderRec *header ) 30 | { 31 | FT_Service_WinFnt service; 32 | FT_Error error; 33 | 34 | 35 | error = FT_ERR( Invalid_Argument ); 36 | 37 | if ( face != NULL ) 38 | { 39 | FT_FACE_LOOKUP_SERVICE( face, service, WINFNT ); 40 | 41 | if ( service != NULL ) 42 | { 43 | error = service->get_header( face, header ); 44 | } 45 | } 46 | 47 | return error; 48 | } 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/ftxf86.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftxf86.c */ 4 | /* */ 5 | /* FreeType utility file for X11 support (body). */ 6 | /* */ 7 | /* Copyright 2002, 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_XFREE86_H 21 | #include FT_INTERNAL_OBJECTS_H 22 | #include FT_SERVICE_XFREE86_NAME_H 23 | 24 | 25 | /* documentation is in ftxf86.h */ 26 | 27 | FT_EXPORT_DEF( const char* ) 28 | FT_Get_X11_Font_Format( FT_Face face ) 29 | { 30 | const char* result = NULL; 31 | 32 | 33 | if ( face ) 34 | FT_FACE_FIND_SERVICE( face, result, XF86_NAME ); 35 | 36 | return result; 37 | } 38 | 39 | 40 | /* END */ 41 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. 3 | * MD5 Message-Digest Algorithm (RFC 1321). 4 | * 5 | * Homepage: 6 | * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 7 | * 8 | * Author: 9 | * Alexander Peslyak, better known as Solar Designer 10 | * 11 | * This software was written by Alexander Peslyak in 2001. No copyright is 12 | * claimed, and the software is hereby placed in the public domain. 13 | * In case this attempt to disclaim copyright and place the software in the 14 | * public domain is deemed null and void, then the software is 15 | * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the 16 | * general public under the following terms: 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted. 20 | * 21 | * There's ABSOLUTELY NO WARRANTY, express or implied. 22 | * 23 | * See md5.c for more information. 24 | */ 25 | 26 | #ifdef HAVE_OPENSSL 27 | #include 28 | #elif !defined(_MD5_H) 29 | #define _MD5_H 30 | 31 | /* Any 32-bit or wider unsigned integer data type will do */ 32 | typedef unsigned int MD5_u32plus; 33 | 34 | typedef struct { 35 | MD5_u32plus lo, hi; 36 | MD5_u32plus a, b, c, d; 37 | unsigned char buffer[64]; 38 | MD5_u32plus block[16]; 39 | } MD5_CTX; 40 | 41 | extern void MD5_Init(MD5_CTX *ctx); 42 | extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size); 43 | extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /lib/OpenFontRender/base/rules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 base layer configuration rules 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2002-2009, 2013 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | # It sets the following variables which are used by the master Makefile 17 | # after the call: 18 | # 19 | # BASE_OBJ_S: The single-object base layer. 20 | # BASE_OBJ_M: A list of all objects for a multiple-objects build. 21 | # BASE_EXT_OBJ: A list of base layer extensions, i.e., components found 22 | # in `freetype/src/base' which are not compiled within the 23 | # base layer proper. 24 | 25 | 26 | BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base) 27 | 28 | 29 | # Base layer sources 30 | # 31 | # ftsystem, ftinit, and ftdebug are handled by freetype.mk 32 | # 33 | # All files listed here should be included in `ftbase.c' (for a `single' 34 | # build). 35 | # 36 | BASE_SRC := $(BASE_DIR)/ftadvanc.c \ 37 | $(BASE_DIR)/ftcalc.c \ 38 | $(BASE_DIR)/ftdbgmem.c \ 39 | $(BASE_DIR)/ftgloadr.c \ 40 | $(BASE_DIR)/ftobjs.c \ 41 | $(BASE_DIR)/ftoutln.c \ 42 | $(BASE_DIR)/ftrfork.c \ 43 | $(BASE_DIR)/ftsnames.c \ 44 | $(BASE_DIR)/ftstream.c \ 45 | $(BASE_DIR)/fttrigon.c \ 46 | $(BASE_DIR)/ftutil.c 47 | 48 | 49 | ifneq ($(ftmac_c),) 50 | BASE_SRC += $(BASE_DIR)/$(ftmac_c) 51 | endif 52 | 53 | # for simplicity, we also handle `md5.c' (which gets included by `ftobjs.h') 54 | BASE_H := $(BASE_DIR)/ftbase.h \ 55 | $(BASE_DIR)/md5.c \ 56 | $(BASE_DIR)/md5.h 57 | 58 | # Base layer `extensions' sources 59 | # 60 | # An extension is added to the library file as a separate object. It is 61 | # then linked to the final executable only if one of its symbols is used by 62 | # the application. 63 | # 64 | BASE_EXT_SRC := $(patsubst %,$(BASE_DIR)/%,$(BASE_EXTENSIONS)) 65 | 66 | # Default extensions objects 67 | # 68 | BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O) 69 | 70 | 71 | # Base layer object(s) 72 | # 73 | # BASE_OBJ_M is used during `multi' builds (each base source file compiles 74 | # to a single object file). 75 | # 76 | # BASE_OBJ_S is used during `single' builds (the whole base layer is 77 | # compiled as a single object file using ftbase.c). 78 | # 79 | BASE_OBJ_M := $(BASE_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O) 80 | BASE_OBJ_S := $(OBJ_DIR)/ftbase.$O 81 | 82 | # Base layer root source file for single build 83 | # 84 | BASE_SRC_S := $(BASE_DIR)/ftbase.c 85 | 86 | 87 | # Base layer - single object build 88 | # 89 | $(BASE_OBJ_S): $(BASE_SRC_S) $(BASE_SRC) $(FREETYPE_H) $(BASE_H) 90 | $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BASE_SRC_S)) 91 | 92 | 93 | # Multiple objects build + extensions 94 | # 95 | $(OBJ_DIR)/%.$O: $(BASE_DIR)/%.c $(FREETYPE_H) $(BASE_H) 96 | $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 97 | 98 | 99 | # EOF 100 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/Jamfile: -------------------------------------------------------------------------------- 1 | # FreeType 2 src/cache Jamfile 2 | # 3 | # Copyright 2001, 2003, 2004 by 4 | # David Turner, Robert Wilhelm, and Werner Lemberg. 5 | # 6 | # This file is part of the FreeType project, and may only be used, modified, 7 | # and distributed under the terms of the FreeType project license, 8 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 9 | # indicate that you have read the license and understand and accept it 10 | # fully. 11 | 12 | SubDir FT2_TOP $(FT2_SRC_DIR) cache ; 13 | 14 | # The file contains some macro definitions that are 15 | # later used in #include statements related to the cache sub-system. It 16 | # needs to be parsed through a HDRMACRO rule for macro definitions. 17 | # 18 | HDRMACRO [ FT2_SubDir include ftcache.h ] ; 19 | 20 | { 21 | local _sources ; 22 | 23 | if $(FT2_MULTI) 24 | { 25 | _sources = ftcmru 26 | ftcmanag 27 | ftccache 28 | ftcglyph 29 | ftcsbits 30 | ftcimage 31 | ftcbasic 32 | ftccmap 33 | ; 34 | } 35 | else 36 | { 37 | _sources = ftcache ; 38 | } 39 | 40 | Library $(FT2_LIB) : $(_sources).c ; 41 | } 42 | 43 | # end of src/cache Jamfile 44 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/ftcache.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftcache.c */ 4 | /* */ 5 | /* The FreeType Caching sub-system (body only). */ 6 | /* */ 7 | /* Copyright 2000-2001, 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include 22 | //#include "ftcmru.c" 23 | //#include "ftcmanag.c" 24 | //#include "ftccache.c" 25 | //#include "ftccmap.c" 26 | //#include "ftcglyph.c" 27 | //#include "ftcimage.c" 28 | //#include "ftcsbits.c" 29 | //#include "ftcbasic.c" 30 | 31 | /* END */ 32 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/ftccback.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftccback.h */ 4 | /* */ 5 | /* Callback functions of the caching sub-system (specification only). */ 6 | /* */ 7 | /* Copyright 2004, 2005, 2006, 2011 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | #ifndef __FTCCBACK_H__ 19 | #define __FTCCBACK_H__ 20 | 21 | #include 22 | #include FT_CACHE_H 23 | #include "ftcmru.h" 24 | #include "ftcimage.h" 25 | #include "ftcmanag.h" 26 | #include "ftcglyph.h" 27 | #include "ftcsbits.h" 28 | 29 | 30 | FT_LOCAL( void ) 31 | ftc_inode_free( FTC_Node inode, 32 | FTC_Cache cache ); 33 | 34 | FT_LOCAL( FT_Error ) 35 | ftc_inode_new( FTC_Node *pinode, 36 | FT_Pointer gquery, 37 | FTC_Cache cache ); 38 | 39 | FT_LOCAL( FT_Offset ) 40 | ftc_inode_weight( FTC_Node inode, 41 | FTC_Cache cache ); 42 | 43 | 44 | FT_LOCAL( void ) 45 | ftc_snode_free( FTC_Node snode, 46 | FTC_Cache cache ); 47 | 48 | FT_LOCAL( FT_Error ) 49 | ftc_snode_new( FTC_Node *psnode, 50 | FT_Pointer gquery, 51 | FTC_Cache cache ); 52 | 53 | FT_LOCAL( FT_Offset ) 54 | ftc_snode_weight( FTC_Node snode, 55 | FTC_Cache cache ); 56 | 57 | FT_LOCAL( FT_Bool ) 58 | ftc_snode_compare( FTC_Node snode, 59 | FT_Pointer gquery, 60 | FTC_Cache cache, 61 | FT_Bool* list_changed ); 62 | 63 | 64 | FT_LOCAL( FT_Bool ) 65 | ftc_gnode_compare( FTC_Node gnode, 66 | FT_Pointer gquery, 67 | FTC_Cache cache, 68 | FT_Bool* list_changed ); 69 | 70 | 71 | FT_LOCAL( FT_Error ) 72 | ftc_gcache_init( FTC_Cache cache ); 73 | 74 | FT_LOCAL( void ) 75 | ftc_gcache_done( FTC_Cache cache ); 76 | 77 | 78 | FT_LOCAL( FT_Error ) 79 | ftc_cache_init( FTC_Cache cache ); 80 | 81 | FT_LOCAL( void ) 82 | ftc_cache_done( FTC_Cache cache ); 83 | 84 | #ifndef FT_CONFIG_OPTION_OLD_INTERNALS 85 | FT_LOCAL( void ) 86 | ftc_node_destroy( FTC_Node node, 87 | FTC_Manager manager ); 88 | #endif 89 | 90 | #endif /* __FTCCBACK_H__ */ 91 | 92 | /* END */ 93 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/ftcerror.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftcerror.h */ 4 | /* */ 5 | /* Caching sub-system error codes (specification only). */ 6 | /* */ 7 | /* Copyright 2001, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is used to define the caching sub-system error enumeration */ 22 | /* constants. */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | #ifndef __FTCERROR_H__ 27 | #define __FTCERROR_H__ 28 | 29 | #include FT_MODULE_ERRORS_H 30 | 31 | #undef __FTERRORS_H__ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX FTC_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_Cache 36 | 37 | #include FT_ERRORS_H 38 | 39 | #endif /* __FTCERROR_H__ */ 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/ftcsbits.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftcsbits.h */ 4 | /* */ 5 | /* A small-bitmap cache (specification). */ 6 | /* */ 7 | /* Copyright 2000-2001, 2002, 2003, 2006, 2011 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __FTCSBITS_H__ 20 | #define __FTCSBITS_H__ 21 | 22 | 23 | #include 24 | #include FT_CACHE_H 25 | #include "ftcglyph.h" 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | #define FTC_SBIT_ITEMS_PER_NODE 16 31 | 32 | typedef struct FTC_SNodeRec_ 33 | { 34 | FTC_GNodeRec gnode; 35 | FT_UInt count; 36 | FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE]; 37 | 38 | } FTC_SNodeRec, *FTC_SNode; 39 | 40 | 41 | #define FTC_SNODE( x ) ( (FTC_SNode)( x ) ) 42 | #define FTC_SNODE_GINDEX( x ) FTC_GNODE( x )->gindex 43 | #define FTC_SNODE_FAMILY( x ) FTC_GNODE( x )->family 44 | 45 | typedef FT_UInt 46 | (*FTC_SFamily_GetCountFunc)( FTC_Family family, 47 | FTC_Manager manager ); 48 | 49 | typedef FT_Error 50 | (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family, 51 | FT_UInt gindex, 52 | FTC_Manager manager, 53 | FT_Face *aface ); 54 | 55 | typedef struct FTC_SFamilyClassRec_ 56 | { 57 | FTC_MruListClassRec clazz; 58 | FTC_SFamily_GetCountFunc family_get_count; 59 | FTC_SFamily_LoadGlyphFunc family_load_glyph; 60 | 61 | } FTC_SFamilyClassRec; 62 | 63 | typedef const FTC_SFamilyClassRec* FTC_SFamilyClass; 64 | 65 | #define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x)) 66 | 67 | #define FTC_CACHE__SFAMILY_CLASS( x ) \ 68 | FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class ) 69 | 70 | 71 | FT_LOCAL( void ) 72 | FTC_SNode_Free( FTC_SNode snode, 73 | FTC_Cache cache ); 74 | 75 | FT_LOCAL( FT_Error ) 76 | FTC_SNode_New( FTC_SNode *psnode, 77 | FTC_GQuery gquery, 78 | FTC_Cache cache ); 79 | 80 | #if 0 81 | FT_LOCAL( FT_ULong ) 82 | FTC_SNode_Weight( FTC_SNode inode ); 83 | #endif 84 | 85 | 86 | #ifdef FTC_INLINE 87 | 88 | FT_LOCAL( FT_Bool ) 89 | FTC_SNode_Compare( FTC_SNode snode, 90 | FTC_GQuery gquery, 91 | FTC_Cache cache, 92 | FT_Bool* list_changed); 93 | 94 | #endif 95 | 96 | /* */ 97 | 98 | FT_END_HEADER 99 | 100 | #endif /* __FTCSBITS_H__ */ 101 | 102 | 103 | /* END */ 104 | -------------------------------------------------------------------------------- /lib/OpenFontRender/cache/rules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 Cache configuration rules 3 | # 4 | 5 | 6 | # Copyright 2000, 2001, 2003, 2004, 2006, 2008 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | # Cache driver directory 17 | # 18 | CACHE_DIR := $(SRC_DIR)/cache 19 | 20 | # compilation flags for the driver 21 | # 22 | CACHE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CACHE_DIR)) 23 | 24 | 25 | # Cache driver sources (i.e., C files) 26 | # 27 | CACHE_DRV_SRC := $(CACHE_DIR)/ftcbasic.c \ 28 | $(CACHE_DIR)/ftccache.c \ 29 | $(CACHE_DIR)/ftccmap.c \ 30 | $(CACHE_DIR)/ftcglyph.c \ 31 | $(CACHE_DIR)/ftcimage.c \ 32 | $(CACHE_DIR)/ftcmanag.c \ 33 | $(CACHE_DIR)/ftcmru.c \ 34 | $(CACHE_DIR)/ftcsbits.c 35 | 36 | # Cache driver headers 37 | # 38 | CACHE_DRV_H := $(CACHE_DIR)/ftccache.h \ 39 | $(CACHE_DIR)/ftccback.h \ 40 | $(CACHE_DIR)/ftcerror.h \ 41 | $(CACHE_DIR)/ftcglyph.h \ 42 | $(CACHE_DIR)/ftcimage.h \ 43 | $(CACHE_DIR)/ftcmanag.h \ 44 | $(CACHE_DIR)/ftcmru.h \ 45 | $(CACHE_DIR)/ftcsbits.h 46 | 47 | 48 | # Cache driver object(s) 49 | # 50 | # CACHE_DRV_OBJ_M is used during `multi' builds. 51 | # CACHE_DRV_OBJ_S is used during `single' builds. 52 | # 53 | CACHE_DRV_OBJ_M := $(CACHE_DRV_SRC:$(CACHE_DIR)/%.c=$(OBJ_DIR)/%.$O) 54 | CACHE_DRV_OBJ_S := $(OBJ_DIR)/ftcache.$O 55 | 56 | # Cache driver source file for single build 57 | # 58 | CACHE_DRV_SRC_S := $(CACHE_DIR)/ftcache.c 59 | 60 | 61 | # Cache driver - single object 62 | # 63 | $(CACHE_DRV_OBJ_S): $(CACHE_DRV_SRC_S) $(CACHE_DRV_SRC) \ 64 | $(FREETYPE_H) $(CACHE_DRV_H) 65 | $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CACHE_DRV_SRC_S)) 66 | 67 | 68 | # Cache driver - multiple objects 69 | # 70 | $(OBJ_DIR)/%.$O: $(CACHE_DIR)/%.c $(FREETYPE_H) $(CACHE_DRV_H) 71 | $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 72 | 73 | 74 | # update main driver object lists 75 | # 76 | DRV_OBJS_S += $(CACHE_DRV_OBJ_S) 77 | DRV_OBJS_M += $(CACHE_DRV_OBJ_M) 78 | 79 | 80 | # EOF 81 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | //FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | //FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | //FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | //FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | //FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | //FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | //FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/ftpic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpic.h */ 4 | /* */ 5 | /* The FreeType position independent code services (declaration). */ 6 | /* */ 7 | /* Copyright 2009, 2012 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | /*************************************************************************/ 19 | /* */ 20 | /* Modules that ordinarily have const global data that need address */ 21 | /* can instead define pointers here. */ 22 | /* */ 23 | /*************************************************************************/ 24 | 25 | 26 | #ifndef __FTPIC_H__ 27 | #define __FTPIC_H__ 28 | 29 | 30 | FT_BEGIN_HEADER 31 | 32 | #ifdef FT_CONFIG_OPTION_PIC 33 | 34 | typedef struct FT_PIC_Container_ 35 | { 36 | /* pic containers for base */ 37 | void* base; 38 | 39 | /* pic containers for modules */ 40 | void* autofit; 41 | void* cff; 42 | void* pshinter; 43 | void* psnames; 44 | void* raster; 45 | void* sfnt; 46 | void* smooth; 47 | void* truetype; 48 | 49 | } FT_PIC_Container; 50 | 51 | 52 | /* Initialize the various function tables, structs, etc. */ 53 | /* stored in the container. */ 54 | FT_BASE( FT_Error ) 55 | ft_pic_container_init( FT_Library library ); 56 | 57 | 58 | /* Destroy the contents of the container. */ 59 | FT_BASE( void ) 60 | ft_pic_container_destroy( FT_Library library ); 61 | 62 | #endif /* FT_CONFIG_OPTION_PIC */ 63 | 64 | /* */ 65 | 66 | FT_END_HEADER 67 | 68 | #endif /* __FTPIC_H__ */ 69 | 70 | 71 | /* END */ 72 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/internal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* internal.h */ 4 | /* */ 5 | /* Internal header files (specification only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is automatically included by `ft2build.h'. */ 22 | /* Do not include it manually! */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | 27 | #define FT_INTERNAL_OBJECTS_H 28 | #define FT_INTERNAL_PIC_H 29 | #define FT_INTERNAL_STREAM_H 30 | #define FT_INTERNAL_MEMORY_H 31 | #define FT_INTERNAL_DEBUG_H 32 | #define FT_INTERNAL_CALC_H 33 | #define FT_INTERNAL_DRIVER_H 34 | #define FT_INTERNAL_TRACE_H 35 | #define FT_INTERNAL_GLYPH_LOADER_H 36 | #define FT_INTERNAL_SFNT_H 37 | #define FT_INTERNAL_SERVICE_H 38 | #define FT_INTERNAL_RFORK_H 39 | #define FT_INTERNAL_VALIDATE_H 40 | 41 | #define FT_INTERNAL_TRUETYPE_TYPES_H 42 | #define FT_INTERNAL_TYPE1_TYPES_H 43 | 44 | #define FT_INTERNAL_POSTSCRIPT_AUX_H 45 | #define FT_INTERNAL_POSTSCRIPT_HINTS_H 46 | #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H 47 | 48 | #define FT_INTERNAL_AUTOHINT_H 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2009, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_BDFRec( class_, \ 52 | get_charset_id_, \ 53 | get_property_ ) \ 54 | static const FT_Service_BDFRec class_ = \ 55 | { \ 56 | get_charset_id_, get_property_ \ 57 | }; 58 | 59 | #else /* FT_CONFIG_OPTION_PIC */ 60 | 61 | #define FT_DEFINE_SERVICE_BDFRec( class_, \ 62 | get_charset_id_, \ 63 | get_property_ ) \ 64 | void \ 65 | FT_Init_Class_ ## class_( FT_Service_BDFRec* clazz ) \ 66 | { \ 67 | clazz->get_charset_id = get_charset_id_; \ 68 | clazz->get_property = get_property_; \ 69 | } 70 | 71 | #endif /* FT_CONFIG_OPTION_PIC */ 72 | 73 | /* */ 74 | 75 | 76 | FT_END_HEADER 77 | 78 | 79 | #endif /* __SVBDF_H__ */ 80 | 81 | 82 | /* END */ 83 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2009, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | 55 | #ifndef FT_CONFIG_OPTION_PIC 56 | 57 | #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ 58 | get_name_, \ 59 | name_index_) \ 60 | static const FT_Service_GlyphDictRec class_ = \ 61 | { \ 62 | get_name_, name_index_ \ 63 | }; 64 | 65 | #else /* FT_CONFIG_OPTION_PIC */ 66 | 67 | #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ 68 | get_name_, \ 69 | name_index_) \ 70 | void \ 71 | FT_Init_Class_ ## class_( FT_Library library, \ 72 | FT_Service_GlyphDictRec* clazz ) \ 73 | { \ 74 | FT_UNUSED( library ); \ 75 | \ 76 | clazz->get_name = get_name_; \ 77 | clazz->name_index = name_index_; \ 78 | } 79 | 80 | #endif /* FT_CONFIG_OPTION_PIC */ 81 | 82 | /* */ 83 | 84 | 85 | FT_END_HEADER 86 | 87 | 88 | #endif /* __SVGLDICT_H__ */ 89 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svgxval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgxval.h */ 4 | /* */ 5 | /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2005 by */ 8 | /* Masatake YAMATO, Red Hat K.K., */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | /***************************************************************************/ 20 | /* */ 21 | /* gxvalid is derived from both gxlayout module and otvalid module. */ 22 | /* Development of gxlayout is supported by the Information-technology */ 23 | /* Promotion Agency(IPA), Japan. */ 24 | /* */ 25 | /***************************************************************************/ 26 | 27 | 28 | #ifndef __SVGXVAL_H__ 29 | #define __SVGXVAL_H__ 30 | 31 | #include FT_GX_VALIDATE_H 32 | #include FT_INTERNAL_VALIDATE_H 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | #define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" 38 | #define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" 39 | 40 | typedef FT_Error 41 | (*gxv_validate_func)( FT_Face face, 42 | FT_UInt gx_flags, 43 | FT_Bytes tables[FT_VALIDATE_GX_LENGTH], 44 | FT_UInt table_length ); 45 | 46 | 47 | typedef FT_Error 48 | (*ckern_validate_func)( FT_Face face, 49 | FT_UInt ckern_flags, 50 | FT_Bytes *ckern_table ); 51 | 52 | 53 | FT_DEFINE_SERVICE( GXvalidate ) 54 | { 55 | gxv_validate_func validate; 56 | }; 57 | 58 | FT_DEFINE_SERVICE( CKERNvalidate ) 59 | { 60 | ckern_validate_func validate; 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* __SVGXVAL_H__ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svkern.h */ 4 | /* */ 5 | /* The FreeType Kerning service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVKERN_H__ 20 | #define __SVKERN_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* __SVKERN_H__ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVOTVAL_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpfr.h */ 4 | /* */ 5 | /* Internal PFR service functions (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPFR_H__ 20 | #define __SVPFR_H__ 21 | 22 | #include FT_PFR_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | /* */ 60 | 61 | FT_END_HEADER 62 | 63 | #endif /* __SVPFR_H__ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2007, 2009, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The corresponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | 50 | #ifndef FT_CONFIG_OPTION_PIC 51 | 52 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ 53 | static const FT_Service_PsFontNameRec class_ = \ 54 | { \ 55 | get_ps_font_name_ \ 56 | }; 57 | 58 | #else /* FT_CONFIG_OPTION_PIC */ 59 | 60 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ 61 | void \ 62 | FT_Init_Class_ ## class_( FT_Library library, \ 63 | FT_Service_PsFontNameRec* clazz ) \ 64 | { \ 65 | FT_UNUSED( library ); \ 66 | \ 67 | clazz->get_ps_font_name = get_ps_font_name_; \ 68 | } 69 | 70 | #endif /* FT_CONFIG_OPTION_PIC */ 71 | 72 | /* */ 73 | 74 | 75 | FT_END_HEADER 76 | 77 | 78 | #endif /* __SVPOSTNM_H__ */ 79 | 80 | 81 | /* END */ 82 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svprop.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svprop.h */ 4 | /* */ 5 | /* The FreeType property service (specification). */ 6 | /* */ 7 | /* Copyright 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPROP_H__ 20 | #define __SVPROP_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | 26 | #define FT_SERVICE_ID_PROPERTIES "properties" 27 | 28 | 29 | typedef FT_Error 30 | (*FT_Properties_SetFunc)( FT_Module module, 31 | const char* property_name, 32 | const void* value ); 33 | 34 | typedef FT_Error 35 | (*FT_Properties_GetFunc)( FT_Module module, 36 | const char* property_name, 37 | void* value ); 38 | 39 | 40 | FT_DEFINE_SERVICE( Properties ) 41 | { 42 | FT_Properties_SetFunc set_property; 43 | FT_Properties_GetFunc get_property; 44 | }; 45 | 46 | 47 | #ifndef FT_CONFIG_OPTION_PIC 48 | 49 | #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ 50 | set_property_, \ 51 | get_property_ ) \ 52 | static const FT_Service_PropertiesRec class_ = \ 53 | { \ 54 | set_property_, \ 55 | get_property_ \ 56 | }; 57 | 58 | #else /* FT_CONFIG_OPTION_PIC */ 59 | 60 | #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ 61 | set_property_, \ 62 | get_property_ ) \ 63 | void \ 64 | FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \ 65 | { \ 66 | clazz->set_property = set_property_; \ 67 | clazz->get_property = get_property_; \ 68 | } 69 | 70 | #endif /* FT_CONFIG_OPTION_PIC */ 71 | 72 | /* */ 73 | 74 | 75 | FT_END_HEADER 76 | 77 | 78 | #endif /* __SVPROP_H__ */ 79 | 80 | 81 | /* END */ 82 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svsfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svsfnt.h */ 4 | /* */ 5 | /* The FreeType SFNT table loading service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004, 2009, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVSFNT_H__ 20 | #define __SVSFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" 34 | 35 | 36 | /* 37 | * Used to implement FT_Load_Sfnt_Table(). 38 | */ 39 | typedef FT_Error 40 | (*FT_SFNT_TableLoadFunc)( FT_Face face, 41 | FT_ULong tag, 42 | FT_Long offset, 43 | FT_Byte* buffer, 44 | FT_ULong* length ); 45 | 46 | /* 47 | * Used to implement FT_Get_Sfnt_Table(). 48 | */ 49 | typedef void* 50 | (*FT_SFNT_TableGetFunc)( FT_Face face, 51 | FT_Sfnt_Tag tag ); 52 | 53 | 54 | /* 55 | * Used to implement FT_Sfnt_Table_Info(). 56 | */ 57 | typedef FT_Error 58 | (*FT_SFNT_TableInfoFunc)( FT_Face face, 59 | FT_UInt idx, 60 | FT_ULong *tag, 61 | FT_ULong *offset, 62 | FT_ULong *length ); 63 | 64 | 65 | FT_DEFINE_SERVICE( SFNT_Table ) 66 | { 67 | FT_SFNT_TableLoadFunc load_table; 68 | FT_SFNT_TableGetFunc get_table; 69 | FT_SFNT_TableInfoFunc table_info; 70 | }; 71 | 72 | 73 | #ifndef FT_CONFIG_OPTION_PIC 74 | 75 | #define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ 76 | static const FT_Service_SFNT_TableRec class_ = \ 77 | { \ 78 | load_, get_, info_ \ 79 | }; 80 | 81 | #else /* FT_CONFIG_OPTION_PIC */ 82 | 83 | #define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ 84 | void \ 85 | FT_Init_Class_ ## class_( FT_Service_SFNT_TableRec* clazz ) \ 86 | { \ 87 | clazz->load_table = load_; \ 88 | clazz->get_table = get_; \ 89 | clazz->table_info = info_; \ 90 | } 91 | 92 | #endif /* FT_CONFIG_OPTION_PIC */ 93 | 94 | /* */ 95 | 96 | 97 | FT_END_HEADER 98 | 99 | 100 | #endif /* __SVSFNT_H__ */ 101 | 102 | 103 | /* END */ 104 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svtteng.h */ 4 | /* */ 5 | /* The FreeType TrueType engine query service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVTTENG_H__ 20 | #define __SVTTENG_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVTTENG_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svttglyf.h */ 4 | /* */ 5 | /* The FreeType TrueType glyph service. */ 6 | /* */ 7 | /* Copyright 2007, 2009, 2012 by David Turner. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | #ifndef __SVTTGLYF_H__ 18 | #define __SVTTGLYF_H__ 19 | 20 | #include FT_INTERNAL_SERVICE_H 21 | #include FT_TRUETYPE_TABLES_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 28 | 29 | 30 | typedef FT_ULong 31 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 32 | FT_UInt gindex, 33 | FT_ULong *psize ); 34 | 35 | FT_DEFINE_SERVICE( TTGlyf ) 36 | { 37 | TT_Glyf_GetLocationFunc get_location; 38 | }; 39 | 40 | 41 | #ifndef FT_CONFIG_OPTION_PIC 42 | 43 | #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ 44 | static const FT_Service_TTGlyfRec class_ = \ 45 | { \ 46 | get_location_ \ 47 | }; 48 | 49 | #else /* FT_CONFIG_OPTION_PIC */ 50 | 51 | #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ 52 | void \ 53 | FT_Init_Class_ ## class_( FT_Service_TTGlyfRec* clazz ) \ 54 | { \ 55 | clazz->get_location = get_location_; \ 56 | } 57 | 58 | #endif /* FT_CONFIG_OPTION_PIC */ 59 | 60 | /* */ 61 | 62 | 63 | FT_END_HEADER 64 | 65 | #endif /* __SVTTGLYF_H__ */ 66 | 67 | 68 | /* END */ 69 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /lib/OpenFontRender/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /lib/OpenFontRender/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default `ft2build.h' file for */ 23 | /* FreeType 2. It uses the `freetype' include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #define FT2_BUILD_LIBRARY 35 | 36 | #include 37 | 38 | #endif /* __FT2_BUILD_GENERIC_H__ */ 39 | 40 | 41 | /* END */ 42 | 43 | -------------------------------------------------------------------------------- /lib/OpenFontRender/module_description.h: -------------------------------------------------------------------------------- 1 | #ifndef OFR_MODULE_DESCRIPTION_H 2 | #define OFR_MODULE_DESCRIPTION_H 3 | 4 | /** 5 | * @defgroup rtos_api FreeRTOS-related APIs 6 | * This is a group of methods related to FreeRTOS. 7 | */ 8 | 9 | /** 10 | * @defgroup cursor_api Cursor-related APIs 11 | * This is a group of methods related to control cursor. 12 | */ 13 | 14 | /** 15 | * @defgroup font_api Font-related APIs 16 | * This is a group of methods related to font control. 17 | */ 18 | 19 | /** 20 | * @defgroup layout_api Text-layout-related APIs 21 | * This is a group of methods related to text layout. 22 | */ 23 | 24 | /** 25 | * @defgroup rendering_api Rendering-related APIs 26 | * This is a group of methods related to text rendering. 27 | */ 28 | 29 | /** 30 | * @defgroup utility_api Utility APIs 31 | * This is a group of utility methods. 32 | */ 33 | 34 | 35 | #endif /* OFR_MODULE_DESCRIPTION_H */ -------------------------------------------------------------------------------- /lib/OpenFontRender/ofrfs/M5Stack_SD_Preset.h: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------- 2 | // M5Stack_SD_Preset.h 3 | // 4 | // Copyright (c) 2021 takkaO 5 | // 6 | // If you use, modify, or redistribute this file independently 7 | // of the original repository, this program is licensed under 8 | // the MIT License. 9 | // 10 | // If you use, modify or redistribute this file as part of 11 | // the original repository, please follow the repository's license. 12 | // 13 | // ------------------------------------------------------- 14 | 15 | #ifndef OFR_M5STACK_SD_PRESET_H 16 | #define OFR_M5STACK_SD_PRESET_H 17 | 18 | #include 19 | #include 20 | 21 | std::list ofr_file_list; // For multiple file loading 22 | 23 | FT_FILE *OFR_fopen(const char *filename, const char *mode) { 24 | File f = SD.open(filename, mode); 25 | ofr_file_list.push_back(f); 26 | return &ofr_file_list.back(); 27 | } 28 | 29 | void OFR_fclose(FT_FILE *stream) { 30 | ((File *)stream)->close(); 31 | } 32 | 33 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream) { 34 | return ((File *)stream)->read((uint8_t *)ptr, size * nmemb); 35 | } 36 | 37 | int OFR_fseek(FT_FILE *stream, long int offset, int whence) { 38 | return ((File *)stream)->seek(offset, (SeekMode)whence); 39 | } 40 | 41 | long int OFR_ftell(FT_FILE *stream) { 42 | return ((File *)stream)->position(); 43 | } 44 | 45 | #endif /* OFR_M5STACK_SD_PRESET_H */ -------------------------------------------------------------------------------- /lib/OpenFontRender/ofrfs/M5Stack_SPIFFS_Preset.h: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------- 2 | // M5Stack_SPIFFS_Preset.h 3 | // 4 | // Copyright (c) 2021 takkaO 5 | // 6 | // If you use, modify, or redistribute this file independently 7 | // of the original repository, this program is licensed under 8 | // the MIT License. 9 | // 10 | // If you use, modify or redistribute this file as part of 11 | // the original repository, please follow the repository's license. 12 | // 13 | // ------------------------------------------------------- 14 | 15 | #ifndef OFR_M5STACK_SPIFFS_PRESET_H 16 | #define OFR_M5STACK_SPIFFS_PRESET_H 17 | 18 | #include 19 | #include 20 | 21 | std::list ofr_file_list; // For multiple file loading 22 | 23 | FT_FILE *OFR_fopen(const char *filename, const char *mode) { 24 | File f = SPIFFS.open(filename, mode); 25 | ofr_file_list.push_back(f); 26 | return &ofr_file_list.back(); 27 | } 28 | 29 | void OFR_fclose(FT_FILE *stream) { 30 | ((File *)stream)->close(); 31 | } 32 | 33 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream) { 34 | return ((File *)stream)->read((uint8_t *)ptr, size * nmemb); 35 | } 36 | 37 | int OFR_fseek(FT_FILE *stream, long int offset, int whence) { 38 | return ((File *)stream)->seek(offset, (SeekMode)whence); 39 | } 40 | 41 | long int OFR_ftell(FT_FILE *stream) { 42 | return ((File *)stream)->position(); 43 | } 44 | 45 | #endif /* OFR_M5STACK_SD_PRESET_H */ -------------------------------------------------------------------------------- /lib/OpenFontRender/ofrfs/VisualStudio_Preset.h: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------- 2 | // VisualStudio_Preset.h 3 | // 4 | // Copyright (c) 2024 takkaO 5 | // 6 | // If you use, modify, or redistribute this file independently 7 | // of the original repository, this program is licensed under 8 | // the MIT License. 9 | // 10 | // If you use, modify or redistribute this file as part of 11 | // the original repository, please follow the repository's license. 12 | // 13 | // ------------------------------------------------------- 14 | 15 | #ifndef OFR_VISUAL_STUDIO_PRESET_H 16 | #define OFR_VISUAL_STUDIO_PRESET_H 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | std::list ofr_file_list; // For multiple file loading 23 | 24 | FT_FILE *OFR_fopen(const char *filename, const char *mode) { 25 | FILE *f = fopen(filename, mode); 26 | ofr_file_list.push_back(f); 27 | return ofr_file_list.back(); 28 | } 29 | 30 | void OFR_fclose(FT_FILE *stream) { 31 | if (stream != nullptr) { 32 | fclose((FILE *)stream); 33 | } 34 | } 35 | 36 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream) { 37 | if (stream != nullptr) { 38 | return fread((uint8_t *)ptr, size, nmemb, (FILE *)stream); 39 | } 40 | return 0; 41 | } 42 | 43 | int OFR_fseek(FT_FILE *stream, long int offset, int whence) { 44 | if (stream != nullptr) { 45 | return fseek((FILE *)stream, offset, whence); 46 | } 47 | return -1; 48 | } 49 | 50 | long int OFR_ftell(FT_FILE *stream) { 51 | if (stream != nullptr) { 52 | return ftell((FILE *)stream); 53 | } 54 | return -1L; 55 | } 56 | 57 | #endif /* OFR_VISUAL_STUDIO_PRESET_H */ -------------------------------------------------------------------------------- /lib/OpenFontRender/ofrfs/WioTerminal_SD_Preset.h: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------- 2 | // WioTerminal_SD_Preset.h 3 | // 4 | // Copyright (c) 2021 takkaO 5 | // 6 | // If you use, modify, or redistribute this file independently 7 | // of the original repository, this program is licensed under 8 | // the MIT License. 9 | // 10 | // If you use, modify or redistribute this file as part of 11 | // the original repository, please follow the repository's license. 12 | // 13 | // ------------------------------------------------------- 14 | 15 | #ifndef OFR_WIO_TERMINAL_SD_PRESET_H 16 | #define OFR_WIO_TERMINAL_SD_PRESET_H 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | std::list ofr_file_list; // For multiple file loading 23 | 24 | FT_FILE *OFR_fopen(const char *filename, const char *mode) { 25 | File f; 26 | if (strcmp(mode, "r") == 0) { 27 | f = SD.open(filename, FA_READ); 28 | } else if (strcmp(mode, "r+") == 0) { 29 | f = SD.open(filename, FA_READ | FA_WRITE); 30 | } else if (strcmp(mode, "w") == 0) { 31 | f = SD.open(filename, FA_CREATE_ALWAYS | FA_WRITE); 32 | } else if (strcmp(mode, "w+") == 0) { 33 | f = SD.open(filename, FA_CREATE_ALWAYS | FA_WRITE | FA_READ); 34 | } else if (strcmp(mode, "a") == 0) { 35 | f = SD.open(filename, FA_OPEN_APPEND | FA_WRITE); 36 | } else if (strcmp(mode, "a+") == 0) { 37 | f = SD.open(filename, FA_OPEN_APPEND | FA_WRITE | FA_READ); 38 | } else if (strcmp(mode, "wx") == 0) { 39 | f = SD.open(filename, FA_CREATE_NEW | FA_WRITE); 40 | } else if (strcmp(mode, "w+x") == 0) { 41 | f = SD.open(filename, FA_CREATE_NEW | FA_WRITE | FA_READ); 42 | } else { 43 | f = SD.open(filename, FA_READ); 44 | } 45 | ofr_file_list.push_back(f); 46 | return &ofr_file_list.back(); 47 | } 48 | 49 | void OFR_fclose(FT_FILE *stream) { 50 | ((File *)stream)->close(); 51 | } 52 | 53 | size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream) { 54 | return ((File *)stream)->read((uint8_t *)ptr, size * nmemb); 55 | } 56 | 57 | int OFR_fseek(FT_FILE *stream, long int offset, int whence) { 58 | return ((File *)stream)->seek(offset, (SeekMode)whence); 59 | } 60 | 61 | long int OFR_ftell(FT_FILE *stream) { 62 | return ((File *)stream)->position(); 63 | } 64 | 65 | #endif /* OFR_M5STACK_SD_PRESET_H */ -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/Jamfile: -------------------------------------------------------------------------------- 1 | # FreeType 2 src/sfnt Jamfile 2 | # 3 | # Copyright 2001, 2002, 2004, 2005 by 4 | # David Turner, Robert Wilhelm, and Werner Lemberg. 5 | # 6 | # This file is part of the FreeType project, and may only be used, modified, 7 | # and distributed under the terms of the FreeType project license, 8 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 9 | # indicate that you have read the license and understand and accept it 10 | # fully. 11 | 12 | SubDir FT2_TOP $(FT2_SRC_DIR) sfnt ; 13 | 14 | { 15 | local _sources ; 16 | 17 | if $(FT2_MULTI) 18 | { 19 | _sources = sfobjs sfdriver ttcmap ttmtx ttpost ttload ttsbit ttkern ttbdf sfntpic ; 20 | } 21 | else 22 | { 23 | _sources = sfnt ; 24 | } 25 | 26 | Library $(FT2_LIB) : $(_sources).c ; 27 | } 28 | 29 | # end of src/sfnt Jamfile 30 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/module.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 SFNT module definition 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2006 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | FTMODULE_H_COMMANDS += SFNT_MODULE 17 | 18 | define SFNT_MODULE 19 | $(OPEN_DRIVER) FT_Module_Class, sfnt_module_class $(CLOSE_DRIVER) 20 | $(ECHO_DRIVER)sfnt $(ECHO_DRIVER_DESC)helper module for TrueType & OpenType formats$(ECHO_DRIVER_DONE) 21 | endef 22 | 23 | # EOF 24 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/rules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 SFNT driver configuration rules 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2011 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | # SFNT driver directory 17 | # 18 | SFNT_DIR := $(SRC_DIR)/sfnt 19 | 20 | 21 | # compilation flags for the driver 22 | # 23 | SFNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR)) 24 | 25 | 26 | # SFNT driver sources (i.e., C files) 27 | # 28 | SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \ 29 | $(SFNT_DIR)/ttmtx.c \ 30 | $(SFNT_DIR)/ttcmap.c \ 31 | $(SFNT_DIR)/ttsbit.c \ 32 | $(SFNT_DIR)/ttpost.c \ 33 | $(SFNT_DIR)/ttkern.c \ 34 | $(SFNT_DIR)/ttbdf.c \ 35 | $(SFNT_DIR)/sfobjs.c \ 36 | $(SFNT_DIR)/sfdriver.c \ 37 | $(SFNT_DIR)/sfntpic.c 38 | 39 | # SFNT driver headers 40 | # 41 | # Note that ttsbit0.c gets #included by ttsbit.c. 42 | # 43 | SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h) \ 44 | $(SFNT_DIR)/sferrors.h \ 45 | $(SFNT_DIR)/ttsbit0.c 46 | 47 | 48 | # SFNT driver object(s) 49 | # 50 | # SFNT_DRV_OBJ_M is used during `multi' builds. 51 | # SFNT_DRV_OBJ_S is used during `single' builds. 52 | # 53 | SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR)/%.c=$(OBJ_DIR)/%.$O) 54 | SFNT_DRV_OBJ_S := $(OBJ_DIR)/sfnt.$O 55 | 56 | # SFNT driver source file for single build 57 | # 58 | SFNT_DRV_SRC_S := $(SFNT_DIR)/sfnt.c 59 | 60 | 61 | # SFNT driver - single object 62 | # 63 | $(SFNT_DRV_OBJ_S): $(SFNT_DRV_SRC_S) $(SFNT_DRV_SRC) \ 64 | $(FREETYPE_H) $(SFNT_DRV_H) 65 | $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SFNT_DRV_SRC_S)) 66 | 67 | 68 | # SFNT driver - multiple objects 69 | # 70 | $(OBJ_DIR)/%.$O: $(SFNT_DIR)/%.c $(FREETYPE_H) $(SFNT_DRV_H) 71 | $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 72 | 73 | 74 | # update main driver object lists 75 | # 76 | DRV_OBJS_S += $(SFNT_DRV_OBJ_S) 77 | DRV_OBJS_M += $(SFNT_DRV_OBJ_M) 78 | 79 | 80 | # EOF 81 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/sfdriver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sfdriver.h */ 4 | /* */ 5 | /* High-level SFNT driver interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SFDRIVER_H__ 20 | #define __SFDRIVER_H__ 21 | 22 | 23 | #include 24 | #include FT_MODULE_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_DECLARE_MODULE( sfnt_module_class ) 31 | 32 | 33 | FT_END_HEADER 34 | 35 | #endif /* __SFDRIVER_H__ */ 36 | 37 | 38 | /* END */ 39 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/sferrors.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sferrors.h */ 4 | /* */ 5 | /* SFNT error codes (specification only). */ 6 | /* */ 7 | /* Copyright 2001, 2004, 2012, 2013 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is used to define the SFNT error enumeration constants. */ 22 | /* */ 23 | /*************************************************************************/ 24 | 25 | #ifndef __SFERRORS_H__ 26 | #define __SFERRORS_H__ 27 | 28 | #include FT_MODULE_ERRORS_H 29 | 30 | #undef __FTERRORS_H__ 31 | 32 | #undef FT_ERR_PREFIX 33 | #define FT_ERR_PREFIX SFNT_Err_ 34 | #define FT_ERR_BASE FT_Mod_Err_SFNT 35 | 36 | #include FT_ERRORS_H 37 | 38 | #endif /* __SFERRORS_H__ */ 39 | 40 | /* END */ 41 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/sfnt.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sfnt.c */ 4 | /* */ 5 | /* Single object library component. */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include 22 | //#include "sfntpic.c" 23 | //#include "ttload.c" 24 | //#include "ttmtx.c" 25 | //#include "ttcmap.c" 26 | //#include "ttkern.c" 27 | //#include "sfobjs.c" 28 | //#include "sfdriver.c" 29 | 30 | #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 31 | //#include "ttsbit.c" 32 | #endif 33 | 34 | #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES 35 | //#include "ttpost.c" 36 | #endif 37 | 38 | #ifdef TT_CONFIG_OPTION_BDF 39 | //#include "ttbdf.c" 40 | #endif 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/sfobjs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* sfobjs.h */ 4 | /* */ 5 | /* SFNT object management (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SFOBJS_H__ 20 | #define __SFOBJS_H__ 21 | 22 | 23 | #include 24 | #include FT_INTERNAL_SFNT_H 25 | #include FT_INTERNAL_OBJECTS_H 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( FT_Error ) 32 | sfnt_init_face( FT_Stream stream, 33 | TT_Face face, 34 | FT_Int face_index, 35 | FT_Int num_params, 36 | FT_Parameter* params ); 37 | 38 | FT_LOCAL( FT_Error ) 39 | sfnt_load_face( FT_Stream stream, 40 | TT_Face face, 41 | FT_Int face_index, 42 | FT_Int num_params, 43 | FT_Parameter* params ); 44 | 45 | FT_LOCAL( void ) 46 | sfnt_done_face( TT_Face face ); 47 | 48 | 49 | FT_END_HEADER 50 | 51 | #endif /* __SFDRIVER_H__ */ 52 | 53 | 54 | /* END */ 55 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttbdf.h */ 4 | /* */ 5 | /* TrueType and OpenType embedded BDF properties (specification). */ 6 | /* */ 7 | /* Copyright 2005 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTBDF_H__ 20 | #define __TTBDF_H__ 21 | 22 | 23 | #include 24 | #include "ttload.h" 25 | #include FT_BDF_H 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( void ) 32 | tt_face_free_bdf_props( TT_Face face ); 33 | 34 | 35 | FT_LOCAL( FT_Error ) 36 | tt_face_find_bdf_prop( TT_Face face, 37 | const char* property_name, 38 | BDF_PropertyRec *aprop ); 39 | 40 | 41 | FT_END_HEADER 42 | 43 | #endif /* __TTBDF_H__ */ 44 | 45 | 46 | /* END */ 47 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttcmapc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttcmapc.h */ 4 | /* */ 5 | /* TT CMAP classes definitions (specification only). */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifdef TT_CONFIG_CMAP_FORMAT_0 20 | TTCMAPCITEM( tt_cmap0_class_rec ) 21 | #endif 22 | 23 | #ifdef TT_CONFIG_CMAP_FORMAT_2 24 | TTCMAPCITEM( tt_cmap2_class_rec ) 25 | #endif 26 | 27 | #ifdef TT_CONFIG_CMAP_FORMAT_4 28 | TTCMAPCITEM( tt_cmap4_class_rec ) 29 | #endif 30 | 31 | #ifdef TT_CONFIG_CMAP_FORMAT_6 32 | TTCMAPCITEM( tt_cmap6_class_rec ) 33 | #endif 34 | 35 | #ifdef TT_CONFIG_CMAP_FORMAT_8 36 | TTCMAPCITEM( tt_cmap8_class_rec ) 37 | #endif 38 | 39 | #ifdef TT_CONFIG_CMAP_FORMAT_10 40 | TTCMAPCITEM( tt_cmap10_class_rec ) 41 | #endif 42 | 43 | #ifdef TT_CONFIG_CMAP_FORMAT_12 44 | TTCMAPCITEM( tt_cmap12_class_rec ) 45 | #endif 46 | 47 | #ifdef TT_CONFIG_CMAP_FORMAT_13 48 | TTCMAPCITEM( tt_cmap13_class_rec ) 49 | #endif 50 | 51 | #ifdef TT_CONFIG_CMAP_FORMAT_14 52 | TTCMAPCITEM( tt_cmap14_class_rec ) 53 | #endif 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttkern.h */ 4 | /* */ 5 | /* Load the basic TrueType kerning table. This doesn't handle */ 6 | /* kerning data within the GPOS table at the moment. */ 7 | /* */ 8 | /* Copyright 1996-2001, 2002, 2005, 2007 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | #ifndef __TTKERN_H__ 21 | #define __TTKERN_H__ 22 | 23 | 24 | #include 25 | #include FT_INTERNAL_STREAM_H 26 | #include FT_INTERNAL_TRUETYPE_TYPES_H 27 | 28 | 29 | FT_BEGIN_HEADER 30 | 31 | 32 | FT_LOCAL( FT_Error ) 33 | tt_face_load_kern( TT_Face face, 34 | FT_Stream stream ); 35 | 36 | FT_LOCAL( void ) 37 | tt_face_done_kern( TT_Face face ); 38 | 39 | FT_LOCAL( FT_Int ) 40 | tt_face_get_kerning( TT_Face face, 41 | FT_UInt left_glyph, 42 | FT_UInt right_glyph ); 43 | 44 | #define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 ) 45 | 46 | 47 | FT_END_HEADER 48 | 49 | #endif /* __TTKERN_H__ */ 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttload.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttload.h */ 4 | /* */ 5 | /* Load the basic TrueType tables, i.e., tables that can be either in */ 6 | /* TTF or OTF fonts (specification). */ 7 | /* */ 8 | /* Copyright 1996-2001, 2002, 2005, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | #ifndef __TTLOAD_H__ 21 | #define __TTLOAD_H__ 22 | 23 | 24 | #include 25 | #include FT_INTERNAL_STREAM_H 26 | #include FT_INTERNAL_TRUETYPE_TYPES_H 27 | 28 | 29 | FT_BEGIN_HEADER 30 | 31 | 32 | FT_LOCAL( TT_Table ) 33 | tt_face_lookup_table( TT_Face face, 34 | FT_ULong tag ); 35 | 36 | FT_LOCAL( FT_Error ) 37 | tt_face_goto_table( TT_Face face, 38 | FT_ULong tag, 39 | FT_Stream stream, 40 | FT_ULong* length ); 41 | 42 | 43 | FT_LOCAL( FT_Error ) 44 | tt_face_load_font_dir( TT_Face face, 45 | FT_Stream stream ); 46 | 47 | 48 | FT_LOCAL( FT_Error ) 49 | tt_face_load_any( TT_Face face, 50 | FT_ULong tag, 51 | FT_Long offset, 52 | FT_Byte* buffer, 53 | FT_ULong* length ); 54 | 55 | 56 | FT_LOCAL( FT_Error ) 57 | tt_face_load_head( TT_Face face, 58 | FT_Stream stream ); 59 | 60 | 61 | FT_LOCAL( FT_Error ) 62 | tt_face_load_cmap( TT_Face face, 63 | FT_Stream stream ); 64 | 65 | 66 | FT_LOCAL( FT_Error ) 67 | tt_face_load_maxp( TT_Face face, 68 | FT_Stream stream ); 69 | 70 | 71 | FT_LOCAL( FT_Error ) 72 | tt_face_load_name( TT_Face face, 73 | FT_Stream stream ); 74 | 75 | 76 | FT_LOCAL( FT_Error ) 77 | tt_face_load_os2( TT_Face face, 78 | FT_Stream stream ); 79 | 80 | 81 | FT_LOCAL( FT_Error ) 82 | tt_face_load_post( TT_Face face, 83 | FT_Stream stream ); 84 | 85 | 86 | FT_LOCAL( FT_Error ) 87 | tt_face_load_pclt( TT_Face face, 88 | FT_Stream stream ); 89 | 90 | FT_LOCAL( void ) 91 | tt_face_free_name( TT_Face face ); 92 | 93 | 94 | FT_LOCAL( FT_Error ) 95 | tt_face_load_gasp( TT_Face face, 96 | FT_Stream stream ); 97 | 98 | #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 99 | 100 | FT_LOCAL( FT_Error ) 101 | tt_face_load_bhed( TT_Face face, 102 | FT_Stream stream ); 103 | 104 | #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ 105 | 106 | 107 | FT_END_HEADER 108 | 109 | #endif /* __TTLOAD_H__ */ 110 | 111 | 112 | /* END */ 113 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttmtx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttmtx.h */ 4 | /* */ 5 | /* Load the metrics tables common to TTF and OTF fonts (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTMTX_H__ 20 | #define __TTMTX_H__ 21 | 22 | 23 | #include 24 | #include FT_INTERNAL_STREAM_H 25 | #include FT_INTERNAL_TRUETYPE_TYPES_H 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( FT_Error ) 32 | tt_face_load_hhea( TT_Face face, 33 | FT_Stream stream, 34 | FT_Bool vertical ); 35 | 36 | 37 | FT_LOCAL( FT_Error ) 38 | tt_face_load_hmtx( TT_Face face, 39 | FT_Stream stream, 40 | FT_Bool vertical ); 41 | 42 | 43 | FT_LOCAL( FT_Error ) 44 | tt_face_get_metrics( TT_Face face, 45 | FT_Bool vertical, 46 | FT_UInt gindex, 47 | FT_Short* abearing, 48 | FT_UShort* aadvance ); 49 | 50 | FT_END_HEADER 51 | 52 | #endif /* __TTMTX_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttpost.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpost.h */ 4 | /* */ 5 | /* Postcript name table processing for TrueType and OpenType fonts */ 6 | /* (specification). */ 7 | /* */ 8 | /* Copyright 1996-2001, 2002 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | #ifndef __TTPOST_H__ 21 | #define __TTPOST_H__ 22 | 23 | 24 | #include 25 | #include FT_CONFIG_CONFIG_H 26 | #include FT_INTERNAL_TRUETYPE_TYPES_H 27 | 28 | 29 | FT_BEGIN_HEADER 30 | 31 | 32 | FT_LOCAL( FT_Error ) 33 | tt_face_get_ps_name( TT_Face face, 34 | FT_UInt idx, 35 | FT_String** PSname ); 36 | 37 | FT_LOCAL( void ) 38 | tt_face_free_ps_names( TT_Face face ); 39 | 40 | 41 | FT_END_HEADER 42 | 43 | #endif /* __TTPOST_H__ */ 44 | 45 | 46 | /* END */ 47 | -------------------------------------------------------------------------------- /lib/OpenFontRender/sfnt/ttsbit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttsbit.h */ 4 | /* */ 5 | /* TrueType and OpenType embedded bitmap support (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTSBIT_H__ 20 | #define __TTSBIT_H__ 21 | 22 | 23 | #include 24 | #include "ttload.h" 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_Error ) 31 | tt_face_load_eblc( TT_Face face, 32 | FT_Stream stream ); 33 | 34 | FT_LOCAL( void ) 35 | tt_face_free_eblc( TT_Face face ); 36 | 37 | 38 | FT_LOCAL( FT_Error ) 39 | tt_face_set_sbit_strike( TT_Face face, 40 | FT_Size_Request req, 41 | FT_ULong* astrike_index ); 42 | 43 | FT_LOCAL( FT_Error ) 44 | tt_face_load_strike_metrics( TT_Face face, 45 | FT_ULong strike_index, 46 | FT_Size_Metrics* metrics ); 47 | 48 | #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 49 | FT_LOCAL( FT_Error ) 50 | tt_find_sbit_image( TT_Face face, 51 | FT_UInt glyph_index, 52 | FT_ULong strike_index, 53 | TT_SBit_Range *arange, 54 | TT_SBit_Strike *astrike, 55 | FT_ULong *aglyph_offset ); 56 | 57 | FT_LOCAL( FT_Error ) 58 | tt_load_sbit_metrics( FT_Stream stream, 59 | TT_SBit_Range range, 60 | TT_SBit_Metrics metrics ); 61 | 62 | #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ 63 | 64 | FT_LOCAL( FT_Error ) 65 | tt_face_load_sbit_image( TT_Face face, 66 | FT_ULong strike_index, 67 | FT_UInt glyph_index, 68 | FT_UInt load_flags, 69 | FT_Stream stream, 70 | FT_Bitmap *map, 71 | TT_SBit_MetricsRec *metrics ); 72 | 73 | 74 | FT_END_HEADER 75 | 76 | #endif /* __TTSBIT_H__ */ 77 | 78 | 79 | /* END */ 80 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/Jamfile: -------------------------------------------------------------------------------- 1 | # FreeType 2 src/smooth Jamfile 2 | # 3 | # Copyright 2001 by 4 | # David Turner, Robert Wilhelm, and Werner Lemberg. 5 | # 6 | # This file is part of the FreeType project, and may only be used, modified, 7 | # and distributed under the terms of the FreeType project license, 8 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 9 | # indicate that you have read the license and understand and accept it 10 | # fully. 11 | 12 | SubDir FT2_TOP $(FT2_SRC_DIR) smooth ; 13 | 14 | { 15 | local _sources ; 16 | 17 | if $(FT2_MULTI) 18 | { 19 | _sources = ftgrays ftsmooth ftspic ; 20 | } 21 | else 22 | { 23 | _sources = smooth ; 24 | } 25 | 26 | Library $(FT2_LIB) : $(_sources).c ; 27 | } 28 | 29 | # end of src/smooth Jamfile 30 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/ftgrays.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftgrays.h */ 4 | /* */ 5 | /* FreeType smooth renderer declaration */ 6 | /* */ 7 | /* Copyright 1996-2001 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __FTGRAYS_H__ 20 | #define __FTGRAYS_H__ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | 27 | #ifdef _STANDALONE_ 28 | #include "ftimage.h" 29 | #else 30 | #include 31 | #include FT_CONFIG_CONFIG_H /* for FT_CONFIG_OPTION_PIC */ 32 | #include FT_IMAGE_H 33 | #endif 34 | 35 | 36 | /*************************************************************************/ 37 | /* */ 38 | /* To make ftgrays.h independent from configuration files we check */ 39 | /* whether FT_EXPORT_VAR has been defined already. */ 40 | /* */ 41 | /* On some systems and compilers (Win32 mostly), an extra keyword is */ 42 | /* necessary to compile the library as a DLL. */ 43 | /* */ 44 | #ifndef FT_EXPORT_VAR 45 | #define FT_EXPORT_VAR( x ) extern x 46 | #endif 47 | 48 | FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_grays_raster; 49 | 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* __FTGRAYS_H__ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/ftsmerrs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsmerrs.h */ 4 | /* */ 5 | /* smooth renderer error codes (specification only). */ 6 | /* */ 7 | /* Copyright 2001, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is used to define the smooth renderer error enumeration */ 22 | /* constants. */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | #ifndef __FTSMERRS_H__ 27 | #define __FTSMERRS_H__ 28 | 29 | #include FT_MODULE_ERRORS_H 30 | 31 | #undef __FTERRORS_H__ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX Smooth_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_Smooth 36 | 37 | #include FT_ERRORS_H 38 | 39 | #endif /* __FTSMERRS_H__ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/ftsmooth.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsmooth.h */ 4 | /* */ 5 | /* Anti-aliasing renderer interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __FTSMOOTH_H__ 20 | #define __FTSMOOTH_H__ 21 | 22 | 23 | #include 24 | #include FT_RENDER_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | #ifndef FT_CONFIG_OPTION_NO_STD_RASTER 31 | FT_DECLARE_RENDERER( ft_std_renderer_class ) 32 | #endif 33 | 34 | #ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER 35 | FT_DECLARE_RENDERER( ft_smooth_renderer_class ) 36 | 37 | FT_DECLARE_RENDERER( ft_smooth_lcd_renderer_class ) 38 | 39 | FT_DECLARE_RENDERER( ft_smooth_lcd_v_renderer_class ) 40 | #endif 41 | 42 | 43 | 44 | FT_END_HEADER 45 | 46 | #endif /* __FTSMOOTH_H__ */ 47 | 48 | 49 | /* END */ 50 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/ftspic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftspic.h */ 4 | /* */ 5 | /* The FreeType position independent code services for smooth module. */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __FTSPIC_H__ 20 | #define __FTSPIC_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | #include FT_INTERNAL_PIC_H 26 | 27 | #ifndef FT_CONFIG_OPTION_PIC 28 | 29 | #define FT_GRAYS_RASTER_GET ft_grays_raster 30 | 31 | #else /* FT_CONFIG_OPTION_PIC */ 32 | 33 | typedef struct SmoothPIC_ 34 | { 35 | int ref_count; 36 | FT_Raster_Funcs ft_grays_raster; 37 | 38 | } SmoothPIC; 39 | 40 | 41 | #define GET_PIC( lib ) \ 42 | ( (SmoothPIC*)( (lib)->pic_container.smooth ) ) 43 | #define FT_GRAYS_RASTER_GET ( GET_PIC( library )->ft_grays_raster ) 44 | 45 | 46 | /* see ftspic.c for the implementation */ 47 | void 48 | ft_smooth_renderer_class_pic_free( FT_Library library ); 49 | 50 | void 51 | ft_smooth_lcd_renderer_class_pic_free( FT_Library library ); 52 | 53 | void 54 | ft_smooth_lcdv_renderer_class_pic_free( FT_Library library ); 55 | 56 | FT_Error 57 | ft_smooth_renderer_class_pic_init( FT_Library library ); 58 | 59 | FT_Error 60 | ft_smooth_lcd_renderer_class_pic_init( FT_Library library ); 61 | 62 | FT_Error 63 | ft_smooth_lcdv_renderer_class_pic_init( FT_Library library ); 64 | 65 | #endif /* FT_CONFIG_OPTION_PIC */ 66 | 67 | /* */ 68 | 69 | FT_END_HEADER 70 | 71 | #endif /* __FTSPIC_H__ */ 72 | 73 | 74 | /* END */ 75 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/module.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 smooth renderer module definition 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2006 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | FTMODULE_H_COMMANDS += SMOOTH_RENDERER 17 | 18 | define SMOOTH_RENDERER 19 | $(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_renderer_class $(CLOSE_DRIVER) 20 | $(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer$(ECHO_DRIVER_DONE) 21 | $(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_lcd_renderer_class $(CLOSE_DRIVER) 22 | $(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for LCDs$(ECHO_DRIVER_DONE) 23 | $(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_lcdv_renderer_class $(CLOSE_DRIVER) 24 | $(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for vertical LCDs$(ECHO_DRIVER_DONE) 25 | endef 26 | 27 | # EOF 28 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/rules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 smooth renderer module build rules 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2001, 2003, 2011 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | # smooth driver directory 17 | # 18 | SMOOTH_DIR := $(SRC_DIR)/smooth 19 | 20 | # compilation flags for the driver 21 | # 22 | SMOOTH_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR)) 23 | 24 | 25 | # smooth driver sources (i.e., C files) 26 | # 27 | SMOOTH_DRV_SRC := $(SMOOTH_DIR)/ftgrays.c \ 28 | $(SMOOTH_DIR)/ftsmooth.c \ 29 | $(SMOOTH_DIR)/ftspic.c 30 | 31 | 32 | # smooth driver headers 33 | # 34 | SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h) \ 35 | $(SMOOTH_DIR)/ftsmerrs.h 36 | 37 | 38 | # smooth driver object(s) 39 | # 40 | # SMOOTH_DRV_OBJ_M is used during `multi' builds. 41 | # SMOOTH_DRV_OBJ_S is used during `single' builds. 42 | # 43 | SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR)/%.c=$(OBJ_DIR)/%.$O) 44 | SMOOTH_DRV_OBJ_S := $(OBJ_DIR)/smooth.$O 45 | 46 | # smooth driver source file for single build 47 | # 48 | SMOOTH_DRV_SRC_S := $(SMOOTH_DIR)/smooth.c 49 | 50 | 51 | # smooth driver - single object 52 | # 53 | $(SMOOTH_DRV_OBJ_S): $(SMOOTH_DRV_SRC_S) $(SMOOTH_DRV_SRC) \ 54 | $(FREETYPE_H) $(SMOOTH_DRV_H) 55 | $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SMOOTH_DRV_SRC_S)) 56 | 57 | 58 | # smooth driver - multiple objects 59 | # 60 | $(OBJ_DIR)/%.$O: $(SMOOTH_DIR)/%.c $(FREETYPE_H) $(SMOOTH_DRV_H) 61 | $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 62 | 63 | 64 | # update main driver object lists 65 | # 66 | DRV_OBJS_S += $(SMOOTH_DRV_OBJ_S) 67 | DRV_OBJS_M += $(SMOOTH_DRV_OBJ_M) 68 | 69 | 70 | # EOF 71 | -------------------------------------------------------------------------------- /lib/OpenFontRender/smooth/smooth.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* smooth.c */ 4 | /* */ 5 | /* FreeType anti-aliasing rasterer module component (body only). */ 6 | /* */ 7 | /* Copyright 1996-2001 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include 22 | //#include "ftspic.c" 23 | //#include "ftgrays.c" 24 | //#include "ftsmooth.c" 25 | 26 | 27 | /* END */ 28 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/Jamfile: -------------------------------------------------------------------------------- 1 | # FreeType 2 src/truetype Jamfile 2 | # 3 | # Copyright 2001, 2004 by 4 | # David Turner, Robert Wilhelm, and Werner Lemberg. 5 | # 6 | # This file is part of the FreeType project, and may only be used, modified, 7 | # and distributed under the terms of the FreeType project license, 8 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 9 | # indicate that you have read the license and understand and accept it 10 | # fully. 11 | 12 | SubDir FT2_TOP $(FT2_SRC_DIR) truetype ; 13 | 14 | { 15 | local _sources ; 16 | 17 | if $(FT2_MULTI) 18 | { 19 | _sources = ttdriver ttobjs ttpload ttgload ttinterp ttgxvar ttpic ; 20 | } 21 | else 22 | { 23 | _sources = truetype ; 24 | } 25 | 26 | Library $(FT2_LIB) : $(_sources).c ; 27 | } 28 | 29 | # end of src/truetype Jamfile 30 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/module.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 TrueType module definition 3 | # 4 | 5 | 6 | # Copyright 1996-2000, 2006 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | FTMODULE_H_COMMANDS += TRUETYPE_DRIVER 17 | 18 | define TRUETYPE_DRIVER 19 | $(OPEN_DRIVER) FT_Driver_ClassRec, tt_driver_class $(CLOSE_DRIVER) 20 | $(ECHO_DRIVER)truetype $(ECHO_DRIVER_DESC)Windows/Mac font files with extension *.ttf or *.ttc$(ECHO_DRIVER_DONE) 21 | endef 22 | 23 | # EOF 24 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/rules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # FreeType 2 TrueType driver configuration rules 3 | # 4 | 5 | 6 | # Copyright 1996-2001, 2003-2004, 2011-2012 by 7 | # David Turner, Robert Wilhelm, and Werner Lemberg. 8 | # 9 | # This file is part of the FreeType project, and may only be used, modified, 10 | # and distributed under the terms of the FreeType project license, 11 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you 12 | # indicate that you have read the license and understand and accept it 13 | # fully. 14 | 15 | 16 | # TrueType driver directory 17 | # 18 | TT_DIR := $(SRC_DIR)/truetype 19 | 20 | 21 | # compilation flags for the driver 22 | # 23 | TT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(TT_DIR)) 24 | 25 | 26 | # TrueType driver sources (i.e., C files) 27 | # 28 | TT_DRV_SRC := $(TT_DIR)/ttdriver.c \ 29 | $(TT_DIR)/ttgload.c \ 30 | $(TT_DIR)/ttgxvar.c \ 31 | $(TT_DIR)/ttinterp.c \ 32 | $(TT_DIR)/ttobjs.c \ 33 | $(TT_DIR)/ttpic.c \ 34 | $(TT_DIR)/ttpload.c \ 35 | $(TT_DIR)/ttsubpix.c 36 | 37 | # TrueType driver headers 38 | # 39 | TT_DRV_H := $(TT_DRV_SRC:%.c=%.h) \ 40 | $(TT_DIR)/tterrors.h 41 | 42 | 43 | # TrueType driver object(s) 44 | # 45 | # TT_DRV_OBJ_M is used during `multi' builds 46 | # TT_DRV_OBJ_S is used during `single' builds 47 | # 48 | TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR)/%.c=$(OBJ_DIR)/%.$O) 49 | TT_DRV_OBJ_S := $(OBJ_DIR)/truetype.$O 50 | 51 | # TrueType driver source file for single build 52 | # 53 | TT_DRV_SRC_S := $(TT_DIR)/truetype.c 54 | 55 | 56 | # TrueType driver - single object 57 | # 58 | $(TT_DRV_OBJ_S): $(TT_DRV_SRC_S) $(TT_DRV_SRC) $(FREETYPE_H) $(TT_DRV_H) 59 | $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(TT_DRV_SRC_S)) 60 | 61 | 62 | # driver - multiple objects 63 | # 64 | $(OBJ_DIR)/%.$O: $(TT_DIR)/%.c $(FREETYPE_H) $(TT_DRV_H) 65 | $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 66 | 67 | 68 | # update main driver object lists 69 | # 70 | DRV_OBJS_S += $(TT_DRV_OBJ_S) 71 | DRV_OBJS_M += $(TT_DRV_OBJ_M) 72 | 73 | 74 | # EOF 75 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/truetype.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* truetype.c */ 4 | /* */ 5 | /* FreeType TrueType driver component (body only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2004, 2006, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include 22 | //#include "ttpic.c" 23 | //#include "ttdriver.c" /* driver interface */ 24 | //#include "ttpload.c" /* tables loader */ 25 | //#include "ttgload.c" /* glyph loader */ 26 | //#include "ttobjs.c" /* object manager */ 27 | 28 | #ifdef TT_USE_BYTECODE_INTERPRETER 29 | //#include "ttinterp.c" 30 | //#include "ttsubpix.c" 31 | #endif 32 | 33 | #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT 34 | //#include "ttgxvar.c" /* gx distortable font */ 35 | #endif 36 | 37 | 38 | /* END */ 39 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/ttdriver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttdriver.h */ 4 | /* */ 5 | /* High-level TrueType driver interface (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTDRIVER_H__ 20 | #define __TTDRIVER_H__ 21 | 22 | 23 | #include 24 | #include FT_INTERNAL_DRIVER_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_DECLARE_DRIVER( tt_driver_class ) 31 | 32 | 33 | FT_END_HEADER 34 | 35 | #endif /* __TTDRIVER_H__ */ 36 | 37 | 38 | /* END */ 39 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/tterrors.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* tterrors.h */ 4 | /* */ 5 | /* TrueType error codes (specification only). */ 6 | /* */ 7 | /* Copyright 2001, 2012 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is used to define the TrueType error enumeration */ 22 | /* constants. */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | #ifndef __TTERRORS_H__ 27 | #define __TTERRORS_H__ 28 | 29 | #include FT_MODULE_ERRORS_H 30 | 31 | #undef __FTERRORS_H__ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX TT_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_TrueType 36 | 37 | #include FT_ERRORS_H 38 | 39 | #endif /* __TTERRORS_H__ */ 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/ttgload.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttgload.h */ 4 | /* */ 5 | /* TrueType Glyph Loader (specification). */ 6 | /* */ 7 | /* Copyright 1996-2006, 2008, 2011 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTGLOAD_H__ 20 | #define __TTGLOAD_H__ 21 | 22 | 23 | #include 24 | #include "ttobjs.h" 25 | 26 | #ifdef TT_USE_BYTECODE_INTERPRETER 27 | #include "ttinterp.h" 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | FT_LOCAL( void ) 35 | TT_Init_Glyph_Loading( TT_Face face ); 36 | 37 | FT_LOCAL( void ) 38 | TT_Get_HMetrics( TT_Face face, 39 | FT_UInt idx, 40 | FT_Short* lsb, 41 | FT_UShort* aw ); 42 | 43 | FT_LOCAL( void ) 44 | TT_Get_VMetrics( TT_Face face, 45 | FT_UInt idx, 46 | FT_Short* tsb, 47 | FT_UShort* ah ); 48 | 49 | FT_LOCAL( FT_Error ) 50 | TT_Load_Glyph( TT_Size size, 51 | TT_GlyphSlot glyph, 52 | FT_UInt glyph_index, 53 | FT_Int32 load_flags ); 54 | 55 | 56 | FT_END_HEADER 57 | 58 | #endif /* __TTGLOAD_H__ */ 59 | 60 | 61 | /* END */ 62 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/ttpic.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpic.c */ 4 | /* */ 5 | /* The FreeType position independent code services for truetype module. */ 6 | /* */ 7 | /* Copyright 2009, 2010, 2012, 2013 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #include 20 | #include FT_FREETYPE_H 21 | #include FT_INTERNAL_OBJECTS_H 22 | #include "ttpic.h" 23 | #include "tterrors.h" 24 | 25 | 26 | #ifdef FT_CONFIG_OPTION_PIC 27 | 28 | /* forward declaration of PIC init functions from ttdriver.c */ 29 | FT_Error 30 | FT_Create_Class_tt_services( FT_Library library, 31 | FT_ServiceDescRec** output_class ); 32 | void 33 | FT_Destroy_Class_tt_services( FT_Library library, 34 | FT_ServiceDescRec* clazz ); 35 | void 36 | FT_Init_Class_tt_service_gx_multi_masters( 37 | FT_Service_MultiMastersRec* sv_mm ); 38 | void 39 | FT_Init_Class_tt_service_truetype_glyf( 40 | FT_Service_TTGlyfRec* sv_ttglyf ); 41 | 42 | 43 | void 44 | tt_driver_class_pic_free( FT_Library library ) 45 | { 46 | FT_PIC_Container* pic_container = &library->pic_container; 47 | FT_Memory memory = library->memory; 48 | 49 | 50 | if ( pic_container->truetype ) 51 | { 52 | TTModulePIC* container = (TTModulePIC*)pic_container->truetype; 53 | 54 | 55 | if ( container->tt_services ) 56 | FT_Destroy_Class_tt_services( library, container->tt_services ); 57 | container->tt_services = NULL; 58 | FT_FREE( container ); 59 | pic_container->truetype = NULL; 60 | } 61 | } 62 | 63 | 64 | FT_Error 65 | tt_driver_class_pic_init( FT_Library library ) 66 | { 67 | FT_PIC_Container* pic_container = &library->pic_container; 68 | FT_Error error = FT_Err_Ok; 69 | TTModulePIC* container = NULL; 70 | FT_Memory memory = library->memory; 71 | 72 | 73 | /* allocate pointer, clear and set global container pointer */ 74 | if ( FT_ALLOC( container, sizeof ( *container ) ) ) 75 | return error; 76 | FT_MEM_SET( container, 0, sizeof ( *container ) ); 77 | pic_container->truetype = container; 78 | 79 | /* initialize pointer table - this is how the module usually */ 80 | /* expects this data */ 81 | error = FT_Create_Class_tt_services( library, 82 | &container->tt_services ); 83 | if ( error ) 84 | goto Exit; 85 | #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT 86 | FT_Init_Class_tt_service_gx_multi_masters( 87 | &container->tt_service_gx_multi_masters ); 88 | #endif 89 | FT_Init_Class_tt_service_truetype_glyf( 90 | &container->tt_service_truetype_glyf ); 91 | 92 | Exit: 93 | if ( error ) 94 | tt_driver_class_pic_free( library ); 95 | return error; 96 | } 97 | 98 | #endif /* FT_CONFIG_OPTION_PIC */ 99 | 100 | 101 | /* END */ 102 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/ttpic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpic.h */ 4 | /* */ 5 | /* The FreeType position independent code services for truetype module. */ 6 | /* */ 7 | /* Copyright 2009, 2012 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTPIC_H__ 20 | #define __TTPIC_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | #ifndef FT_CONFIG_OPTION_PIC 26 | 27 | #define TT_SERVICES_GET tt_services 28 | #define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters 29 | #define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf 30 | 31 | #else /* FT_CONFIG_OPTION_PIC */ 32 | 33 | #include FT_MULTIPLE_MASTERS_H 34 | #include FT_SERVICE_MULTIPLE_MASTERS_H 35 | #include FT_SERVICE_TRUETYPE_GLYF_H 36 | 37 | 38 | typedef struct TTModulePIC_ 39 | { 40 | FT_ServiceDescRec* tt_services; 41 | #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT 42 | FT_Service_MultiMastersRec tt_service_gx_multi_masters; 43 | #endif 44 | FT_Service_TTGlyfRec tt_service_truetype_glyf; 45 | 46 | } TTModulePIC; 47 | 48 | 49 | #define GET_PIC( lib ) \ 50 | ( (TTModulePIC*)((lib)->pic_container.truetype) ) 51 | #define TT_SERVICES_GET \ 52 | ( GET_PIC( library )->tt_services ) 53 | #define TT_SERVICE_GX_MULTI_MASTERS_GET \ 54 | ( GET_PIC( library )->tt_service_gx_multi_masters ) 55 | #define TT_SERVICE_TRUETYPE_GLYF_GET \ 56 | ( GET_PIC( library )->tt_service_truetype_glyf ) 57 | 58 | 59 | /* see ttpic.c for the implementation */ 60 | void 61 | tt_driver_class_pic_free( FT_Library library ); 62 | 63 | FT_Error 64 | tt_driver_class_pic_init( FT_Library library ); 65 | 66 | #endif /* FT_CONFIG_OPTION_PIC */ 67 | 68 | /* */ 69 | 70 | FT_END_HEADER 71 | 72 | #endif /* __TTPIC_H__ */ 73 | 74 | 75 | /* END */ 76 | -------------------------------------------------------------------------------- /lib/OpenFontRender/truetype/ttpload.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttpload.h */ 4 | /* */ 5 | /* TrueType-specific tables loader (specification). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2005, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __TTPLOAD_H__ 20 | #define __TTPLOAD_H__ 21 | 22 | 23 | #include 24 | #include FT_INTERNAL_TRUETYPE_TYPES_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_Error ) 31 | tt_face_load_loca( TT_Face face, 32 | FT_Stream stream ); 33 | 34 | FT_LOCAL( FT_ULong ) 35 | tt_face_get_location( TT_Face face, 36 | FT_UInt gindex, 37 | FT_UInt *asize ); 38 | 39 | FT_LOCAL( void ) 40 | tt_face_done_loca( TT_Face face ); 41 | 42 | FT_LOCAL( FT_Error ) 43 | tt_face_load_cvt( TT_Face face, 44 | FT_Stream stream ); 45 | 46 | FT_LOCAL( FT_Error ) 47 | tt_face_load_fpgm( TT_Face face, 48 | FT_Stream stream ); 49 | 50 | 51 | FT_LOCAL( FT_Error ) 52 | tt_face_load_prep( TT_Face face, 53 | FT_Stream stream ); 54 | 55 | 56 | FT_LOCAL( FT_Error ) 57 | tt_face_load_hdmx( TT_Face face, 58 | FT_Stream stream ); 59 | 60 | 61 | FT_LOCAL( void ) 62 | tt_face_free_hdmx( TT_Face face ); 63 | 64 | 65 | FT_LOCAL( FT_Byte* ) 66 | tt_face_get_device_metrics( TT_Face face, 67 | FT_UInt ppem, 68 | FT_UInt gindex ); 69 | 70 | FT_END_HEADER 71 | 72 | #endif /* __TTPLOAD_H__ */ 73 | 74 | 75 | /* END */ 76 | -------------------------------------------------------------------------------- /lib/fm/fm.h: -------------------------------------------------------------------------------- 1 | #ifndef FM_H 2 | #define FM_H 3 | #include 4 | 5 | #include "SI5351.hpp" 6 | 7 | // GPIO Assignment 8 | #define D0 9 9 | #define D1 10 10 | #define D2 11 11 | #define D3 12 12 | #define D4 13 13 | #define D5 14 14 | #define D6 21 15 | #define D7 47 16 | 17 | #define A0 18 18 | #define A1 8 19 | #define WR 40 20 | #define CS0 38 21 | #define CS1 39 22 | #define CS2 43 23 | #define IC 48 24 | 25 | #define A1_HIGH (gpio_set_level((gpio_num_t)A1, 1)) 26 | #define A1_LOW (gpio_set_level((gpio_num_t)A1, 0)) 27 | #define A0_HIGH (gpio_set_level((gpio_num_t)A0, 1)) 28 | #define A0_LOW (gpio_set_level((gpio_num_t)A0, 0)) 29 | #define WR_HIGH (gpio_set_level((gpio_num_t)WR, 1)) 30 | #define WR_LOW (gpio_set_level((gpio_num_t)WR, 0)) 31 | #define CS0_HIGH (gpio_set_level((gpio_num_t)CS0, 1)) 32 | #define CS0_LOW (gpio_set_level((gpio_num_t)CS0, 0)) 33 | #define CS1_HIGH (gpio_set_level((gpio_num_t)CS1, 1)) 34 | #define CS1_LOW (gpio_set_level((gpio_num_t)CS1, 0)) 35 | #define CS2_HIGH (gpio_set_level((gpio_num_t)CS2, 1)) 36 | #define CS2_LOW (gpio_set_level((gpio_num_t)CS2, 0)) 37 | #define IC_HIGH (gpio_set_level((gpio_num_t)IC, 1)) 38 | #define IC_LOW (gpio_set_level((gpio_num_t)IC, 0)) 39 | 40 | class FMChip { 41 | public: 42 | void begin(); 43 | void reset(); 44 | void setRegister(byte addr, byte value, int chipno); 45 | void setRegisterOPM(byte addr, byte value, uint8_t chipno); 46 | void setRegisterOPL3(byte port, byte addr, byte data, int chipno); 47 | void setYM2612(byte port, byte addr, byte data, uint8_t chipno); 48 | void setYM2612DAC(byte data, uint8_t chipno); 49 | void write(byte data, byte chipno, si5351Freq_t freq); 50 | void writeRaw(byte data, byte chipno, si5351Freq_t freq); 51 | 52 | private: 53 | u8_t _psgFrqLowByte = 0; 54 | }; 55 | 56 | extern FMChip FM; 57 | #endif -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | [env:esp32-s3-devkitc-1] 2 | platform = espressif32@6.10.0 3 | board = esp32-s3-devkitc-1 4 | framework = arduino 5 | monitor_speed = 115200 6 | upload_speed = 1500000 7 | board_build.f_flash = 80000000L 8 | board_build.f_cpu = 240000000L 9 | board_build.arduino.memory_type = qio_opi 10 | board_build.flash_mode = qio 11 | board_upload.flash_size = 8MB 12 | build_flags = 13 | -DCORE_DEBUG_LEVEL=0 14 | -DARDUINO_USB_CDC_ON_BOOT=1 15 | -O2 16 | -DBOARD_HAS_PSRAM 17 | board_build.partitions = default_8MB.csv 18 | lib_deps = 19 | bitbank2/PNGdec@^1.1.0 20 | lovyan03/LovyanGFX@^1.2.0 21 | -------------------------------------------------------------------------------- /resoures/Gear_icon_svg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /resoures/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resoures/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 14 | 16 | 17 | 19 | 21 | 22 | 24 | 27 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /resoures/down.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/down.bmp -------------------------------------------------------------------------------- /resoures/icon_usb.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/icon_usb.bmp -------------------------------------------------------------------------------- /resoures/icon_usb.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/icon_usb.psd -------------------------------------------------------------------------------- /resoures/icons_white.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/icons_white.bmp -------------------------------------------------------------------------------- /resoures/icos.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/icos.psd -------------------------------------------------------------------------------- /resoures/left.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/left.bmp -------------------------------------------------------------------------------- /resoures/options2_111009.svg: -------------------------------------------------------------------------------- 1 | options-2 -------------------------------------------------------------------------------- /resoures/rgb565toRGB24.js: -------------------------------------------------------------------------------- 1 | var color565 = 0x213F; 2 | var R5 = (color565 >> 11) & 0x1f; 3 | var G6 = (color565 >> 5) & 0x3f; 4 | var B5 = (color565) & 0x1f; 5 | var R8 = ( R5 * 527 + 23 ) >> 6; 6 | var G8 = ( G6 * 259 + 33 ) >> 6; 7 | var B8 = ( B5 * 527 + 23 ) >> 6; 8 | 9 | var R8S = ((R8>=0x10)?"0x":"0x0") + R8.toString(16); 10 | var G8S = ((G8>=0x10)?"":"0") + G8.toString(16); 11 | var B8S = ((B8>=0x10)?"":"0") + B8.toString(16); 12 | 13 | console.log(R8S+G8S+B8S) 14 | -------------------------------------------------------------------------------- /resoures/right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/right.bmp -------------------------------------------------------------------------------- /resoures/up.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/up.bmp -------------------------------------------------------------------------------- /resoures/サブセット文字集.txt: -------------------------------------------------------------------------------- 1 | !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¢£¥¦§©«¬®¯°±²³´µ¶·¸»、。,.・:;?!`¨^_ヽヾゝゞ〃々〆〇ー―‐/\〜~∥|…‥‘’“()〔〕[]{}〈〉《》「」『』【】+-×÷=≠<>≦≧∞∴♂♀′″”℃¥$¢£%#&*@☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬ʼn♯♭♪†‡◯①②③④⑤⑥⑦⑧⑨⑩ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ。「」、・ァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン゙゚ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюяüãôéⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ♥♠♦♣亜哀挨愛曖悪握圧扱宛嵐安案暗以衣位囲医依委威為畏胃尉異移萎偉椅彙意違維慰遺緯域育一壱逸茨芋引印因咽姻員院淫陰飲隠韻右宇羽雨唄鬱畝浦運雲永泳英映栄営詠影鋭衛易疫益液駅悦越謁閲円延沿炎怨宴媛援園煙猿遠鉛塩演縁艶汚王凹央応往押旺欧殴桜翁奥横岡屋億憶臆虞乙俺卸音恩温穏下化火加可仮何花佳価果河苛科架夏家荷華菓貨渦過嫁暇禍靴寡歌箇稼課蚊牙瓦我画芽賀雅餓介回灰会快戒改怪拐悔海界皆械絵開階塊楷解潰壊懐諧貝外劾害崖涯街慨蓋該概骸垣柿各角拡革格核殻郭覚較隔閣確獲嚇穫学岳楽額顎掛潟括活喝渇割葛滑褐轄且株釜鎌刈干刊甘汗缶完肝官冠巻看陥乾勘患貫寒喚堪換敢棺款間閑勧寛幹感漢慣管関歓監緩憾還館環簡観韓艦鑑丸含岸岩玩眼頑顔願企伎危机気岐希忌汽奇祈季紀軌既記起飢鬼帰基寄規亀喜幾揮期棋貴棄毀旗器畿輝機騎技宜偽欺義疑儀戯擬犠議菊吉喫詰却客脚逆虐九久及弓丘旧休吸朽臼求究泣急級糾宮救球給嗅窮牛去巨居拒拠挙虚許距魚御漁凶共叫狂京享供協況峡挟狭恐恭胸脅強教郷境橋矯鏡競響驚仰暁業凝曲局極玉巾斤均近金菌勤琴筋僅禁緊錦謹襟吟銀区句苦駆具惧愚空偶遇隅串屈掘窟熊繰君訓勲薫軍郡群兄刑形系径茎係型契計恵啓掲渓経蛍敬景軽傾携継詣慶憬稽憩警鶏芸迎鯨隙劇撃激桁欠穴血決結傑潔月犬件見券肩建研県倹兼剣拳軒健険圏堅検嫌献絹遣権憲賢謙鍵繭顕験懸元幻玄言弦限原現舷減源厳己戸古呼固股虎孤弧故枯個庫湖雇誇鼓錮顧五互午呉後娯悟碁語誤護口工公勾孔功巧広甲交光向后好江考行坑孝抗攻更効幸拘肯侯厚恒洪皇紅荒郊香候校耕航貢降高康控梗黄喉慌港硬絞項溝鉱構綱酵稿興衡鋼講購乞号合拷剛傲豪克告谷刻国黒穀酷獄骨駒込頃今困昆恨根婚混痕紺魂墾懇左佐沙査砂唆差詐鎖座挫才再災妻采砕宰栽彩採済祭斎細菜最裁債催塞歳載際埼在材剤財罪崎作削昨柵索策酢搾錯咲冊札刷刹拶殺察撮擦雑皿三山参桟蚕惨産傘散算酸賛残斬暫士子支止氏仕史司四市矢旨死糸至伺志私使刺始姉枝祉肢姿思指施師恣紙脂視紫詞歯嗣試詩資飼誌雌摯賜諮示字寺次耳自似児事侍治持時滋慈辞磁餌璽鹿式識軸七𠮟失室疾執湿嫉漆質実芝写社車舎者射捨赦斜煮遮謝邪蛇尺借酌釈爵若弱寂手主守朱取狩首殊珠酒腫種趣寿受呪授需儒樹収囚州舟秀周宗拾秋臭修袖終羞習週就衆集愁酬醜蹴襲十汁充住柔重従渋銃獣縦叔祝宿淑粛縮塾熟出述術俊春瞬旬巡盾准殉純循順準潤遵処初所書庶暑署緒諸女如助序叙徐除小升少召匠床抄肖尚招承昇松沼昭宵将消症祥称笑唱商渉章紹訟勝掌晶焼焦硝粧詔証象傷奨照詳彰障憧衝賞償礁鐘上丈冗条状乗城浄剰常情場畳蒸縄壌嬢錠譲醸色拭食植殖飾触嘱織職辱尻心申伸臣芯身辛侵信津神唇娠振浸真針深紳進森診寝慎新審震薪親人刃仁尽迅甚陣尋腎須図水吹垂炊帥粋衰推酔遂睡穂随髄枢崇数据杉裾寸瀬是井世正生成西声制姓征性青斉政星牲省凄逝清盛婿晴勢聖誠精製誓静請整醒税夕斥石赤昔析席脊隻惜戚責跡積績籍切折拙窃接設雪摂節説舌絶千川仙占先宣専泉浅洗染扇栓旋船戦煎羨腺詮践箋銭潜線遷選薦繊鮮全前善然禅漸膳繕狙阻祖租素措粗組疎訴塑遡礎双壮早争走奏相荘草送倉捜挿桑巣掃曹曽爽窓創喪痩葬装僧想層総遭槽踪操燥霜騒藻造像増憎蔵贈臓即束足促則息捉速側測俗族属賊続卒率存村孫尊損遜他多汰打妥唾堕惰駄太対体耐待怠胎退帯泰堆袋逮替貸隊滞態戴大代台第題滝宅択沢卓拓託濯諾濁但達脱奪棚誰丹旦担単炭胆探淡短嘆端綻誕鍛団男段断弾暖談壇地池知値恥致遅痴稚置緻竹畜逐蓄築秩窒茶着嫡中仲虫沖宙忠抽注昼柱衷酎鋳駐著貯丁弔庁兆町長挑帳張彫眺釣頂鳥朝貼超腸跳徴嘲潮澄調聴懲直勅捗沈珍朕陳賃鎮追椎墜通痛塚漬坪爪鶴低呈廷弟定底抵邸亭貞帝訂庭逓停偵堤提程艇締諦泥的笛摘滴適敵溺迭哲鉄徹撤天典店点展添転塡田伝殿電斗吐妬徒途都渡塗賭土奴努度怒刀冬灯当投豆東到逃倒凍唐島桃討透党悼盗陶塔搭棟湯痘登答等筒統稲踏糖頭謄藤闘騰同洞胴動堂童道働銅導瞳峠匿特得督徳篤毒独読栃凸突届屯豚頓貪鈍曇丼那奈内梨謎鍋南軟難二尼弐匂肉虹日入乳尿任妊忍認寧熱年念捻粘燃悩納能脳農濃把波派破覇馬婆罵拝杯背肺俳配排敗廃輩売倍梅培陪媒買賠白伯拍泊迫剝舶博薄麦漠縛爆箱箸畑肌八鉢発髪伐抜罰閥反半氾犯帆汎伴判坂阪板版班畔般販斑飯搬煩頒範繁藩晩番蛮盤比皮妃否批彼披肥非卑飛疲秘被悲扉費碑罷避尾眉美備微鼻膝肘匹必泌筆姫百氷表俵票評漂標苗秒病描猫品浜貧賓頻敏瓶不夫父付布扶府怖阜附訃負赴浮婦符富普腐敷膚賦譜侮武部舞封風伏服副幅復福腹複覆払沸仏物粉紛雰噴墳憤奮分文聞丙平兵併並柄陛閉塀幣弊蔽餅米壁璧癖別蔑片辺返変偏遍編弁便勉歩保哺捕補舗母募墓慕暮簿方包芳邦奉宝抱放法泡胞俸倣峰砲崩訪報蜂豊飽褒縫亡乏忙坊妨忘防房肪某冒剖紡望傍帽棒貿貌暴膨謀頰北木朴牧睦僕墨撲没勃堀本奔翻凡盆麻摩磨魔毎妹枚昧埋幕膜枕又末抹万満慢漫未味魅岬密蜜脈妙民眠矛務無夢霧娘名命明迷冥盟銘鳴滅免面綿麺茂模毛妄盲耗猛網目黙門紋問冶夜野弥厄役約訳薬躍闇由油喩愉諭輸癒唯友有勇幽悠郵湧猶裕遊雄誘憂融優与予余誉預幼用羊妖洋要容庸揚揺葉陽溶腰様瘍踊窯養擁謡曜抑沃浴欲翌翼拉裸羅来雷頼絡落酪辣乱卵覧濫藍欄吏利里理痢裏履璃離陸立律慄略柳流留竜粒隆硫侶旅虜慮了両良料涼猟陵量僚領寮療瞭糧力緑林厘倫輪隣臨瑠涙累塁類令礼冷励戻例鈴零霊隷齢麗暦歴列劣烈裂恋連廉練錬呂炉賂路露老労弄郎朗浪廊楼漏籠六録麓論和話賄脇惑枠湾腕澤丑丞乃之乎也云亘亙些亦亥亨亮仔伊伍伽佃佑伶侃侑俄俣俐倭俱倦倖偲傭儲允兎兜其冴凌凜凛凧凪凰凱函劉劫勁勺勿匁匡廿卜卯卿厨厩叉叡叢叶只吾吞吻哉哨啄哩喬喧喰喋嘩嘉嘗噌噂圃圭坐尭堯坦埴堰堺堵塙壕壬夷奄奎套娃姪姥娩嬉孟宏宋宕宥寅寓寵尖尤屑峨峻崚嵯嵩嶺巌巖巫已巳巴巷巽帖幌幡庄庇庚庵廟廻弘弛彗彦彪彬徠忽怜恢恰恕悌惟惚悉惇惹惺惣慧憐戊或戟托按挺挽掬捲捷捺捧掠揃摺撒撰撞播撫擢孜敦斐斡斧斯於旭昂昊昏昌昴晏晃晄晒晋晟晦晨智暉暢曙曝曳朋朔杏杖杜李杭杵杷枇柑柴柘柊柏柾柚桧檜栞桔桂栖桐栗梧梓梢梛梯桶梶椛梁棲椋椀楯楚楕椿楠楓椰楢楊榎樺榊榛槙槇槍槌樫槻樟樋橘樽橙檎檀櫂櫛櫓欣欽歎此殆毅毘毬汀汝汐汲沌沓沫洸洲洵洛浩浬淵淳渚渚淀淋渥湘湊湛溢滉溜漱漕漣澪濡瀕灘灸灼烏焚煌煤煉熙燕燎燦燭燿爾牒牟牡牽犀狼猪獅玖珂珈珊珀玲琢琉瑛琥琶琵琳瑚瑞瑶瑳瓜瓢甥甫畠畢疋疏皐皓眸瞥矩砦砥砧硯碓碗碩碧磐磯祇祢禰祐祷禄祿禎禽禾秦秤稀稔稟稜穣穰穹穿窄窪窺竣竪竺竿笈笹笙笠筈筑箕箔篇篠簾籾粥粟糊紘紗紐絃紬絆絢綺綜綴緋綾綸縞徽繫纂纏羚翔翠耀而耶耽聡肇肋肴胤胡脩腔脹膏臥舜舵芥芹芭芙芦苑茄苔苺茅茉茸茜莞荻莫莉菅菫菖萄菩萌萠菱葦葵萱葺萩董葡蓑蒔蒐蒼蒲蒙蓉蓮蔭蔦蓬蔓蕎蕨蕉蕃蕪薙蕾蕗藁薩蘇蘭蝦蝶螺蟹衿袈袴裡裟裳襖訊訣註詢詫誼諏諄諒謂諺讃豹貰賑赳跨蹄蹟輔輯輿轟辰辻迂迄辿迪迦這逞逗逢遥遙遁遼邑祁郁鄭酉醇醐醍釉釘釧銑鋒鋸錘錐錆錫鍬鎧閃閏閤阿陀隈隼雀雁雛雫霞靖鞄鞍鞘鞠鞭頁頌頗颯饗馨馴馳駕駿驍魁魯鮎鯉鯛鰯鱒鱗鳩鳶鳳鴨鴻鵜鵬鷲鷺鷹麒麟麿黎黛鼎亞惡爲衞應櫻奧價壞懷樂卷陷氣僞戲峽狹曉勳惠鷄藝縣儉劍險圈檢顯驗嚴廣恆國碎雜兒濕壽收從澁獸縱敍將燒奬條乘淨剩疊孃讓釀眞寢愼盡粹醉穗齊靜攝專戰纖禪壯爭莊搜裝騷藏臟帶滯單團彈晝鑄廳聽鎭轉傳燈盜稻拜賣髮拔祕拂佛飜默藥與搖樣謠來覽龍壘彌萃璋憑靈祀儚跋扈蠢莱槭霍弩裔魄狗叱洩焔燐娥祓狐飄戎瓔曼侘袿掟豫礙幺荼鵞絨呑粕牌霖盃嶋榮實鰻鯵鴎蛾咳蛙苅蟻吃侠僑躯轡繋罫頚鹸姑垢糠濠麹鵠狛鮭匙鯖捌鮫餐屍宍綬繍什夙薯藷鋤廠醤蝕疹塵靭趨蝉舛鼠掻騨岱叩狸鱈腿蛋蜘諜銚鎚掴鍔壷嬬吊剃轍填甜鴇禿椴苫葱嚢膿覗蚤楳矧剥駁醗筏噺蛤誹髭錨弗糞僻呆峯庖烹頬鮪桝牝薮篭聾蝋歪鰐牢聯霰橄栴朧樅欅楡栂蓼蛟媚蔚雉鶉鵯澎圓鞆膠橿曾萬婁糟岑鋲楫竈濱瀧冨邇鏑桓匝丕效泝錚栢胖毫赫葭怡鴛學煕﨑總孚尹會游倶讐晰雙哭薔薇爛對甦滸搶仇滿傀妓蜃樓軋榜嗚蝴髙邉籐鴬蛎鰍鰹噛贋痔娼脆鰭鮒鉾悶爺齋遉烽隗遖焉瀾咆哮姐罠閻饅撼墟截蛭鬨邂逅鍾彷徨汜滎郿塢旻趙戌濤殷賽譚蛛眷碇蝙蝠櫃卍吼鯱哄腥吠騙寇橡鴉壺涛峙囃紊雹兇諷狆瞑慟逡剌厭穢艱蕩漲炸熾殲們戮寥祠嘘涜痺樵囁坡魏于坤謐袁瓚馥繇寉沛潘顗沮蒯賈詡傕伉闞蔡瑁暹鄧聘懿郃攸糜蒋渠樊稠玠粲粱軫苞歆邈珪繡琬虔荀彧瑜淮楙昱韋郝瓊鞏雍龐傅曄廖琮琦褚翊曠奕畯瑾騭逵秉邢薛魴鮑闓謖褘朶喃嶷范疆濬旌艾毋恪彤姜襄薊隘鄴邳濮荊拗廬蜀潼涪皖鄱冀禹穆莽簒并兗鐸妲羌衍奢盧渾弉驪霄胥臾饕餮蟲凋棕 -------------------------------------------------------------------------------- /resoures/設定.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/resoures/設定.psd -------------------------------------------------------------------------------- /src/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | // Current hardware setup 5 | #define CHIP0 CHIP_YM2612 6 | #define CHIP1 CHIP_SN76489_0 7 | #define CHIP2 CHIP_SN76489_1 8 | 9 | #define USE_YM2612 10 | #define USE_SN76489 11 | #define USE_YM2203_0 12 | 13 | #define CHIP0_CLOCK CLK_0 14 | #define CHIP1_CLOCK CLK_1 15 | #define CHIP2_CLOCK CLK_0 16 | 17 | // LCD 18 | #define LCD_W 170 19 | #define LCD_H 320 20 | #define LCD_CLK 2 21 | #define LCD_MOSI 44 22 | #define LCD_RST 42 23 | #define LCD_DC 41 24 | 25 | // DISPLAY 26 | #define TITLE_DEVIDER " *** " 27 | #define SCROLL_SPEED_TITLE .8F // 文字スクロール速度 px 28 | #define SCROLL_SPEED_GAME .6F // 文字スクロール速度 px 29 | #define SCROLL_SPEED_AUTHOR .4F // 文字スクロール速度 px 30 | #define SCROLL_DELAY 2000 // スクロール開始までのディレイ ms 31 | #define DISP_TIMER_INTERVAL 20 // ms 表示更新タイマー間隔 32 | 33 | // SD Card 34 | #define SD_CS 7 35 | #define SD_MOSI 6 36 | #define SD_CLK 5 37 | #define SD_MISO 4 38 | 39 | #define MAX_PNG_WIDTH 640 40 | #define MAX_FILE_SIZE 7000000 // 6613100 41 | 42 | // I2C 43 | #define I2C_SDA 16 44 | #define I2C_SCL 15 45 | 46 | // NJU72341 47 | #define NJU72341_MUTE_PIN 17 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/config.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | #define CONFIG_FILE_PATH "/config.txt" 9 | #define CONFIG_LAST_FOLDER "/lastfolder.txt" 10 | 11 | typedef enum { 12 | LANG_JA, 13 | LANG_EN, 14 | } tLang; 15 | 16 | typedef enum { 17 | LOOP_1 = 1, 18 | LOOP_2 = 2, 19 | LOOP_3 = 3, 20 | LOOP_4 = 4, 21 | LOOP_5 = 5, 22 | LOOP_INIFITE = 0, 23 | } tLoop; 24 | 25 | typedef enum { REPEAT_ALL, REPEAT_ONE, REPEAT_FOLDER } tRepeat; 26 | typedef enum { SCROLL_0, SCROLL_1, SCROLL_2, SCROLL_INFINITE } tSCroll; 27 | typedef enum { HISTORY_NONE, HISTORY_FOLDER, HISTORY_FILE } tHistory; 28 | typedef enum { FO_0 = 0, FO_2 = 2000, FO_5 = 5000, FO_8 = 8000, FO_10 = 10000, FO_12 = 12000, FO_15 = 15000 } tFadeout; 29 | typedef enum { UPDATE_YES, UPDATE_NO } tUpdate; 30 | typedef enum { MODE_PLAYER, MODE_SERIAL } tMode; 31 | 32 | typedef enum { 33 | CFG_LANG, // 言語 34 | CFG_NUM_LOOP, // ループ回数 35 | CFG_REPEAT, // リピート単位 36 | CFG_SCROLL, // テキストスクロール回数 37 | CFG_HISTORY, // 起動時復旧 38 | CFG_FADEOUT, // フェードアウト時間 39 | CFG_UPDATE, // 画面更新有無 40 | CFG_MODE, // 動作モード 41 | } tConfig; 42 | 43 | // 設定用構造体 44 | typedef struct { 45 | u8_t index; // 選択中のインデックス 46 | String labelJp, labelEn; // 設定表示名 47 | std::vector optionsJp; // 選択肢ラベル日本語 48 | std::vector optionsEn; // 選択肢ラベル英語 49 | std::vector optionValues; // 選択肢の値 50 | } sConfig; 51 | 52 | class NDConfig { 53 | public: 54 | tMode currentMode; 55 | std::vector items; 56 | bool init(); 57 | void saveCfg(); 58 | void saveHistory(); 59 | void loadCfg(); 60 | u32_t loadHistory(); 61 | void remove(); 62 | int get(tConfig item); 63 | String lastFolderName = ""; 64 | 65 | private: 66 | }; 67 | 68 | extern NDConfig ndConfig; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /src/disp.h: -------------------------------------------------------------------------------- 1 | #ifndef DISP_H 2 | #define DISP_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "OpenFontRender.h" 9 | #include "common.h" 10 | #include "config.h" 11 | #include "file.h" 12 | #include "fonts.h" 13 | #include "input.h" 14 | 15 | #define C_BASEBG TFT_BLACK 16 | #define C_BASEFG TFT_WHITE 17 | #define C_ORANGE 0xfdc7 18 | #define C_YELLOW 0xfee0 19 | 20 | #define C_ACCENT_LIGHT 0x26df 21 | #define C_ACCENT_DARK 0x1396 22 | 23 | #define C_LIGHTGRAY 0xef7d 24 | #define C_GRAY 0xad55 25 | #define C_MID 0x73ae 26 | #define C_DARK 0x10c4 27 | 28 | #define C_HEADER 0x4228 // 0x444444 29 | #define C_BORDER 0xad55 // 0xadaaad 30 | #define C_FOOTER_ACTIVE 0x530c // 0x506065 31 | #define C_FOOTER_INACTIVE 0xbe1a // 0xbbc0d0 32 | 33 | #define ITEM_HEIGHT 32 34 | 35 | class LGFX : public lgfx::LGFX_Device { 36 | private: 37 | lgfx::Panel_ST7789 _panel_instance; 38 | lgfx::Bus_SPI _bus_instance; 39 | 40 | public: 41 | LGFX(void); 42 | }; 43 | 44 | extern LGFX lcd; 45 | 46 | typedef struct { 47 | String trackEn, trackJp, gameEn, gameJp, systemEn, systemJp, authorEn, authorJp, date; 48 | String chip0, chip1, type; 49 | uint64_t time; 50 | uint32_t no, maxFiles; 51 | } tDispData; 52 | 53 | bool initDisp(); 54 | void updateDisp(tDispData data); 55 | void redrawOnCore0(); 56 | void redraw(); 57 | void serialModeDraw(); 58 | void drawBG(); 59 | void startTimer(); 60 | void stopTimer(); 61 | 62 | bool openPNG(String dirName, String fileName, bool AA, bool sprite); 63 | 64 | // Label クラス 65 | class Label { 66 | public: 67 | Label(const int16_t x, // 座標 68 | const int16_t y, 69 | const int16_t w, // 幅 70 | const uint16_t fontColor, const uint16_t bgColor, const uint16_t fontSize, const float scrollSpeed, 71 | const Align textAlign); 72 | void setCaption(String newCaption); 73 | void update(); 74 | void setEnabled(bool state); 75 | 76 | private: 77 | float _n = 0; // ラベルスクロール量 78 | uint32_t _x = 0, _y = 0, _labelWidth = 0, _textWidth = 0, _devWidth = 0, _startTick = 0; 79 | uint16_t _fontColor; 80 | uint16_t _fontSize; 81 | uint16_t _bgColor; 82 | String _caption; 83 | LGFX_Sprite _sprite; 84 | Align _textAlign; 85 | int _scrollCount; // スクロール済み回数 86 | bool _isScrolling = false; 87 | float _scrollSpeed; 88 | bool _enabled = false; 89 | }; 90 | 91 | // 設定画面クラス 92 | class CFGWindow { 93 | public: 94 | bool isVisible = false; 95 | int currentItemIndex = 0; 96 | 97 | void init(); 98 | void show(); 99 | void close(); 100 | void up(); 101 | void down(); 102 | void left(); 103 | void right(); 104 | 105 | void draw(); 106 | void drawItem(int index, bool toFrameBuffer); 107 | void drawFooter(bool toFrameBuffer); 108 | 109 | private: 110 | LGFX_Sprite _sprite; 111 | LGFX_Sprite _sprFooter; 112 | }; 113 | 114 | extern CFGWindow cfgWindow; 115 | 116 | #endif -------------------------------------------------------------------------------- /src/file.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_H 2 | #define FILE_H 3 | 4 | #include 5 | #include 6 | 7 | #include "NJU72341.h" 8 | #include "common.h" 9 | #include "disp.h" 10 | #include "fm.h" 11 | #include "vgm.h" 12 | 13 | int mod(int i, int j); 14 | 15 | class NDFile { 16 | public: 17 | bool init(); 18 | void listDir(const char *dirname); 19 | bool readFile(String path); 20 | bool filePlay(int count); 21 | bool dirPlay(int count); 22 | bool play(uint16_t d, uint16_t f, int8_t att = -1); 23 | bool fileOpen(uint16_t d, uint16_t f, int8_t att = -1); 24 | uint8_t getFolderAttenuation(String path); // フォルダの音量減衰取得 25 | 26 | uint16_t currentDir; // 現在のディレクトリ 27 | uint16_t currentFile; // 現在のファイル 28 | uint16_t totalSongs = 0; // 合計曲数 29 | uint16_t getNumFilesinCurrentDir(); 30 | 31 | uint8_t *data; // データ本体 32 | uint32_t pos; // データ位置 33 | std::vector dirs; // ルートのディレクトリ一覧 34 | std::vector pngs; // ディレクトリごとのpng 35 | std::vector> files; // 各ディレクトリ内のファイル一覧 36 | 37 | u8_t get_ui8(); 38 | u16_t get_ui16(); 39 | u32_t get_ui24(); 40 | u32_t get_ui32(); 41 | u8_t get_ui8_at(uint32_t p); 42 | u16_t get_ui16_at(uint32_t p); 43 | u32_t get_ui24_at(uint32_t p); 44 | u32_t get_ui32_at(uint32_t p); 45 | 46 | private: 47 | }; 48 | 49 | extern NDFile ndFile; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/input.h: -------------------------------------------------------------------------------- 1 | #ifndef INPUT_H 2 | #define INPUT_H 3 | #include 4 | 5 | #include "SI5351.hpp" 6 | 7 | #define INPUT_PIN 1 8 | #define INPUT_CAPTURE_INTERVAL 60 // ms キャプチャインターバル 9 | #define INPUT_REPEAT_DELAY 300 // ms リピート開始までの時間 10 | 11 | typedef enum { btnNONE, btnRIGHT, btnUP, btnDOWN, btnLEFT, btnSELECT, btnFUNC } Button; 12 | 13 | #define VAL_0 0 // 0 - 50 14 | #define VAL_1 530 // 530 前後 460 - 510 15 | #define VAL_2 1301 // 1301 前後 1240 - 1290 16 | #define VAL_3 1980 // 1980 前後 1900 - 1980 17 | #define VAL_4 2900 // 2905 前後 2860 - 2910 18 | #define VAL_NONE 4095 // 4095 19 | 20 | class Input { 21 | public: 22 | Input(); 23 | void init(); 24 | void inputHandler(); 25 | void setEnabled(bool state); 26 | Button inputBuffer = btnNONE; 27 | Button checkButton2(); 28 | 29 | private: 30 | bool _enabled = false; 31 | uint32_t _buttonLastTick = 0; // 最後にボタンが押された時間 32 | uint32_t _buttonLastTick2 = 0; 33 | uint32_t _buttonRepeatStarted = 0; // リピート開始時間 34 | bool _btnFlag; 35 | 36 | Button _lastButton = btnNONE; 37 | Button _readButton(); 38 | }; 39 | 40 | extern Input input; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/serialman.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIALMAN_H 2 | #define SERIALMAN_H 3 | #include 4 | 5 | u8_t getSerial(); 6 | 7 | class SerialMan { 8 | public: 9 | SerialMan(); 10 | void init(); 11 | void startSerialTask(); 12 | void changeYM2612Clock(); 13 | void changeSN76489Clock(); 14 | 15 | private: 16 | int YM2612Clock = 0, SN76489Clock = 0; 17 | }; 18 | 19 | extern SerialMan serialMan; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /xgm_test/sharrier.xgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/sharrier.xgm -------------------------------------------------------------------------------- /xgm_test/wavs/hihat+.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/hihat+.wav -------------------------------------------------------------------------------- /xgm_test/wavs/hihat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/hihat.wav -------------------------------------------------------------------------------- /xgm_test/wavs/kick.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/kick.wav -------------------------------------------------------------------------------- /xgm_test/wavs/kick2+.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/kick2+.wav -------------------------------------------------------------------------------- /xgm_test/wavs/kick2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/kick2.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2a#+hihat+.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2a#+hihat+.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2a#.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2a#.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2a.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2b.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2b.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2c.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2c.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2d+hihat+.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2d+hihat+.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2d.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2d.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2e.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2e.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2f.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2f.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2g#.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2g#.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o2g.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o2g.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3a#.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3a#.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3a.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3b.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3b.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3c.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3c.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3d.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3d.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3e.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3e.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3f.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3f.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3g#.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3g#.wav -------------------------------------------------------------------------------- /xgm_test/wavs/o3g.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/o3g.wav -------------------------------------------------------------------------------- /xgm_test/wavs/snare.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/snare.wav -------------------------------------------------------------------------------- /xgm_test/wavs/snare2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/snare2.wav -------------------------------------------------------------------------------- /xgm_test/wavs/tom-h.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/tom-h.wav -------------------------------------------------------------------------------- /xgm_test/wavs/tom-l.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/tom-l.wav -------------------------------------------------------------------------------- /xgm_test/wavs/tom-m.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fujix1/NanoDrive6/bb17265ec066696328fb74b4371566974c0e9548/xgm_test/wavs/tom-m.wav --------------------------------------------------------------------------------