├── .gitignore
├── Antario.sln
├── Antario.sln.DotSettings.user
├── Antario.vcxproj
├── Antario.vcxproj.filters
├── Antario.vcxproj.user
├── Antario
├── EventListener.h
├── Features
│ ├── ESP.cpp
│ ├── ESP.h
│ ├── EnginePrediction.cpp
│ ├── EnginePrediction.h
│ ├── Features.h
│ └── Misc.h
├── GUI
│ ├── GUI.cpp
│ └── GUI.h
├── Hooks.cpp
├── Hooks.h
├── LIB
│ └── freetype
│ │ ├── freetype.dll
│ │ ├── freetype.lib
│ │ ├── freetype
│ │ ├── config
│ │ │ ├── ftconfig.h
│ │ │ ├── ftheader.h
│ │ │ ├── ftmodule.h
│ │ │ ├── ftoption.h
│ │ │ └── ftstdlib.h
│ │ ├── freetype.h
│ │ ├── ftadvanc.h
│ │ ├── ftbbox.h
│ │ ├── ftbdf.h
│ │ ├── ftbitmap.h
│ │ ├── ftbzip2.h
│ │ ├── ftcache.h
│ │ ├── ftchapters.h
│ │ ├── ftcid.h
│ │ ├── ftcolor.h
│ │ ├── ftdriver.h
│ │ ├── fterrdef.h
│ │ ├── fterrors.h
│ │ ├── ftfntfmt.h
│ │ ├── ftgasp.h
│ │ ├── ftglyph.h
│ │ ├── ftgxval.h
│ │ ├── ftgzip.h
│ │ ├── ftimage.h
│ │ ├── ftincrem.h
│ │ ├── ftlcdfil.h
│ │ ├── ftlist.h
│ │ ├── ftlzw.h
│ │ ├── ftmac.h
│ │ ├── ftmm.h
│ │ ├── ftmodapi.h
│ │ ├── ftmoderr.h
│ │ ├── ftotval.h
│ │ ├── ftoutln.h
│ │ ├── ftparams.h
│ │ ├── ftpfr.h
│ │ ├── ftrender.h
│ │ ├── ftsizes.h
│ │ ├── ftsnames.h
│ │ ├── ftstroke.h
│ │ ├── ftsynth.h
│ │ ├── ftsystem.h
│ │ ├── fttrigon.h
│ │ ├── fttypes.h
│ │ ├── ftwinfnt.h
│ │ ├── internal
│ │ │ ├── autohint.h
│ │ │ ├── cffotypes.h
│ │ │ ├── cfftypes.h
│ │ │ ├── ftcalc.h
│ │ │ ├── ftdebug.h
│ │ │ ├── ftdrv.h
│ │ │ ├── ftgloadr.h
│ │ │ ├── fthash.h
│ │ │ ├── ftmemory.h
│ │ │ ├── ftobjs.h
│ │ │ ├── ftpsprop.h
│ │ │ ├── ftrfork.h
│ │ │ ├── ftserv.h
│ │ │ ├── ftstream.h
│ │ │ ├── fttrace.h
│ │ │ ├── ftvalid.h
│ │ │ ├── internal.h
│ │ │ ├── psaux.h
│ │ │ ├── pshints.h
│ │ │ ├── services
│ │ │ │ ├── svbdf.h
│ │ │ │ ├── svcfftl.h
│ │ │ │ ├── svcid.h
│ │ │ │ ├── svfntfmt.h
│ │ │ │ ├── svgldict.h
│ │ │ │ ├── svgxval.h
│ │ │ │ ├── svkern.h
│ │ │ │ ├── svmetric.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
│ │ │ ├── sfnt.h
│ │ │ ├── t1types.h
│ │ │ └── tttypes.h
│ │ ├── t1tables.h
│ │ ├── ttnameid.h
│ │ ├── tttables.h
│ │ └── tttags.h
│ │ └── ft2build.h
├── Menu.cpp
├── SDK
│ ├── CEntity.h
│ ├── CGlobalVarsBase.h
│ ├── CHandle.h
│ ├── CInput.h
│ ├── CPrediction.h
│ ├── ClientClass.h
│ ├── Definitions.h
│ ├── IBaseClientDll.h
│ ├── IClientEntity.h
│ ├── IClientEntityList.h
│ ├── IClientMode.h
│ ├── IClientNetworkable.h
│ ├── IClientRenderable.h
│ ├── IClientThinkable.h
│ ├── IClientUnknown.h
│ ├── IGameEvent.h
│ ├── ISurface.h
│ ├── IVEngineClient.h
│ ├── KeyValues.h
│ ├── PlayerInfo.h
│ ├── Recv.h
│ ├── VMatrix.h
│ └── Vector.h
├── Settings.cpp
├── Settings.h
├── Utils
│ ├── Color.h
│ ├── DrawManager.cpp
│ ├── DrawManager.h
│ ├── Font.cpp
│ ├── Font.h
│ ├── GlobalVars.cpp
│ ├── GlobalVars.h
│ ├── Interfaces.cpp
│ ├── Interfaces.h
│ ├── NetvarManager.cpp
│ ├── NetvarManager.h
│ ├── SPoint.h
│ ├── SRect.h
│ └── Utils.h
└── dllmain.cpp
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 | !freetype.lib
29 |
30 | # Executables
31 | *.dll
32 | !freetype.dll
33 | *.exe
34 | *.out
35 | *.app
36 | *.enc
37 |
38 | # MSVC binary files
39 | *.db
40 | *.ipch
41 | *.suo
42 | *.tlog
43 | *.idb
44 | *.pdb
45 | *.ilk
46 | *.bsc
47 | *.sbr
48 | *.log
49 | *.opendb
50 | *.iobj
51 | *.ipdb
52 | *.xml
53 | *.lastcodeanalysissucceeded
54 | *.sqlite-journal
55 | *.sqlite
56 | *.json
--------------------------------------------------------------------------------
/Antario.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27004.2005
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Antario", "Antario.vcxproj", "{1B8103F7-F793-47B0-9FBE-44EC66BC319D}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {1B8103F7-F793-47B0-9FBE-44EC66BC319D}.Debug|x86.ActiveCfg = Debug|Win32
15 | {1B8103F7-F793-47B0-9FBE-44EC66BC319D}.Debug|x86.Build.0 = Debug|Win32
16 | {1B8103F7-F793-47B0-9FBE-44EC66BC319D}.Release|x86.ActiveCfg = Release|Win32
17 | {1B8103F7-F793-47B0-9FBE-44EC66BC319D}.Release|x86.Build.0 = Release|Win32
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D61CB3C0-4778-4D21-B797-C1EF2D4DCD59}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Antario.sln.DotSettings.user:
--------------------------------------------------------------------------------
1 |
2 | 2
3 | True
4 | True
--------------------------------------------------------------------------------
/Antario.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
--------------------------------------------------------------------------------
/Antario/EventListener.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include "SDK\IGameEvent.h"
4 |
5 | class EventListener : public IGameEventListener2
6 | {
7 | public:
8 | EventListener(std::vector events)
9 | {
10 | for (auto& it : events)
11 | g_pEventManager->AddListener(this, it, false);
12 | }
13 |
14 | ~EventListener()
15 | {
16 | g_pEventManager->RemoveListener(this);
17 | }
18 |
19 | void FireGameEvent(IGameEvent* event) override
20 | {
21 | // call functions here
22 | }
23 |
24 | int GetEventDebugID() override
25 | {
26 | return EVENT_DEBUG_ID_INIT;
27 | }
28 | };
--------------------------------------------------------------------------------
/Antario/Features/ESP.cpp:
--------------------------------------------------------------------------------
1 | #include "ESP.h"
2 | #include "..\Settings.h"
3 | #include "..\Utils\Utils.h"
4 | #include "..\SDK\IVEngineClient.h"
5 | #include "..\SDK\PlayerInfo.h"
6 |
7 | ESP g_ESP;
8 |
9 | void ESP::RenderBox(C_BaseEntity* pEnt)
10 | {
11 | Vector vecScreenOrigin, vecOrigin = pEnt->GetRenderOrigin();
12 | if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin))
13 | return;
14 |
15 | Vector vecScreenBottom, vecBottom = vecOrigin;
16 | vecBottom.z += (pEnt->GetFlags() & FL_DUCKING) ? 54.f : 72.f;
17 | if (!Utils::WorldToScreen(vecBottom, vecScreenBottom))
18 | return;
19 |
20 | const auto sx = int(std::roundf(vecScreenOrigin.x)),
21 | sy = int(std::roundf(vecScreenOrigin.y)),
22 | h = int(std::roundf(vecScreenBottom.y - vecScreenOrigin.y)),
23 | w = int(std::roundf(h * 0.25f));
24 |
25 | /* Draw rect around the entity */
26 | g_Render.Rect(sx - w, sy, sx + w, sy + h, (pEnt->GetTeam() == localTeam) ? teamColor : enemyColor);
27 |
28 | /* Draw rect outline */
29 | g_Render.Rect(sx - w - 1, sy - 1, sx + w + 1, sy + h + 1, Color::Black());
30 | g_Render.Rect(sx - w + 1, sy + 1, sx + w - 1, sy + h - 1, Color::Black());
31 | }
32 |
33 | void ESP::RenderName(C_BaseEntity* pEnt, int iterator)
34 | {
35 | Vector vecScreenOrigin,
36 | vecOrigin = pEnt->GetRenderOrigin();
37 |
38 | if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin))
39 | return;
40 |
41 | Vector vecScreenBottom, vecBottom = vecOrigin;
42 | vecBottom.z += (pEnt->GetFlags() & FL_DUCKING) ? 54.f : 72.f;
43 | if (!Utils::WorldToScreen(vecBottom, vecScreenBottom))
44 | return;
45 |
46 |
47 | PlayerInfo_t pInfo;
48 | g_pEngine->GetPlayerInfo(iterator, &pInfo);
49 |
50 | const auto sx = int(std::roundf(vecScreenOrigin.x)),
51 | sy = int(std::roundf(vecScreenOrigin.y)),
52 | h = int(std::roundf(vecScreenBottom.y - vecScreenOrigin.y));
53 |
54 | g_Render.String(sx, sy + h - 16, FONT_CENTERED_X | FONT_DROPSHADOW,
55 | (localTeam == pEnt->GetTeam()) ? teamColor : enemyColor,
56 | g_Fonts.vecFonts[FONT_TAHOMA_10], pInfo.szName);
57 | }
58 |
59 | void ESP::RenderWeaponName(C_BaseEntity* pEnt)
60 | {
61 | Vector vecScreenOrigin, vecOrigin = pEnt->GetRenderOrigin();
62 | if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin))
63 | return;
64 |
65 | auto weapon = pEnt->GetActiveWeapon();
66 | if (!weapon)
67 | return;
68 |
69 | auto strWeaponName = weapon->GetName();
70 |
71 | /* Remove "weapon_" prefix */
72 | strWeaponName.erase(0, 7);
73 | /* All uppercase */
74 | std::transform(strWeaponName.begin(), strWeaponName.end(), strWeaponName.begin(), ::toupper);
75 |
76 | g_Render.String(int(vecScreenOrigin.x), int(vecScreenOrigin.y), FONT_CENTERED_X | FONT_DROPSHADOW,
77 | (localTeam == pEnt->GetTeam()) ? teamColor : enemyColor,
78 | g_Fonts.vecFonts[FONT_TAHOMA_10], strWeaponName.c_str());
79 | }
80 |
81 |
82 | void ESP::Render()
83 | {
84 | if (!g::pLocalEntity || !g_pEngine->IsInGame())
85 | return;
86 |
87 | localTeam = g::pLocalEntity->GetTeam();
88 |
89 | for (int it = 1; it <= g_pEngine->GetMaxClients(); ++it)
90 | {
91 | C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(it);
92 |
93 | if (!pPlayerEntity
94 | || pPlayerEntity == g::pLocalEntity
95 | || pPlayerEntity->IsDormant()
96 | || !pPlayerEntity->IsAlive())
97 | continue;
98 |
99 | if (g_Settings.bShowBoxes)
100 | this->RenderBox(pPlayerEntity);
101 |
102 | if (g_Settings.bShowNames)
103 | this->RenderName(pPlayerEntity, it);
104 |
105 | if (g_Settings.bShowWeapons)
106 | this->RenderWeaponName(pPlayerEntity);
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Antario/Features/ESP.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "..\Utils\GlobalVars.h"
3 | #include "..\Utils\DrawManager.h"
4 |
5 |
6 | class ESP
7 | {
8 | public:
9 | void Render();
10 | private:
11 | void RenderBox(C_BaseEntity* pEnt);
12 | void RenderName(C_BaseEntity* pEnt, int iterator);
13 | void RenderWeaponName(C_BaseEntity* pEnt);
14 |
15 | int localTeam{};
16 | Color teamColor{ 195, 240, 100, 255 };
17 | Color enemyColor{ 250, 165, 110, 255 };
18 | };
19 | extern ESP g_ESP;
--------------------------------------------------------------------------------
/Antario/Features/EnginePrediction.cpp:
--------------------------------------------------------------------------------
1 | #include "EnginePrediction.h"
2 | #include "..\SDK\CInput.h"
3 | #include "..\SDK\CEntity.h"
4 | #include "..\Utils\GlobalVars.h"
5 | #include "..\SDK\CPrediction.h"
6 | #include "..\SDK\CGlobalVarsBase.h"
7 |
8 | float flOldCurtime;
9 | float flOldFrametime;
10 |
11 |
12 | void engine_prediction::RunEnginePred()
13 | {
14 | static int nTickBase;
15 | static CUserCmd* pLastCmd;
16 |
17 | // fix tickbase if game didnt render previous tick
18 | if (pLastCmd)
19 | {
20 | if (pLastCmd->hasbeenpredicted)
21 | nTickBase = g::pLocalEntity->GetTickBase();
22 | else
23 | ++nTickBase;
24 | }
25 |
26 | // get random_seed as its 0 in clientmode->createmove
27 | const auto getRandomSeed = []()
28 | {
29 | using MD5_PseudoRandomFn = unsigned long(__cdecl*)(std::uintptr_t);
30 | static auto offset = Utils::FindSignature("client_panorama.dll", "55 8B EC 83 E4 F8 83 EC 70 6A 58");
31 | static auto MD5_PseudoRandom = reinterpret_cast(offset);
32 | return MD5_PseudoRandom(g::pCmd->command_number) & 0x7FFFFFFF;
33 | };
34 |
35 |
36 | pLastCmd = g::pCmd;
37 | flOldCurtime = g_pGlobalVars->curtime;
38 | flOldFrametime = g_pGlobalVars->frametime;
39 |
40 | g::uRandomSeed = getRandomSeed();
41 | g_pGlobalVars->curtime = nTickBase * g_pGlobalVars->intervalPerTick;
42 | g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
43 |
44 | g_pMovement->StartTrackPredictionErrors(g::pLocalEntity);
45 |
46 | CMoveData data;
47 | memset(&data, 0, sizeof(CMoveData));
48 |
49 | g_pMoveHelper->SetHost(g::pLocalEntity);
50 | g_pPrediction->SetupMove(g::pLocalEntity, g::pCmd, g_pMoveHelper, &data);
51 | g_pMovement->ProcessMovement(g::pLocalEntity, &data);
52 | g_pPrediction->FinishMove(g::pLocalEntity, g::pCmd, &data);
53 | }
54 |
55 | void engine_prediction::EndEnginePred()
56 | {
57 | g_pMovement->FinishTrackPredictionErrors(g::pLocalEntity);
58 | g_pMoveHelper->SetHost(nullptr);
59 |
60 | g_pGlobalVars->curtime = flOldCurtime;
61 | g_pGlobalVars->frametime = flOldFrametime;
62 | }
63 |
--------------------------------------------------------------------------------
/Antario/Features/EnginePrediction.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace engine_prediction
4 | {
5 | void RunEnginePred();
6 | void EndEnginePred();
7 | }
--------------------------------------------------------------------------------
/Antario/Features/Features.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | /*
3 | * Header with all "features" directory headers included
4 | * Used to make hooks look clean with its "include" files
5 | * I try to keep them in alphabetical order to look clean
6 | */
7 |
8 | #include "EnginePrediction.h"
9 | #include "ESP.h"
10 | #include "Misc.h"
--------------------------------------------------------------------------------
/Antario/Features/Misc.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "..\Utils\GlobalVars.h"
3 | #include "..\Settings.h"
4 |
5 | class Misc
6 | {
7 | public:
8 | void OnCreateMove()
9 | {
10 | this->pCmd = g::pCmd;
11 | this->pLocal = g::pLocalEntity;
12 |
13 | if (g_Settings.bBhopEnabled)
14 | this->DoBhop();
15 | // sum future shit
16 | };
17 | private:
18 | CUserCmd* pCmd;
19 | C_BaseEntity* pLocal;
20 |
21 | void DoBhop() const
22 | {
23 | if (this->pLocal->GetMoveType() == MoveType_t::MOVETYPE_LADDER)
24 | return;
25 |
26 | static bool bLastJumped = false;
27 | static bool bShouldFake = false;
28 |
29 | if (!bLastJumped && bShouldFake)
30 | {
31 | bShouldFake = false;
32 | pCmd->buttons |= IN_JUMP;
33 | }
34 | else if (pCmd->buttons & IN_JUMP)
35 | {
36 | if (pLocal->GetFlags() & FL_ONGROUND)
37 | bShouldFake = bLastJumped = true;
38 | else
39 | {
40 | pCmd->buttons &= ~IN_JUMP;
41 | bLastJumped = false;
42 | }
43 | }
44 | else
45 | bShouldFake = bLastJumped = false;
46 | }
47 | };
48 |
49 | extern Misc g_Misc;
50 |
--------------------------------------------------------------------------------
/Antario/Hooks.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Utils\DrawManager.h"
4 | #include "Utils\Interfaces.h"
5 | #include "SDK\IClientMode.h"
6 | #include "SDK\ISurface.h"
7 | #include "EventListener.h"
8 | #include "SDK\CInput.h"
9 | #include "GUI\GUI.h"
10 |
11 | namespace vtable_indexes
12 | {
13 | constexpr auto reset = 16;
14 | constexpr auto present = 17;
15 | constexpr auto createMove = 24;
16 | constexpr auto lockCursor = 67;
17 | }
18 |
19 | class VMTHook;
20 | class Hooks
21 | {
22 | public:
23 | // Initialization setup, called on injection
24 | static void Init();
25 | static void Restore();
26 |
27 | /*---------------------------------------------*/
28 | /*-------------Hooked functions----------------*/
29 | /*---------------------------------------------*/
30 |
31 | static bool __fastcall CreateMove(IClientMode*, void*, float, CUserCmd*);
32 | static void __fastcall LockCursor(ISurface*, void*);
33 | static HRESULT __stdcall Reset (IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters);
34 | static HRESULT __stdcall Present (IDirect3DDevice9* pDevice, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion);
35 | static LRESULT __stdcall WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
36 |
37 | private:
38 | /*---------------------------------------------*/
39 | /*-------------VMT Hook pointers---------------*/
40 | /*---------------------------------------------*/
41 |
42 | std::unique_ptr pD3DDevice9Hook;
43 | std::unique_ptr pClientModeHook;
44 | std::unique_ptr pSurfaceHook;
45 |
46 | /*---------------------------------------------*/
47 | /*-------------Hook prototypes-----------------*/
48 | /*---------------------------------------------*/
49 |
50 | typedef bool (__fastcall* CreateMove_t) (IClientMode*, void*, float, CUserCmd*);
51 | typedef void (__fastcall* LockCursor_t) (ISurface*, void*);
52 | typedef long (__stdcall* Reset_t) (IDirect3DDevice9*, D3DPRESENT_PARAMETERS*);
53 | typedef long (__stdcall* Present_t) (IDirect3DDevice9*, const RECT*, const RECT*, HWND, const RGNDATA*);
54 |
55 | private:
56 | ui::MenuMain nMenu;
57 | HWND hCSGOWindow = nullptr; // CSGO window handle
58 | bool bInitializedDrawManager = false; // Check if we initialized our draw manager
59 | WNDPROC pOriginalWNDProc = nullptr; // Original CSGO window proc
60 | std::unique_ptr pEventListener = nullptr; // Listens to csgo events, needs to be created
61 | };
62 |
63 | extern Hooks g_Hooks;
64 |
65 |
66 | class VMTHook
67 | {
68 | public:
69 | VMTHook(void* ppClass)
70 | {
71 | this->ppBaseClass = static_cast(ppClass);
72 |
73 | // loop through all valid class indexes. When it will hit invalid (not existing) it will end the loop
74 | while (static_cast(*this->ppBaseClass)[this->indexCount])
75 | ++this->indexCount;
76 |
77 | const std::size_t kSizeTable = this->indexCount * sizeof(std::uintptr_t);
78 |
79 | this->pOriginalVMT = *this->ppBaseClass;
80 | this->pNewVMT = std::make_unique(this->indexCount);
81 |
82 | // copy original vtable to our local copy of it
83 | std::memcpy(this->pNewVMT.get(), this->pOriginalVMT, kSizeTable);
84 |
85 | // replace original class with our local copy
86 | *this->ppBaseClass = this->pNewVMT.get();
87 | };
88 | ~VMTHook() { *this->ppBaseClass = this->pOriginalVMT; };
89 |
90 | template
91 | Type GetOriginal(const std::size_t index)
92 | {
93 | return reinterpret_cast(this->pOriginalVMT[index]);
94 | };
95 |
96 | HRESULT Hook(const std::size_t index, void* fnNew)
97 | {
98 | if (index > this->indexCount) // check if given index is valid
99 | return E_INVALIDARG;
100 |
101 | this->pNewVMT[index] = reinterpret_cast(fnNew);
102 | return S_OK;
103 | };
104 |
105 | HRESULT Unhook(const std::size_t index)
106 | {
107 | if (index > this->indexCount)
108 | return E_INVALIDARG;
109 |
110 | this->pNewVMT[index] = this->pOriginalVMT[index];
111 | return S_OK;
112 | };
113 |
114 | private:
115 | std::unique_ptr pNewVMT = nullptr; // Actual used vtable
116 | std::uintptr_t** ppBaseClass = nullptr; // Saved pointer to original class
117 | std::uintptr_t* pOriginalVMT = nullptr; // Saved original pointer to the VMT
118 | std::size_t indexCount = 0; // Count of indexes inside out f-ction
119 | };
120 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwilcz/Antario/732db743749f6f9a2764b1e9f53cc7c9c400c54e/Antario/LIB/freetype/freetype.dll
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwilcz/Antario/732db743749f6f9a2764b1e9f53cc7c9c400c54e/Antario/LIB/freetype/freetype.lib
--------------------------------------------------------------------------------
/Antario/LIB/freetype/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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/config/ftstdlib.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftstdlib.h
4 | *
5 | * ANSI-specific library and header configuration file (specification
6 | * only).
7 | *
8 | * Copyright (C) 2002-2019 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 is used to group all `#includes` to the ANSI~C library that
23 | * FreeType normally requires. It also defines macros to rename the
24 | * standard functions within the FreeType source code.
25 | *
26 | * Load a file which defines `FTSTDLIB_H_` before this one to override it.
27 | *
28 | */
29 |
30 |
31 | #ifndef FTSTDLIB_H_
32 | #define FTSTDLIB_H_
33 |
34 |
35 | #include
36 |
37 | #define ft_ptrdiff_t ptrdiff_t
38 |
39 |
40 | /**************************************************************************
41 | *
42 | * integer limits
43 | *
44 | * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
45 | * `int` and `long` in bytes at compile-time. So far, this works for all
46 | * platforms the library has been tested on.
47 | *
48 | * Note that on the extremely rare platforms that do not provide integer
49 | * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
50 | * `int` is 36~bits), we do not make any guarantee about the correct
51 | * behaviour of FreeType~2 with all fonts.
52 | *
53 | * In these cases, `ftconfig.h` will refuse to compile anyway with a
54 | * message like 'couldn't find 32-bit type' or something similar.
55 | *
56 | */
57 |
58 |
59 | #include
60 |
61 | #define FT_CHAR_BIT CHAR_BIT
62 | #define FT_USHORT_MAX USHRT_MAX
63 | #define FT_INT_MAX INT_MAX
64 | #define FT_INT_MIN INT_MIN
65 | #define FT_UINT_MAX UINT_MAX
66 | #define FT_LONG_MIN LONG_MIN
67 | #define FT_LONG_MAX LONG_MAX
68 | #define FT_ULONG_MAX ULONG_MAX
69 |
70 |
71 | /**************************************************************************
72 | *
73 | * character and string processing
74 | *
75 | */
76 |
77 |
78 | #include
79 |
80 | #define ft_memchr memchr
81 | #define ft_memcmp memcmp
82 | #define ft_memcpy memcpy
83 | #define ft_memmove memmove
84 | #define ft_memset memset
85 | #define ft_strcat strcat
86 | #define ft_strcmp strcmp
87 | #define ft_strcpy strcpy
88 | #define ft_strlen strlen
89 | #define ft_strncmp strncmp
90 | #define ft_strncpy strncpy
91 | #define ft_strrchr strrchr
92 | #define ft_strstr strstr
93 |
94 |
95 | /**************************************************************************
96 | *
97 | * file handling
98 | *
99 | */
100 |
101 |
102 | #include
103 |
104 | #define FT_FILE FILE
105 | #define ft_fclose fclose
106 | #define ft_fopen fopen
107 | #define ft_fread fread
108 | #define ft_fseek fseek
109 | #define ft_ftell ftell
110 | #define ft_sprintf sprintf
111 |
112 |
113 | /**************************************************************************
114 | *
115 | * sorting
116 | *
117 | */
118 |
119 |
120 | #include
121 |
122 | #define ft_qsort qsort
123 |
124 |
125 | /**************************************************************************
126 | *
127 | * memory allocation
128 | *
129 | */
130 |
131 |
132 | #define ft_scalloc calloc
133 | #define ft_sfree free
134 | #define ft_smalloc malloc
135 | #define ft_srealloc realloc
136 |
137 |
138 | /**************************************************************************
139 | *
140 | * miscellaneous
141 | *
142 | */
143 |
144 |
145 | #define ft_strtol strtol
146 | #define ft_getenv getenv
147 |
148 |
149 | /**************************************************************************
150 | *
151 | * execution control
152 | *
153 | */
154 |
155 |
156 | #include
157 |
158 | #define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
159 | /* `jmp_buf` is defined as a macro */
160 | /* on certain platforms */
161 |
162 | #define ft_longjmp longjmp
163 | #define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
164 |
165 |
166 | /* The following is only used for debugging purposes, i.e., if */
167 | /* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */
168 |
169 | #include
170 |
171 |
172 | #endif /* FTSTDLIB_H_ */
173 |
174 |
175 | /* END */
176 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftadvanc.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftadvanc.h
4 | *
5 | * Quick computation of advance widths (specification only).
6 | *
7 | * Copyright (C) 2008-2019 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 FTADVANC_H_
20 | #define FTADVANC_H_
21 |
22 |
23 | #include
24 | #include FT_FREETYPE_H
25 |
26 | #ifdef FREETYPE_H
27 | #error "freetype.h of FreeType 1 has been loaded!"
28 | #error "Please fix the directory search order for header files"
29 | #error "so that freetype.h of FreeType 2 is found first."
30 | #endif
31 |
32 |
33 | FT_BEGIN_HEADER
34 |
35 |
36 | /**************************************************************************
37 | *
38 | * @section:
39 | * quick_advance
40 | *
41 | * @title:
42 | * Quick retrieval of advance values
43 | *
44 | * @abstract:
45 | * Retrieve horizontal and vertical advance values without processing
46 | * glyph outlines, if possible.
47 | *
48 | * @description:
49 | * This section contains functions to quickly extract advance values
50 | * without handling glyph outlines, if possible.
51 | *
52 | * @order:
53 | * FT_Get_Advance
54 | * FT_Get_Advances
55 | *
56 | */
57 |
58 |
59 | /**************************************************************************
60 | *
61 | * @enum:
62 | * FT_ADVANCE_FLAG_FAST_ONLY
63 | *
64 | * @description:
65 | * A bit-flag to be OR-ed with the `flags` parameter of the
66 | * @FT_Get_Advance and @FT_Get_Advances functions.
67 | *
68 | * If set, it indicates that you want these functions to fail if the
69 | * corresponding hinting mode or font driver doesn't allow for very quick
70 | * advance computation.
71 | *
72 | * Typically, glyphs that are either unscaled, unhinted, bitmapped, or
73 | * light-hinted can have their advance width computed very quickly.
74 | *
75 | * Normal and bytecode hinted modes that require loading, scaling, and
76 | * hinting of the glyph outline, are extremely slow by comparison.
77 | */
78 | #define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L
79 |
80 |
81 | /**************************************************************************
82 | *
83 | * @function:
84 | * FT_Get_Advance
85 | *
86 | * @description:
87 | * Retrieve the advance value of a given glyph outline in an @FT_Face.
88 | *
89 | * @input:
90 | * face ::
91 | * The source @FT_Face handle.
92 | *
93 | * gindex ::
94 | * The glyph index.
95 | *
96 | * load_flags ::
97 | * A set of bit flags similar to those used when calling
98 | * @FT_Load_Glyph, used to determine what kind of advances you need.
99 | * @output:
100 | * padvance ::
101 | * The advance value. If scaling is performed (based on the value of
102 | * `load_flags`), the advance value is in 16.16 format. Otherwise, it
103 | * is in font units.
104 | *
105 | * If @FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance
106 | * corresponding to a vertical layout. Otherwise, it is the horizontal
107 | * advance in a horizontal layout.
108 | *
109 | * @return:
110 | * FreeType error code. 0 means success.
111 | *
112 | * @note:
113 | * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
114 | * the corresponding font backend doesn't have a quick way to retrieve
115 | * the advances.
116 | *
117 | * A scaled advance is returned in 16.16 format but isn't transformed by
118 | * the affine transformation specified by @FT_Set_Transform.
119 | */
120 | FT_EXPORT( FT_Error )
121 | FT_Get_Advance( FT_Face face,
122 | FT_UInt gindex,
123 | FT_Int32 load_flags,
124 | FT_Fixed *padvance );
125 |
126 |
127 | /**************************************************************************
128 | *
129 | * @function:
130 | * FT_Get_Advances
131 | *
132 | * @description:
133 | * Retrieve the advance values of several glyph outlines in an @FT_Face.
134 | *
135 | * @input:
136 | * face ::
137 | * The source @FT_Face handle.
138 | *
139 | * start ::
140 | * The first glyph index.
141 | *
142 | * count ::
143 | * The number of advance values you want to retrieve.
144 | *
145 | * load_flags ::
146 | * A set of bit flags similar to those used when calling
147 | * @FT_Load_Glyph.
148 | *
149 | * @output:
150 | * padvance ::
151 | * The advance values. This array, to be provided by the caller, must
152 | * contain at least `count` elements.
153 | *
154 | * If scaling is performed (based on the value of `load_flags`), the
155 | * advance values are in 16.16 format. Otherwise, they are in font
156 | * units.
157 | *
158 | * If @FT_LOAD_VERTICAL_LAYOUT is set, these are the vertical advances
159 | * corresponding to a vertical layout. Otherwise, they are the
160 | * horizontal advances in a horizontal layout.
161 | *
162 | * @return:
163 | * FreeType error code. 0 means success.
164 | *
165 | * @note:
166 | * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
167 | * the corresponding font backend doesn't have a quick way to retrieve
168 | * the advances.
169 | *
170 | * Scaled advances are returned in 16.16 format but aren't transformed by
171 | * the affine transformation specified by @FT_Set_Transform.
172 | */
173 | FT_EXPORT( FT_Error )
174 | FT_Get_Advances( FT_Face face,
175 | FT_UInt start,
176 | FT_UInt count,
177 | FT_Int32 load_flags,
178 | FT_Fixed *padvances );
179 |
180 | /* */
181 |
182 |
183 | FT_END_HEADER
184 |
185 | #endif /* FTADVANC_H_ */
186 |
187 |
188 | /* END */
189 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftbbox.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftbbox.h
4 | *
5 | * FreeType exact bbox computation (specification).
6 | *
7 | * Copyright (C) 1996-2019 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 component has a _single_ role: to compute exact outline bounding
22 | * boxes.
23 | *
24 | * It is separated from the rest of the engine for various technical
25 | * reasons. It may well be integrated in 'ftoutln' later.
26 | *
27 | */
28 |
29 |
30 | #ifndef FTBBOX_H_
31 | #define FTBBOX_H_
32 |
33 |
34 | #include
35 | #include FT_FREETYPE_H
36 |
37 | #ifdef FREETYPE_H
38 | #error "freetype.h of FreeType 1 has been loaded!"
39 | #error "Please fix the directory search order for header files"
40 | #error "so that freetype.h of FreeType 2 is found first."
41 | #endif
42 |
43 |
44 | FT_BEGIN_HEADER
45 |
46 |
47 | /**************************************************************************
48 | *
49 | * @section:
50 | * outline_processing
51 | *
52 | */
53 |
54 |
55 | /**************************************************************************
56 | *
57 | * @function:
58 | * FT_Outline_Get_BBox
59 | *
60 | * @description:
61 | * Compute the exact bounding box of an outline. This is slower than
62 | * computing the control box. However, it uses an advanced algorithm
63 | * that returns _very_ quickly when the two boxes coincide. Otherwise,
64 | * the outline Bezier arcs are traversed to extract their extrema.
65 | *
66 | * @input:
67 | * outline ::
68 | * A pointer to the source outline.
69 | *
70 | * @output:
71 | * abbox ::
72 | * The outline's exact bounding box.
73 | *
74 | * @return:
75 | * FreeType error code. 0~means success.
76 | *
77 | * @note:
78 | * If the font is tricky and the glyph has been loaded with
79 | * @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get
80 | * reasonable values for the BBox it is necessary to load the glyph at a
81 | * large ppem value (so that the hinting instructions can properly shift
82 | * and scale the subglyphs), then extracting the BBox, which can be
83 | * eventually converted back to font units.
84 | */
85 | FT_EXPORT( FT_Error )
86 | FT_Outline_Get_BBox( FT_Outline* outline,
87 | FT_BBox *abbox );
88 |
89 | /* */
90 |
91 |
92 | FT_END_HEADER
93 |
94 | #endif /* FTBBOX_H_ */
95 |
96 |
97 | /* END */
98 |
99 |
100 | /* Local Variables: */
101 | /* coding: utf-8 */
102 | /* End: */
103 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftbzip2.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftbzip2.h
4 | *
5 | * Bzip2-compressed stream support.
6 | *
7 | * Copyright (C) 2010-2019 by
8 | * Joel Klinghed.
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 FTBZIP2_H_
20 | #define FTBZIP2_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 | /**************************************************************************
35 | *
36 | * @section:
37 | * bzip2
38 | *
39 | * @title:
40 | * BZIP2 Streams
41 | *
42 | * @abstract:
43 | * Using bzip2-compressed font files.
44 | *
45 | * @description:
46 | * This section contains the declaration of Bzip2-specific functions.
47 | *
48 | */
49 |
50 |
51 | /**************************************************************************
52 | *
53 | * @function:
54 | * FT_Stream_OpenBzip2
55 | *
56 | * @description:
57 | * Open a new stream to parse bzip2-compressed font files. This is
58 | * mainly used to support the compressed `*.pcf.bz2` fonts that come with
59 | * XFree86.
60 | *
61 | * @input:
62 | * stream ::
63 | * The target embedding stream.
64 | *
65 | * source ::
66 | * The source stream.
67 | *
68 | * @return:
69 | * FreeType error code. 0~means success.
70 | *
71 | * @note:
72 | * The source stream must be opened _before_ calling this function.
73 | *
74 | * Calling the internal function `FT_Stream_Close` on the new stream will
75 | * **not** call `FT_Stream_Close` on the source stream. None of the
76 | * stream objects will be released to the heap.
77 | *
78 | * The stream implementation is very basic and resets the decompression
79 | * process each time seeking backwards is needed within the stream.
80 | *
81 | * In certain builds of the library, bzip2 compression recognition is
82 | * automatically handled when calling @FT_New_Face or @FT_Open_Face.
83 | * This means that if no font driver is capable of handling the raw
84 | * compressed file, the library will try to open a bzip2 compressed
85 | * stream from it and re-open the face with it.
86 | *
87 | * This function may return `FT_Err_Unimplemented_Feature` if your build
88 | * of FreeType was not compiled with bzip2 support.
89 | */
90 | FT_EXPORT( FT_Error )
91 | FT_Stream_OpenBzip2( FT_Stream stream,
92 | FT_Stream source );
93 |
94 | /* */
95 |
96 |
97 | FT_END_HEADER
98 |
99 | #endif /* FTBZIP2_H_ */
100 |
101 |
102 | /* END */
103 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftchapters.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * This file defines the structure of the FreeType reference.
4 | * It is used by the python script that generates the HTML files.
5 | *
6 | */
7 |
8 |
9 | /**************************************************************************
10 | *
11 | * @chapter:
12 | * general_remarks
13 | *
14 | * @title:
15 | * General Remarks
16 | *
17 | * @sections:
18 | * header_inclusion
19 | * user_allocation
20 | *
21 | */
22 |
23 |
24 | /**************************************************************************
25 | *
26 | * @chapter:
27 | * core_api
28 | *
29 | * @title:
30 | * Core API
31 | *
32 | * @sections:
33 | * version
34 | * basic_types
35 | * base_interface
36 | * glyph_variants
37 | * color_management
38 | * layer_management
39 | * glyph_management
40 | * mac_specific
41 | * sizes_management
42 | * header_file_macros
43 | *
44 | */
45 |
46 |
47 | /**************************************************************************
48 | *
49 | * @chapter:
50 | * format_specific
51 | *
52 | * @title:
53 | * Format-Specific API
54 | *
55 | * @sections:
56 | * multiple_masters
57 | * truetype_tables
58 | * type1_tables
59 | * sfnt_names
60 | * bdf_fonts
61 | * cid_fonts
62 | * pfr_fonts
63 | * winfnt_fonts
64 | * font_formats
65 | * gasp_table
66 | *
67 | */
68 |
69 |
70 | /**************************************************************************
71 | *
72 | * @chapter:
73 | * module_specific
74 | *
75 | * @title:
76 | * Controlling FreeType Modules
77 | *
78 | * @sections:
79 | * auto_hinter
80 | * cff_driver
81 | * t1_cid_driver
82 | * tt_driver
83 | * pcf_driver
84 | * properties
85 | * parameter_tags
86 | * lcd_rendering
87 | *
88 | */
89 |
90 |
91 | /**************************************************************************
92 | *
93 | * @chapter:
94 | * cache_subsystem
95 | *
96 | * @title:
97 | * Cache Sub-System
98 | *
99 | * @sections:
100 | * cache_subsystem
101 | *
102 | */
103 |
104 |
105 | /**************************************************************************
106 | *
107 | * @chapter:
108 | * support_api
109 | *
110 | * @title:
111 | * Support API
112 | *
113 | * @sections:
114 | * computations
115 | * list_processing
116 | * outline_processing
117 | * quick_advance
118 | * bitmap_handling
119 | * raster
120 | * glyph_stroker
121 | * system_interface
122 | * module_management
123 | * gzip
124 | * lzw
125 | * bzip2
126 | *
127 | */
128 |
129 |
130 | /**************************************************************************
131 | *
132 | * @chapter:
133 | * error_codes
134 | *
135 | * @title:
136 | * Error Codes
137 | *
138 | * @sections:
139 | * error_enumerations
140 | * error_code_values
141 | *
142 | */
143 |
144 |
145 | /* END */
146 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftcid.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftcid.h
4 | *
5 | * FreeType API for accessing CID font information (specification).
6 | *
7 | * Copyright (C) 2007-2019 by
8 | * Dereg Clegg and Michael Toftdal.
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 FTCID_H_
20 | #define FTCID_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 |
35 | /**************************************************************************
36 | *
37 | * @section:
38 | * cid_fonts
39 | *
40 | * @title:
41 | * CID Fonts
42 | *
43 | * @abstract:
44 | * CID-keyed font-specific API.
45 | *
46 | * @description:
47 | * This section contains the declaration of CID-keyed font-specific
48 | * functions.
49 | *
50 | */
51 |
52 |
53 | /**************************************************************************
54 | *
55 | * @function:
56 | * FT_Get_CID_Registry_Ordering_Supplement
57 | *
58 | * @description:
59 | * Retrieve the Registry/Ordering/Supplement triple (also known as the
60 | * "R/O/S") from a CID-keyed font.
61 | *
62 | * @input:
63 | * face ::
64 | * A handle to the input face.
65 | *
66 | * @output:
67 | * registry ::
68 | * The registry, as a C~string, owned by the face.
69 | *
70 | * ordering ::
71 | * The ordering, as a C~string, owned by the face.
72 | *
73 | * supplement ::
74 | * The supplement.
75 | *
76 | * @return:
77 | * FreeType error code. 0~means success.
78 | *
79 | * @note:
80 | * This function only works with CID faces, returning an error
81 | * otherwise.
82 | *
83 | * @since:
84 | * 2.3.6
85 | */
86 | FT_EXPORT( FT_Error )
87 | FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
88 | const char* *registry,
89 | const char* *ordering,
90 | FT_Int *supplement );
91 |
92 |
93 | /**************************************************************************
94 | *
95 | * @function:
96 | * FT_Get_CID_Is_Internally_CID_Keyed
97 | *
98 | * @description:
99 | * Retrieve the type of the input face, CID keyed or not. In contrast
100 | * to the @FT_IS_CID_KEYED macro this function returns successfully also
101 | * for CID-keyed fonts in an SFNT wrapper.
102 | *
103 | * @input:
104 | * face ::
105 | * A handle to the input face.
106 | *
107 | * @output:
108 | * is_cid ::
109 | * The type of the face as an @FT_Bool.
110 | *
111 | * @return:
112 | * FreeType error code. 0~means success.
113 | *
114 | * @note:
115 | * This function only works with CID faces and OpenType fonts, returning
116 | * an error otherwise.
117 | *
118 | * @since:
119 | * 2.3.9
120 | */
121 | FT_EXPORT( FT_Error )
122 | FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
123 | FT_Bool *is_cid );
124 |
125 |
126 | /**************************************************************************
127 | *
128 | * @function:
129 | * FT_Get_CID_From_Glyph_Index
130 | *
131 | * @description:
132 | * Retrieve the CID of the input glyph index.
133 | *
134 | * @input:
135 | * face ::
136 | * A handle to the input face.
137 | *
138 | * glyph_index ::
139 | * The input glyph index.
140 | *
141 | * @output:
142 | * cid ::
143 | * The CID as an @FT_UInt.
144 | *
145 | * @return:
146 | * FreeType error code. 0~means success.
147 | *
148 | * @note:
149 | * This function only works with CID faces and OpenType fonts, returning
150 | * an error otherwise.
151 | *
152 | * @since:
153 | * 2.3.9
154 | */
155 | FT_EXPORT( FT_Error )
156 | FT_Get_CID_From_Glyph_Index( FT_Face face,
157 | FT_UInt glyph_index,
158 | FT_UInt *cid );
159 |
160 | /* */
161 |
162 |
163 | FT_END_HEADER
164 |
165 | #endif /* FTCID_H_ */
166 |
167 |
168 | /* END */
169 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftfntfmt.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftfntfmt.h
4 | *
5 | * Support functions for font formats.
6 | *
7 | * Copyright (C) 2002-2019 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 FTFNTFMT_H_
20 | #define FTFNTFMT_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 |
35 | /**************************************************************************
36 | *
37 | * @section:
38 | * font_formats
39 | *
40 | * @title:
41 | * Font Formats
42 | *
43 | * @abstract:
44 | * Getting the font format.
45 | *
46 | * @description:
47 | * The single function in this section can be used to get the font format.
48 | * Note that this information is not needed normally; however, there are
49 | * special cases (like in PDF devices) where it is important to
50 | * differentiate, in spite of FreeType's uniform API.
51 | *
52 | */
53 |
54 |
55 | /**************************************************************************
56 | *
57 | * @function:
58 | * FT_Get_Font_Format
59 | *
60 | * @description:
61 | * Return a string describing the format of a given face. Possible values
62 | * are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF',
63 | * 'PFR', and 'Windows~FNT'.
64 | *
65 | * The return value is suitable to be used as an X11 FONT_PROPERTY.
66 | *
67 | * @input:
68 | * face ::
69 | * Input face handle.
70 | *
71 | * @return:
72 | * Font format string. `NULL` in case of error.
73 | *
74 | * @note:
75 | * A deprecated name for the same function is `FT_Get_X11_Font_Format`.
76 | */
77 | FT_EXPORT( const char* )
78 | FT_Get_Font_Format( FT_Face face );
79 |
80 |
81 | /* deprecated */
82 | FT_EXPORT( const char* )
83 | FT_Get_X11_Font_Format( FT_Face face );
84 |
85 |
86 | /* */
87 |
88 |
89 | FT_END_HEADER
90 |
91 | #endif /* FTFNTFMT_H_ */
92 |
93 |
94 | /* END */
95 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftgasp.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftgasp.h
4 | *
5 | * Access of TrueType's 'gasp' table (specification).
6 | *
7 | * Copyright (C) 2007-2019 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 FTGASP_H_
20 | #define FTGASP_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 |
35 | /**************************************************************************
36 | *
37 | * @section:
38 | * gasp_table
39 | *
40 | * @title:
41 | * Gasp Table
42 | *
43 | * @abstract:
44 | * Retrieving TrueType 'gasp' table entries.
45 | *
46 | * @description:
47 | * The function @FT_Get_Gasp can be used to query a TrueType or OpenType
48 | * font for specific entries in its 'gasp' table, if any. This is mainly
49 | * useful when implementing native TrueType hinting with the bytecode
50 | * interpreter to duplicate the Windows text rendering results.
51 | */
52 |
53 | /**************************************************************************
54 | *
55 | * @enum:
56 | * FT_GASP_XXX
57 | *
58 | * @description:
59 | * A list of values and/or bit-flags returned by the @FT_Get_Gasp
60 | * function.
61 | *
62 | * @values:
63 | * FT_GASP_NO_TABLE ::
64 | * This special value means that there is no GASP table in this face.
65 | * It is up to the client to decide what to do.
66 | *
67 | * FT_GASP_DO_GRIDFIT ::
68 | * Grid-fitting and hinting should be performed at the specified ppem.
69 | * This **really** means TrueType bytecode interpretation. If this bit
70 | * is not set, no hinting gets applied.
71 | *
72 | * FT_GASP_DO_GRAY ::
73 | * Anti-aliased rendering should be performed at the specified ppem.
74 | * If not set, do monochrome rendering.
75 | *
76 | * FT_GASP_SYMMETRIC_SMOOTHING ::
77 | * If set, smoothing along multiple axes must be used with ClearType.
78 | *
79 | * FT_GASP_SYMMETRIC_GRIDFIT ::
80 | * Grid-fitting must be used with ClearType's symmetric smoothing.
81 | *
82 | * @note:
83 | * The bit-flags `FT_GASP_DO_GRIDFIT` and `FT_GASP_DO_GRAY` are to be
84 | * used for standard font rasterization only. Independently of that,
85 | * `FT_GASP_SYMMETRIC_SMOOTHING` and `FT_GASP_SYMMETRIC_GRIDFIT` are to
86 | * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT` and
87 | * `FT_GASP_DO_GRAY` are consequently ignored).
88 | *
89 | * 'ClearType' is Microsoft's implementation of LCD rendering, partly
90 | * protected by patents.
91 | *
92 | * @since:
93 | * 2.3.0
94 | */
95 | #define FT_GASP_NO_TABLE -1
96 | #define FT_GASP_DO_GRIDFIT 0x01
97 | #define FT_GASP_DO_GRAY 0x02
98 | #define FT_GASP_SYMMETRIC_GRIDFIT 0x04
99 | #define FT_GASP_SYMMETRIC_SMOOTHING 0x08
100 |
101 |
102 | /**************************************************************************
103 | *
104 | * @function:
105 | * FT_Get_Gasp
106 | *
107 | * @description:
108 | * For a TrueType or OpenType font file, return the rasterizer behaviour
109 | * flags from the font's 'gasp' table corresponding to a given character
110 | * pixel size.
111 | *
112 | * @input:
113 | * face ::
114 | * The source face handle.
115 | *
116 | * ppem ::
117 | * The vertical character pixel size.
118 | *
119 | * @return:
120 | * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
121 | * 'gasp' table in the face.
122 | *
123 | * @note:
124 | * If you want to use the MM functionality of OpenType variation fonts
125 | * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
126 | * function **after** setting an instance since the return values can
127 | * change.
128 | *
129 | * @since:
130 | * 2.3.0
131 | */
132 | FT_EXPORT( FT_Int )
133 | FT_Get_Gasp( FT_Face face,
134 | FT_UInt ppem );
135 |
136 | /* */
137 |
138 |
139 | FT_END_HEADER
140 |
141 | #endif /* FTGASP_H_ */
142 |
143 |
144 | /* END */
145 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftgzip.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftgzip.h
4 | *
5 | * Gzip-compressed stream support.
6 | *
7 | * Copyright (C) 2002-2019 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 FTGZIP_H_
20 | #define FTGZIP_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 | /**************************************************************************
35 | *
36 | * @section:
37 | * gzip
38 | *
39 | * @title:
40 | * GZIP Streams
41 | *
42 | * @abstract:
43 | * Using gzip-compressed font files.
44 | *
45 | * @description:
46 | * This section contains the declaration of Gzip-specific functions.
47 | *
48 | */
49 |
50 |
51 | /**************************************************************************
52 | *
53 | * @function:
54 | * FT_Stream_OpenGzip
55 | *
56 | * @description:
57 | * Open a new stream to parse gzip-compressed font files. This is mainly
58 | * used to support the compressed `*.pcf.gz` fonts that come with
59 | * XFree86.
60 | *
61 | * @input:
62 | * stream ::
63 | * The target embedding stream.
64 | *
65 | * source ::
66 | * The source stream.
67 | *
68 | * @return:
69 | * FreeType error code. 0~means success.
70 | *
71 | * @note:
72 | * The source stream must be opened _before_ calling this function.
73 | *
74 | * Calling the internal function `FT_Stream_Close` on the new stream will
75 | * **not** call `FT_Stream_Close` on the source stream. None of the
76 | * stream objects will be released to the heap.
77 | *
78 | * The stream implementation is very basic and resets the decompression
79 | * process each time seeking backwards is needed within the stream.
80 | *
81 | * In certain builds of the library, gzip compression recognition is
82 | * automatically handled when calling @FT_New_Face or @FT_Open_Face.
83 | * This means that if no font driver is capable of handling the raw
84 | * compressed file, the library will try to open a gzipped stream from it
85 | * and re-open the face with it.
86 | *
87 | * This function may return `FT_Err_Unimplemented_Feature` if your build
88 | * of FreeType was not compiled with zlib support.
89 | */
90 | FT_EXPORT( FT_Error )
91 | FT_Stream_OpenGzip( FT_Stream stream,
92 | FT_Stream source );
93 |
94 |
95 | /**************************************************************************
96 | *
97 | * @function:
98 | * FT_Gzip_Uncompress
99 | *
100 | * @description:
101 | * Decompress a zipped input buffer into an output buffer. This function
102 | * is modeled after zlib's `uncompress` function.
103 | *
104 | * @input:
105 | * memory ::
106 | * A FreeType memory handle.
107 | *
108 | * input ::
109 | * The input buffer.
110 | *
111 | * input_len ::
112 | * The length of the input buffer.
113 | *
114 | * @output:
115 | * output ::
116 | * The output buffer.
117 | *
118 | * @inout:
119 | * output_len ::
120 | * Before calling the function, this is the total size of the output
121 | * buffer, which must be large enough to hold the entire uncompressed
122 | * data (so the size of the uncompressed data must be known in
123 | * advance). After calling the function, `output_len` is the size of
124 | * the used data in `output`.
125 | *
126 | * @return:
127 | * FreeType error code. 0~means success.
128 | *
129 | * @note:
130 | * This function may return `FT_Err_Unimplemented_Feature` if your build
131 | * of FreeType was not compiled with zlib support.
132 | *
133 | * @since:
134 | * 2.5.1
135 | */
136 | FT_EXPORT( FT_Error )
137 | FT_Gzip_Uncompress( FT_Memory memory,
138 | FT_Byte* output,
139 | FT_ULong* output_len,
140 | const FT_Byte* input,
141 | FT_ULong input_len );
142 |
143 | /* */
144 |
145 |
146 | FT_END_HEADER
147 |
148 | #endif /* FTGZIP_H_ */
149 |
150 |
151 | /* END */
152 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftlzw.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftlzw.h
4 | *
5 | * LZW-compressed stream support.
6 | *
7 | * Copyright (C) 2004-2019 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 FTLZW_H_
20 | #define FTLZW_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 | /**************************************************************************
35 | *
36 | * @section:
37 | * lzw
38 | *
39 | * @title:
40 | * LZW Streams
41 | *
42 | * @abstract:
43 | * Using LZW-compressed font files.
44 | *
45 | * @description:
46 | * This section contains the declaration of LZW-specific functions.
47 | *
48 | */
49 |
50 | /**************************************************************************
51 | *
52 | * @function:
53 | * FT_Stream_OpenLZW
54 | *
55 | * @description:
56 | * Open a new stream to parse LZW-compressed font files. This is mainly
57 | * used to support the compressed `*.pcf.Z` fonts that come with XFree86.
58 | *
59 | * @input:
60 | * stream ::
61 | * The target embedding stream.
62 | *
63 | * source ::
64 | * The source stream.
65 | *
66 | * @return:
67 | * FreeType error code. 0~means success.
68 | *
69 | * @note:
70 | * The source stream must be opened _before_ calling this function.
71 | *
72 | * Calling the internal function `FT_Stream_Close` on the new stream will
73 | * **not** call `FT_Stream_Close` on the source stream. None of the
74 | * stream objects will be released to the heap.
75 | *
76 | * The stream implementation is very basic and resets the decompression
77 | * process each time seeking backwards is needed within the stream
78 | *
79 | * In certain builds of the library, LZW compression recognition is
80 | * automatically handled when calling @FT_New_Face or @FT_Open_Face.
81 | * This means that if no font driver is capable of handling the raw
82 | * compressed file, the library will try to open a LZW stream from it and
83 | * re-open the face with it.
84 | *
85 | * This function may return `FT_Err_Unimplemented_Feature` if your build
86 | * of FreeType was not compiled with LZW support.
87 | */
88 | FT_EXPORT( FT_Error )
89 | FT_Stream_OpenLZW( FT_Stream stream,
90 | FT_Stream source );
91 |
92 | /* */
93 |
94 |
95 | FT_END_HEADER
96 |
97 | #endif /* FTLZW_H_ */
98 |
99 |
100 | /* END */
101 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftotval.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftotval.h
4 | *
5 | * FreeType API for validating OpenType tables (specification).
6 | *
7 | * Copyright (C) 2004-2019 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 | *
22 | * Warning: This module might be moved to a different library in the
23 | * future to avoid a tight dependency between FreeType and the
24 | * OpenType specification.
25 | *
26 | *
27 | */
28 |
29 |
30 | #ifndef FTOTVAL_H_
31 | #define FTOTVAL_H_
32 |
33 | #include
34 | #include FT_FREETYPE_H
35 |
36 | #ifdef FREETYPE_H
37 | #error "freetype.h of FreeType 1 has been loaded!"
38 | #error "Please fix the directory search order for header files"
39 | #error "so that freetype.h of FreeType 2 is found first."
40 | #endif
41 |
42 |
43 | FT_BEGIN_HEADER
44 |
45 |
46 | /**************************************************************************
47 | *
48 | * @section:
49 | * ot_validation
50 | *
51 | * @title:
52 | * OpenType Validation
53 | *
54 | * @abstract:
55 | * An API to validate OpenType tables.
56 | *
57 | * @description:
58 | * This section contains the declaration of functions to validate some
59 | * OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
60 | *
61 | * @order:
62 | * FT_OpenType_Validate
63 | * FT_OpenType_Free
64 | *
65 | * FT_VALIDATE_OTXXX
66 | *
67 | */
68 |
69 |
70 | /**************************************************************************
71 | *
72 | * @enum:
73 | * FT_VALIDATE_OTXXX
74 | *
75 | * @description:
76 | * A list of bit-field constants used with @FT_OpenType_Validate to
77 | * indicate which OpenType tables should be validated.
78 | *
79 | * @values:
80 | * FT_VALIDATE_BASE ::
81 | * Validate BASE table.
82 | *
83 | * FT_VALIDATE_GDEF ::
84 | * Validate GDEF table.
85 | *
86 | * FT_VALIDATE_GPOS ::
87 | * Validate GPOS table.
88 | *
89 | * FT_VALIDATE_GSUB ::
90 | * Validate GSUB table.
91 | *
92 | * FT_VALIDATE_JSTF ::
93 | * Validate JSTF table.
94 | *
95 | * FT_VALIDATE_MATH ::
96 | * Validate MATH table.
97 | *
98 | * FT_VALIDATE_OT ::
99 | * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
100 | *
101 | */
102 | #define FT_VALIDATE_BASE 0x0100
103 | #define FT_VALIDATE_GDEF 0x0200
104 | #define FT_VALIDATE_GPOS 0x0400
105 | #define FT_VALIDATE_GSUB 0x0800
106 | #define FT_VALIDATE_JSTF 0x1000
107 | #define FT_VALIDATE_MATH 0x2000
108 |
109 | #define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \
110 | FT_VALIDATE_GDEF | \
111 | FT_VALIDATE_GPOS | \
112 | FT_VALIDATE_GSUB | \
113 | FT_VALIDATE_JSTF | \
114 | FT_VALIDATE_MATH )
115 |
116 |
117 | /**************************************************************************
118 | *
119 | * @function:
120 | * FT_OpenType_Validate
121 | *
122 | * @description:
123 | * Validate various OpenType tables to assure that all offsets and
124 | * indices are valid. The idea is that a higher-level library that
125 | * actually does the text layout can access those tables without error
126 | * checking (which can be quite time consuming).
127 | *
128 | * @input:
129 | * face ::
130 | * A handle to the input face.
131 | *
132 | * validation_flags ::
133 | * A bit field that specifies the tables to be validated. See
134 | * @FT_VALIDATE_OTXXX for possible values.
135 | *
136 | * @output:
137 | * BASE_table ::
138 | * A pointer to the BASE table.
139 | *
140 | * GDEF_table ::
141 | * A pointer to the GDEF table.
142 | *
143 | * GPOS_table ::
144 | * A pointer to the GPOS table.
145 | *
146 | * GSUB_table ::
147 | * A pointer to the GSUB table.
148 | *
149 | * JSTF_table ::
150 | * A pointer to the JSTF table.
151 | *
152 | * @return:
153 | * FreeType error code. 0~means success.
154 | *
155 | * @note:
156 | * This function only works with OpenType fonts, returning an error
157 | * otherwise.
158 | *
159 | * After use, the application should deallocate the five tables with
160 | * @FT_OpenType_Free. A `NULL` value indicates that the table either
161 | * doesn't exist in the font, or the application hasn't asked for
162 | * validation.
163 | */
164 | FT_EXPORT( FT_Error )
165 | FT_OpenType_Validate( FT_Face face,
166 | FT_UInt validation_flags,
167 | FT_Bytes *BASE_table,
168 | FT_Bytes *GDEF_table,
169 | FT_Bytes *GPOS_table,
170 | FT_Bytes *GSUB_table,
171 | FT_Bytes *JSTF_table );
172 |
173 |
174 | /**************************************************************************
175 | *
176 | * @function:
177 | * FT_OpenType_Free
178 | *
179 | * @description:
180 | * Free the buffer allocated by OpenType validator.
181 | *
182 | * @input:
183 | * face ::
184 | * A handle to the input face.
185 | *
186 | * table ::
187 | * The pointer to the buffer that is allocated by
188 | * @FT_OpenType_Validate.
189 | *
190 | * @note:
191 | * This function must be used to free the buffer allocated by
192 | * @FT_OpenType_Validate only.
193 | */
194 | FT_EXPORT( void )
195 | FT_OpenType_Free( FT_Face face,
196 | FT_Bytes table );
197 |
198 |
199 | /* */
200 |
201 |
202 | FT_END_HEADER
203 |
204 | #endif /* FTOTVAL_H_ */
205 |
206 |
207 | /* END */
208 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftpfr.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftpfr.h
4 | *
5 | * FreeType API for accessing PFR-specific data (specification only).
6 | *
7 | * Copyright (C) 2002-2019 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 FTPFR_H_
20 | #define FTPFR_H_
21 |
22 | #include
23 | #include FT_FREETYPE_H
24 |
25 | #ifdef FREETYPE_H
26 | #error "freetype.h of FreeType 1 has been loaded!"
27 | #error "Please fix the directory search order for header files"
28 | #error "so that freetype.h of FreeType 2 is found first."
29 | #endif
30 |
31 |
32 | FT_BEGIN_HEADER
33 |
34 |
35 | /**************************************************************************
36 | *
37 | * @section:
38 | * pfr_fonts
39 | *
40 | * @title:
41 | * PFR Fonts
42 | *
43 | * @abstract:
44 | * PFR/TrueDoc-specific API.
45 | *
46 | * @description:
47 | * This section contains the declaration of PFR-specific functions.
48 | *
49 | */
50 |
51 |
52 | /**************************************************************************
53 | *
54 | * @function:
55 | * FT_Get_PFR_Metrics
56 | *
57 | * @description:
58 | * Return the outline and metrics resolutions of a given PFR face.
59 | *
60 | * @input:
61 | * face ::
62 | * Handle to the input face. It can be a non-PFR face.
63 | *
64 | * @output:
65 | * aoutline_resolution ::
66 | * Outline resolution. This is equivalent to `face->units_per_EM` for
67 | * non-PFR fonts. Optional (parameter can be `NULL`).
68 | *
69 | * ametrics_resolution ::
70 | * Metrics resolution. This is equivalent to `outline_resolution` for
71 | * non-PFR fonts. Optional (parameter can be `NULL`).
72 | *
73 | * ametrics_x_scale ::
74 | * A 16.16 fixed-point number used to scale distance expressed in
75 | * metrics units to device subpixels. This is equivalent to
76 | * `face->size->x_scale`, but for metrics only. Optional (parameter
77 | * can be `NULL`).
78 | *
79 | * ametrics_y_scale ::
80 | * Same as `ametrics_x_scale` but for the vertical direction.
81 | * optional (parameter can be `NULL`).
82 | *
83 | * @return:
84 | * FreeType error code. 0~means success.
85 | *
86 | * @note:
87 | * If the input face is not a PFR, this function will return an error.
88 | * However, in all cases, it will return valid values.
89 | */
90 | FT_EXPORT( FT_Error )
91 | FT_Get_PFR_Metrics( FT_Face face,
92 | FT_UInt *aoutline_resolution,
93 | FT_UInt *ametrics_resolution,
94 | FT_Fixed *ametrics_x_scale,
95 | FT_Fixed *ametrics_y_scale );
96 |
97 |
98 | /**************************************************************************
99 | *
100 | * @function:
101 | * FT_Get_PFR_Kerning
102 | *
103 | * @description:
104 | * Return the kerning pair corresponding to two glyphs in a PFR face.
105 | * The distance is expressed in metrics units, unlike the result of
106 | * @FT_Get_Kerning.
107 | *
108 | * @input:
109 | * face ::
110 | * A handle to the input face.
111 | *
112 | * left ::
113 | * Index of the left glyph.
114 | *
115 | * right ::
116 | * Index of the right glyph.
117 | *
118 | * @output:
119 | * avector ::
120 | * A kerning vector.
121 | *
122 | * @return:
123 | * FreeType error code. 0~means success.
124 | *
125 | * @note:
126 | * This function always return distances in original PFR metrics units.
127 | * This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode,
128 | * which always returns distances converted to outline units.
129 | *
130 | * You can use the value of the `x_scale` and `y_scale` parameters
131 | * returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
132 | */
133 | FT_EXPORT( FT_Error )
134 | FT_Get_PFR_Kerning( FT_Face face,
135 | FT_UInt left,
136 | FT_UInt right,
137 | FT_Vector *avector );
138 |
139 |
140 | /**************************************************************************
141 | *
142 | * @function:
143 | * FT_Get_PFR_Advance
144 | *
145 | * @description:
146 | * Return a given glyph advance, expressed in original metrics units,
147 | * from a PFR font.
148 | *
149 | * @input:
150 | * face ::
151 | * A handle to the input face.
152 | *
153 | * gindex ::
154 | * The glyph index.
155 | *
156 | * @output:
157 | * aadvance ::
158 | * The glyph advance in metrics units.
159 | *
160 | * @return:
161 | * FreeType error code. 0~means success.
162 | *
163 | * @note:
164 | * You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics
165 | * to convert the advance to device subpixels (i.e., 1/64th of pixels).
166 | */
167 | FT_EXPORT( FT_Error )
168 | FT_Get_PFR_Advance( FT_Face face,
169 | FT_UInt gindex,
170 | FT_Pos *aadvance );
171 |
172 | /* */
173 |
174 |
175 | FT_END_HEADER
176 |
177 | #endif /* FTPFR_H_ */
178 |
179 |
180 | /* END */
181 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftsizes.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftsizes.h
4 | *
5 | * FreeType size objects management (specification).
6 | *
7 | * Copyright (C) 1996-2019 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 | * Typical application would normally not need to use these functions.
22 | * However, they have been placed in a public API for the rare cases where
23 | * they are needed.
24 | *
25 | */
26 |
27 |
28 | #ifndef FTSIZES_H_
29 | #define FTSIZES_H_
30 |
31 |
32 | #include
33 | #include FT_FREETYPE_H
34 |
35 | #ifdef FREETYPE_H
36 | #error "freetype.h of FreeType 1 has been loaded!"
37 | #error "Please fix the directory search order for header files"
38 | #error "so that freetype.h of FreeType 2 is found first."
39 | #endif
40 |
41 |
42 | FT_BEGIN_HEADER
43 |
44 |
45 | /**************************************************************************
46 | *
47 | * @section:
48 | * sizes_management
49 | *
50 | * @title:
51 | * Size Management
52 | *
53 | * @abstract:
54 | * Managing multiple sizes per face.
55 | *
56 | * @description:
57 | * When creating a new face object (e.g., with @FT_New_Face), an @FT_Size
58 | * object is automatically created and used to store all pixel-size
59 | * dependent information, available in the `face->size` field.
60 | *
61 | * It is however possible to create more sizes for a given face, mostly
62 | * in order to manage several character pixel sizes of the same font
63 | * family and style. See @FT_New_Size and @FT_Done_Size.
64 | *
65 | * Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the
66 | * contents of the current 'active' size; you thus need to use
67 | * @FT_Activate_Size to change it.
68 | *
69 | * 99% of applications won't need the functions provided here, especially
70 | * if they use the caching sub-system, so be cautious when using these.
71 | *
72 | */
73 |
74 |
75 | /**************************************************************************
76 | *
77 | * @function:
78 | * FT_New_Size
79 | *
80 | * @description:
81 | * Create a new size object from a given face object.
82 | *
83 | * @input:
84 | * face ::
85 | * A handle to a parent face object.
86 | *
87 | * @output:
88 | * asize ::
89 | * A handle to a new size object.
90 | *
91 | * @return:
92 | * FreeType error code. 0~means success.
93 | *
94 | * @note:
95 | * You need to call @FT_Activate_Size in order to select the new size for
96 | * upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,
97 | * @FT_Load_Glyph, @FT_Load_Char, etc.
98 | */
99 | FT_EXPORT( FT_Error )
100 | FT_New_Size( FT_Face face,
101 | FT_Size* size );
102 |
103 |
104 | /**************************************************************************
105 | *
106 | * @function:
107 | * FT_Done_Size
108 | *
109 | * @description:
110 | * Discard a given size object. Note that @FT_Done_Face automatically
111 | * discards all size objects allocated with @FT_New_Size.
112 | *
113 | * @input:
114 | * size ::
115 | * A handle to a target size object.
116 | *
117 | * @return:
118 | * FreeType error code. 0~means success.
119 | */
120 | FT_EXPORT( FT_Error )
121 | FT_Done_Size( FT_Size size );
122 |
123 |
124 | /**************************************************************************
125 | *
126 | * @function:
127 | * FT_Activate_Size
128 | *
129 | * @description:
130 | * Even though it is possible to create several size objects for a given
131 | * face (see @FT_New_Size for details), functions like @FT_Load_Glyph or
132 | * @FT_Load_Char only use the one that has been activated last to
133 | * determine the 'current character pixel size'.
134 | *
135 | * This function can be used to 'activate' a previously created size
136 | * object.
137 | *
138 | * @input:
139 | * size ::
140 | * A handle to a target size object.
141 | *
142 | * @return:
143 | * FreeType error code. 0~means success.
144 | *
145 | * @note:
146 | * If `face` is the size's parent face object, this function changes the
147 | * value of `face->size` to the input size handle.
148 | */
149 | FT_EXPORT( FT_Error )
150 | FT_Activate_Size( FT_Size size );
151 |
152 | /* */
153 |
154 |
155 | FT_END_HEADER
156 |
157 | #endif /* FTSIZES_H_ */
158 |
159 |
160 | /* END */
161 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/ftsynth.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftsynth.h
4 | *
5 | * FreeType synthesizing code for emboldening and slanting
6 | * (specification).
7 | *
8 | * Copyright (C) 2000-2019 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 | /*************************************************************************/
23 | /*************************************************************************/
24 | /*************************************************************************/
25 | /********* *********/
26 | /********* WARNING, THIS IS ALPHA CODE! THIS API *********/
27 | /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/
28 | /********* FREETYPE DEVELOPMENT TEAM *********/
29 | /********* *********/
30 | /*************************************************************************/
31 | /*************************************************************************/
32 | /*************************************************************************/
33 | /*************************************************************************/
34 | /*************************************************************************/
35 |
36 |
37 | /* Main reason for not lifting the functions in this module to a */
38 | /* 'standard' API is that the used parameters for emboldening and */
39 | /* slanting are not configurable. Consider the functions as a */
40 | /* code resource that should be copied into the application and */
41 | /* adapted to the particular needs. */
42 |
43 |
44 | #ifndef FTSYNTH_H_
45 | #define FTSYNTH_H_
46 |
47 |
48 | #include
49 | #include FT_FREETYPE_H
50 |
51 | #ifdef FREETYPE_H
52 | #error "freetype.h of FreeType 1 has been loaded!"
53 | #error "Please fix the directory search order for header files"
54 | #error "so that freetype.h of FreeType 2 is found first."
55 | #endif
56 |
57 |
58 | FT_BEGIN_HEADER
59 |
60 | /* Embolden a glyph by a 'reasonable' value (which is highly a matter of */
61 | /* taste). This function is actually a convenience function, providing */
62 | /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
63 | /* */
64 | /* For emboldened outlines the height, width, and advance metrics are */
65 | /* increased by the strength of the emboldening -- this even affects */
66 | /* mono-width fonts! */
67 | /* */
68 | /* You can also call @FT_Outline_Get_CBox to get precise values. */
69 | FT_EXPORT( void )
70 | FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
71 |
72 | /* Slant an outline glyph to the right by about 12 degrees. */
73 | FT_EXPORT( void )
74 | FT_GlyphSlot_Oblique( FT_GlyphSlot slot );
75 |
76 | /* */
77 |
78 |
79 | FT_END_HEADER
80 |
81 | #endif /* FTSYNTH_H_ */
82 |
83 |
84 | /* END */
85 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/cffotypes.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * cffotypes.h
4 | *
5 | * Basic OpenType/CFF object type definitions (specification).
6 | *
7 | * Copyright (C) 2017-2019 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 CFFOTYPES_H_
20 | #define CFFOTYPES_H_
21 |
22 | #include
23 | #include FT_INTERNAL_OBJECTS_H
24 | #include FT_INTERNAL_CFF_TYPES_H
25 | #include FT_INTERNAL_TRUETYPE_TYPES_H
26 | #include FT_SERVICE_POSTSCRIPT_CMAPS_H
27 | #include FT_INTERNAL_POSTSCRIPT_HINTS_H
28 |
29 |
30 | FT_BEGIN_HEADER
31 |
32 |
33 | typedef TT_Face CFF_Face;
34 |
35 |
36 | /**************************************************************************
37 | *
38 | * @type:
39 | * CFF_Size
40 | *
41 | * @description:
42 | * A handle to an OpenType size object.
43 | */
44 | typedef struct CFF_SizeRec_
45 | {
46 | FT_SizeRec root;
47 | FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
48 |
49 | } CFF_SizeRec, *CFF_Size;
50 |
51 |
52 | /**************************************************************************
53 | *
54 | * @type:
55 | * CFF_GlyphSlot
56 | *
57 | * @description:
58 | * A handle to an OpenType glyph slot object.
59 | */
60 | typedef struct CFF_GlyphSlotRec_
61 | {
62 | FT_GlyphSlotRec root;
63 |
64 | FT_Bool hint;
65 | FT_Bool scaled;
66 |
67 | FT_Fixed x_scale;
68 | FT_Fixed y_scale;
69 |
70 | } CFF_GlyphSlotRec, *CFF_GlyphSlot;
71 |
72 |
73 | /**************************************************************************
74 | *
75 | * @type:
76 | * CFF_Internal
77 | *
78 | * @description:
79 | * The interface to the 'internal' field of `FT_Size`.
80 | */
81 | typedef struct CFF_InternalRec_
82 | {
83 | PSH_Globals topfont;
84 | PSH_Globals subfonts[CFF_MAX_CID_FONTS];
85 |
86 | } CFF_InternalRec, *CFF_Internal;
87 |
88 |
89 | /**************************************************************************
90 | *
91 | * Subglyph transformation record.
92 | */
93 | typedef struct CFF_Transform_
94 | {
95 | FT_Fixed xx, xy; /* transformation matrix coefficients */
96 | FT_Fixed yx, yy;
97 | FT_F26Dot6 ox, oy; /* offsets */
98 |
99 | } CFF_Transform;
100 |
101 |
102 | FT_END_HEADER
103 |
104 |
105 | #endif /* CFFOTYPES_H_ */
106 |
107 |
108 | /* END */
109 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/ftgloadr.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftgloadr.h
4 | *
5 | * The FreeType glyph loader (specification).
6 | *
7 | * Copyright (C) 2002-2019 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 FTGLOADR_H_
20 | #define FTGLOADR_H_
21 |
22 |
23 | #include
24 | #include FT_FREETYPE_H
25 |
26 |
27 | FT_BEGIN_HEADER
28 |
29 |
30 | /**************************************************************************
31 | *
32 | * @struct:
33 | * FT_GlyphLoader
34 | *
35 | * @description:
36 | * The glyph loader is an internal object used to load several glyphs
37 | * together (for example, in the case of composites).
38 | */
39 | typedef struct FT_SubGlyphRec_
40 | {
41 | FT_Int index;
42 | FT_UShort flags;
43 | FT_Int arg1;
44 | FT_Int arg2;
45 | FT_Matrix transform;
46 |
47 | } FT_SubGlyphRec;
48 |
49 |
50 | typedef struct FT_GlyphLoadRec_
51 | {
52 | FT_Outline outline; /* outline */
53 | FT_Vector* extra_points; /* extra points table */
54 | FT_Vector* extra_points2; /* second extra points table */
55 | FT_UInt num_subglyphs; /* number of subglyphs */
56 | FT_SubGlyph subglyphs; /* subglyphs */
57 |
58 | } FT_GlyphLoadRec, *FT_GlyphLoad;
59 |
60 |
61 | typedef struct FT_GlyphLoaderRec_
62 | {
63 | FT_Memory memory;
64 | FT_UInt max_points;
65 | FT_UInt max_contours;
66 | FT_UInt max_subglyphs;
67 | FT_Bool use_extra;
68 |
69 | FT_GlyphLoadRec base;
70 | FT_GlyphLoadRec current;
71 |
72 | void* other; /* for possible future extension? */
73 |
74 | } FT_GlyphLoaderRec, *FT_GlyphLoader;
75 |
76 |
77 | /* create new empty glyph loader */
78 | FT_BASE( FT_Error )
79 | FT_GlyphLoader_New( FT_Memory memory,
80 | FT_GlyphLoader *aloader );
81 |
82 | /* add an extra points table to a glyph loader */
83 | FT_BASE( FT_Error )
84 | FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
85 |
86 | /* destroy a glyph loader */
87 | FT_BASE( void )
88 | FT_GlyphLoader_Done( FT_GlyphLoader loader );
89 |
90 | /* reset a glyph loader (frees everything int it) */
91 | FT_BASE( void )
92 | FT_GlyphLoader_Reset( FT_GlyphLoader loader );
93 |
94 | /* rewind a glyph loader */
95 | FT_BASE( void )
96 | FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
97 |
98 | /* check that there is enough space to add `n_points' and `n_contours' */
99 | /* to the glyph loader */
100 | FT_BASE( FT_Error )
101 | FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
102 | FT_UInt n_points,
103 | FT_UInt n_contours );
104 |
105 |
106 | #define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
107 | ( (_count) == 0 || \
108 | ( (FT_UInt)(_loader)->base.outline.n_points + \
109 | (FT_UInt)(_loader)->current.outline.n_points + \
110 | (FT_UInt)(_count) ) <= (_loader)->max_points )
111 |
112 | #define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
113 | ( (_count) == 0 || \
114 | ( (FT_UInt)(_loader)->base.outline.n_contours + \
115 | (FT_UInt)(_loader)->current.outline.n_contours + \
116 | (FT_UInt)(_count) ) <= (_loader)->max_contours )
117 |
118 | #define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
119 | ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
120 | FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
121 | ? 0 \
122 | : FT_GlyphLoader_CheckPoints( (_loader), \
123 | (FT_UInt)(_points), \
124 | (FT_UInt)(_contours) ) )
125 |
126 |
127 | /* check that there is enough space to add `n_subs' sub-glyphs to */
128 | /* a glyph loader */
129 | FT_BASE( FT_Error )
130 | FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
131 | FT_UInt n_subs );
132 |
133 | /* prepare a glyph loader, i.e. empty the current glyph */
134 | FT_BASE( void )
135 | FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
136 |
137 | /* add the current glyph to the base glyph */
138 | FT_BASE( void )
139 | FT_GlyphLoader_Add( FT_GlyphLoader loader );
140 |
141 | /* */
142 |
143 |
144 | FT_END_HEADER
145 |
146 | #endif /* FTGLOADR_H_ */
147 |
148 |
149 | /* END */
150 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/fthash.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * fthash.h
4 | *
5 | * Hashing functions (specification).
6 | *
7 | */
8 |
9 | /*
10 | * Copyright 2000 Computing Research Labs, New Mexico State University
11 | * Copyright 2001-2015
12 | * Francesco Zappa Nardelli
13 | *
14 | * Permission is hereby granted, free of charge, to any person obtaining a
15 | * copy of this software and associated documentation files (the "Software"),
16 | * to deal in the Software without restriction, including without limitation
17 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 | * and/or sell copies of the Software, and to permit persons to whom the
19 | * Software is furnished to do so, subject to the following conditions:
20 | *
21 | * The above copyright notice and this permission notice shall be included in
22 | * all copies or substantial portions of the Software.
23 | *
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 | * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
28 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
29 | * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
30 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 | */
32 |
33 | /**************************************************************************
34 | *
35 | * This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50
36 | *
37 | * taken from Mark Leisher's xmbdfed package
38 | *
39 | */
40 |
41 |
42 | #ifndef FTHASH_H_
43 | #define FTHASH_H_
44 |
45 |
46 | #include
47 | #include FT_FREETYPE_H
48 |
49 |
50 | FT_BEGIN_HEADER
51 |
52 |
53 | typedef union FT_Hashkey_
54 | {
55 | FT_Int num;
56 | const char* str;
57 |
58 | } FT_Hashkey;
59 |
60 |
61 | typedef struct FT_HashnodeRec_
62 | {
63 | FT_Hashkey key;
64 | size_t data;
65 |
66 | } FT_HashnodeRec;
67 |
68 | typedef struct FT_HashnodeRec_ *FT_Hashnode;
69 |
70 |
71 | typedef FT_ULong
72 | (*FT_Hash_LookupFunc)( FT_Hashkey* key );
73 |
74 | typedef FT_Bool
75 | (*FT_Hash_CompareFunc)( FT_Hashkey* a,
76 | FT_Hashkey* b );
77 |
78 |
79 | typedef struct FT_HashRec_
80 | {
81 | FT_UInt limit;
82 | FT_UInt size;
83 | FT_UInt used;
84 |
85 | FT_Hash_LookupFunc lookup;
86 | FT_Hash_CompareFunc compare;
87 |
88 | FT_Hashnode* table;
89 |
90 | } FT_HashRec;
91 |
92 | typedef struct FT_HashRec_ *FT_Hash;
93 |
94 |
95 | FT_Error
96 | ft_hash_str_init( FT_Hash hash,
97 | FT_Memory memory );
98 |
99 | FT_Error
100 | ft_hash_num_init( FT_Hash hash,
101 | FT_Memory memory );
102 |
103 | void
104 | ft_hash_str_free( FT_Hash hash,
105 | FT_Memory memory );
106 |
107 | #define ft_hash_num_free ft_hash_str_free
108 |
109 | FT_Error
110 | ft_hash_str_insert( const char* key,
111 | size_t data,
112 | FT_Hash hash,
113 | FT_Memory memory );
114 |
115 | FT_Error
116 | ft_hash_num_insert( FT_Int num,
117 | size_t data,
118 | FT_Hash hash,
119 | FT_Memory memory );
120 |
121 | size_t*
122 | ft_hash_str_lookup( const char* key,
123 | FT_Hash hash );
124 |
125 | size_t*
126 | ft_hash_num_lookup( FT_Int num,
127 | FT_Hash hash );
128 |
129 |
130 | FT_END_HEADER
131 |
132 |
133 | #endif /* FTHASH_H_ */
134 |
135 |
136 | /* END */
137 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/ftpsprop.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ftpsprop.h
4 | *
5 | * Get and set properties of PostScript drivers (specification).
6 | *
7 | * Copyright (C) 2017-2019 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 FTPSPROP_H_
20 | #define FTPSPROP_H_
21 |
22 |
23 | #include
24 | #include FT_FREETYPE_H
25 |
26 |
27 | FT_BEGIN_HEADER
28 |
29 |
30 | FT_BASE_CALLBACK( FT_Error )
31 | ps_property_set( FT_Module module, /* PS_Driver */
32 | const char* property_name,
33 | const void* value,
34 | FT_Bool value_is_string );
35 |
36 | FT_BASE_CALLBACK( FT_Error )
37 | ps_property_get( FT_Module module, /* PS_Driver */
38 | const char* property_name,
39 | void* value );
40 |
41 |
42 | FT_END_HEADER
43 |
44 |
45 | #endif /* FTPSPROP_H_ */
46 |
47 |
48 | /* END */
49 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/fttrace.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * fttrace.h
4 | *
5 | * Tracing handling (specification only).
6 | *
7 | * Copyright (C) 2002-2019 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 | /* definitions of trace levels for FreeType 2 */
20 |
21 | /* the first level must always be `trace_any' */
22 | FT_TRACE_DEF( any )
23 |
24 | /* base components */
25 | FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */
26 | FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */
27 | FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */
28 | FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */
29 | FT_TRACE_DEF( init ) /* initialization (ftinit.c) */
30 | FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */
31 | FT_TRACE_DEF( list ) /* list management (ftlist.c) */
32 | FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */
33 | FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */
34 | FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */
35 |
36 | FT_TRACE_DEF( bitmap ) /* bitmap manipulation (ftbitmap.c) */
37 | FT_TRACE_DEF( checksum ) /* bitmap checksum (ftobjs.c) */
38 | FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
39 | FT_TRACE_DEF( psprops ) /* PS driver properties (ftpsprop.c) */
40 | FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
41 | FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
42 | FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
43 | FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
44 |
45 | /* Cache sub-system */
46 | FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
47 |
48 | /* SFNT driver components */
49 | FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
50 | FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
51 | FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
52 | FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
53 | FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */
54 | FT_TRACE_DEF( ttcpal ) /* color palette table (ttcpal.c) */
55 | FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */
56 | FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
57 | FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */
58 | FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */
59 | FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */
60 |
61 | /* TrueType driver components */
62 | FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */
63 | FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */
64 | FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */
65 | FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */
66 | FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */
67 | FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */
68 |
69 | /* Type 1 driver components */
70 | FT_TRACE_DEF( t1afm )
71 | FT_TRACE_DEF( t1driver )
72 | FT_TRACE_DEF( t1gload )
73 | FT_TRACE_DEF( t1load )
74 | FT_TRACE_DEF( t1objs )
75 | FT_TRACE_DEF( t1parse )
76 |
77 | /* PostScript helper module `psaux' */
78 | FT_TRACE_DEF( cffdecode )
79 | FT_TRACE_DEF( psconv )
80 | FT_TRACE_DEF( psobjs )
81 | FT_TRACE_DEF( t1decode )
82 |
83 | /* PostScript hinting module `pshinter' */
84 | FT_TRACE_DEF( pshalgo )
85 | FT_TRACE_DEF( pshrec )
86 |
87 | /* Type 2 driver components */
88 | FT_TRACE_DEF( cffdriver )
89 | FT_TRACE_DEF( cffgload )
90 | FT_TRACE_DEF( cffload )
91 | FT_TRACE_DEF( cffobjs )
92 | FT_TRACE_DEF( cffparse )
93 |
94 | FT_TRACE_DEF( cf2blues )
95 | FT_TRACE_DEF( cf2hints )
96 | FT_TRACE_DEF( cf2interp )
97 |
98 | /* Type 42 driver component */
99 | FT_TRACE_DEF( t42 )
100 |
101 | /* CID driver components */
102 | FT_TRACE_DEF( ciddriver )
103 | FT_TRACE_DEF( cidgload )
104 | FT_TRACE_DEF( cidload )
105 | FT_TRACE_DEF( cidobjs )
106 | FT_TRACE_DEF( cidparse )
107 |
108 | /* Windows font component */
109 | FT_TRACE_DEF( winfnt )
110 |
111 | /* PCF font components */
112 | FT_TRACE_DEF( pcfdriver )
113 | FT_TRACE_DEF( pcfread )
114 |
115 | /* BDF font components */
116 | FT_TRACE_DEF( bdfdriver )
117 | FT_TRACE_DEF( bdflib )
118 |
119 | /* PFR font component */
120 | FT_TRACE_DEF( pfr )
121 |
122 | /* OpenType validation components */
123 | FT_TRACE_DEF( otvcommon )
124 | FT_TRACE_DEF( otvbase )
125 | FT_TRACE_DEF( otvgdef )
126 | FT_TRACE_DEF( otvgpos )
127 | FT_TRACE_DEF( otvgsub )
128 | FT_TRACE_DEF( otvjstf )
129 | FT_TRACE_DEF( otvmath )
130 | FT_TRACE_DEF( otvmodule )
131 |
132 | /* TrueTypeGX/AAT validation components */
133 | FT_TRACE_DEF( gxvbsln )
134 | FT_TRACE_DEF( gxvcommon )
135 | FT_TRACE_DEF( gxvfeat )
136 | FT_TRACE_DEF( gxvjust )
137 | FT_TRACE_DEF( gxvkern )
138 | FT_TRACE_DEF( gxvmodule )
139 | FT_TRACE_DEF( gxvmort )
140 | FT_TRACE_DEF( gxvmorx )
141 | FT_TRACE_DEF( gxvlcar )
142 | FT_TRACE_DEF( gxvopbd )
143 | FT_TRACE_DEF( gxvprop )
144 | FT_TRACE_DEF( gxvtrak )
145 |
146 | /* autofit components */
147 | FT_TRACE_DEF( afcjk )
148 | FT_TRACE_DEF( afglobal )
149 | FT_TRACE_DEF( afhints )
150 | FT_TRACE_DEF( afmodule )
151 | FT_TRACE_DEF( aflatin )
152 | FT_TRACE_DEF( aflatin2 )
153 | FT_TRACE_DEF( afshaper )
154 | FT_TRACE_DEF( afwarp )
155 |
156 | /* END */
157 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/internal.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * internal.h
4 | *
5 | * Internal header files (specification only).
6 | *
7 | * Copyright (C) 1996-2019 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`. Do not include it
22 | * manually!
23 | *
24 | */
25 |
26 |
27 | #define FT_INTERNAL_OBJECTS_H
28 | #define FT_INTERNAL_STREAM_H
29 | #define FT_INTERNAL_MEMORY_H
30 | #define FT_INTERNAL_DEBUG_H
31 | #define FT_INTERNAL_CALC_H
32 | #define FT_INTERNAL_HASH_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_PROPS_H
47 |
48 | #define FT_INTERNAL_AUTOHINT_H
49 |
50 | #define FT_INTERNAL_CFF_TYPES_H
51 | #define FT_INTERNAL_CFF_OBJECTS_TYPES_H
52 |
53 |
54 | #if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
55 |
56 | /* We disable the warning `conditional expression is constant' here */
57 | /* in order to compile cleanly with the maximum level of warnings. */
58 | /* In particular, the warning complains about stuff like `while(0)' */
59 | /* which is very useful in macro definitions. There is no benefit */
60 | /* in having it enabled. */
61 | #pragma warning( disable : 4127 )
62 |
63 | #endif /* _MSC_VER */
64 |
65 |
66 | /* END */
67 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svbdf.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svbdf.h
4 | *
5 | * The FreeType BDF services (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 | #define FT_DEFINE_SERVICE_BDFRec( class_, \
50 | get_charset_id_, \
51 | get_property_ ) \
52 | static const FT_Service_BDFRec class_ = \
53 | { \
54 | get_charset_id_, get_property_ \
55 | };
56 |
57 | /* */
58 |
59 |
60 | FT_END_HEADER
61 |
62 |
63 | #endif /* SVBDF_H_ */
64 |
65 |
66 | /* END */
67 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svcfftl.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svcfftl.h
4 | *
5 | * The FreeType CFF tables loader service (specification).
6 | *
7 | * Copyright (C) 2017-2019 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 SVCFFTL_H_
20 | #define SVCFFTL_H_
21 |
22 | #include FT_INTERNAL_SERVICE_H
23 | #include FT_INTERNAL_CFF_TYPES_H
24 |
25 |
26 | FT_BEGIN_HEADER
27 |
28 |
29 | #define FT_SERVICE_ID_CFF_LOAD "cff-load"
30 |
31 |
32 | typedef FT_UShort
33 | (*FT_Get_Standard_Encoding_Func)( FT_UInt charcode );
34 |
35 | typedef FT_Error
36 | (*FT_Load_Private_Dict_Func)( CFF_Font font,
37 | CFF_SubFont subfont,
38 | FT_UInt lenNDV,
39 | FT_Fixed* NDV );
40 |
41 | typedef FT_Byte
42 | (*FT_FD_Select_Get_Func)( CFF_FDSelect fdselect,
43 | FT_UInt glyph_index );
44 |
45 | typedef FT_Bool
46 | (*FT_Blend_Check_Vector_Func)( CFF_Blend blend,
47 | FT_UInt vsindex,
48 | FT_UInt lenNDV,
49 | FT_Fixed* NDV );
50 |
51 | typedef FT_Error
52 | (*FT_Blend_Build_Vector_Func)( CFF_Blend blend,
53 | FT_UInt vsindex,
54 | FT_UInt lenNDV,
55 | FT_Fixed* NDV );
56 |
57 |
58 | FT_DEFINE_SERVICE( CFFLoad )
59 | {
60 | FT_Get_Standard_Encoding_Func get_standard_encoding;
61 | FT_Load_Private_Dict_Func load_private_dict;
62 | FT_FD_Select_Get_Func fd_select_get;
63 | FT_Blend_Check_Vector_Func blend_check_vector;
64 | FT_Blend_Build_Vector_Func blend_build_vector;
65 | };
66 |
67 |
68 | #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \
69 | get_standard_encoding_, \
70 | load_private_dict_, \
71 | fd_select_get_, \
72 | blend_check_vector_, \
73 | blend_build_vector_ ) \
74 | static const FT_Service_CFFLoadRec class_ = \
75 | { \
76 | get_standard_encoding_, \
77 | load_private_dict_, \
78 | fd_select_get_, \
79 | blend_check_vector_, \
80 | blend_build_vector_ \
81 | };
82 |
83 |
84 | FT_END_HEADER
85 |
86 |
87 | #endif
88 |
89 |
90 | /* END */
91 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svcid.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svcid.h
4 | *
5 | * The FreeType CID font services (specification).
6 | *
7 | * Copyright (C) 2007-2019 by
8 | * Derek Clegg and Michael Toftdal.
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 SVCID_H_
20 | #define SVCID_H_
21 |
22 | #include FT_INTERNAL_SERVICE_H
23 |
24 |
25 | FT_BEGIN_HEADER
26 |
27 |
28 | #define FT_SERVICE_ID_CID "CID"
29 |
30 | typedef FT_Error
31 | (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face,
32 | const char* *registry,
33 | const char* *ordering,
34 | FT_Int *supplement );
35 | typedef FT_Error
36 | (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face,
37 | FT_Bool *is_cid );
38 | typedef FT_Error
39 | (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face,
40 | FT_UInt glyph_index,
41 | FT_UInt *cid );
42 |
43 | FT_DEFINE_SERVICE( CID )
44 | {
45 | FT_CID_GetRegistryOrderingSupplementFunc get_ros;
46 | FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid;
47 | FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index;
48 | };
49 |
50 |
51 | #define FT_DEFINE_SERVICE_CIDREC( class_, \
52 | get_ros_, \
53 | get_is_cid_, \
54 | get_cid_from_glyph_index_ ) \
55 | static const FT_Service_CIDRec class_ = \
56 | { \
57 | get_ros_, get_is_cid_, get_cid_from_glyph_index_ \
58 | };
59 |
60 | /* */
61 |
62 |
63 | FT_END_HEADER
64 |
65 |
66 | #endif /* SVCID_H_ */
67 |
68 |
69 | /* END */
70 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svfntfmt.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svfntfmt.h
4 | *
5 | * The FreeType font format service (specification only).
6 | *
7 | * Copyright (C) 2003-2019 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 SVFNTFMT_H_
20 | #define SVFNTFMT_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 is a
31 | * simple constant string pointer.
32 | */
33 |
34 | #define FT_SERVICE_ID_FONT_FORMAT "font-format"
35 |
36 | #define FT_FONT_FORMAT_TRUETYPE "TrueType"
37 | #define FT_FONT_FORMAT_TYPE_1 "Type 1"
38 | #define FT_FONT_FORMAT_BDF "BDF"
39 | #define FT_FONT_FORMAT_PCF "PCF"
40 | #define FT_FONT_FORMAT_TYPE_42 "Type 42"
41 | #define FT_FONT_FORMAT_CID "CID Type 1"
42 | #define FT_FONT_FORMAT_CFF "CFF"
43 | #define FT_FONT_FORMAT_PFR "PFR"
44 | #define FT_FONT_FORMAT_WINFNT "Windows FNT"
45 |
46 | /* */
47 |
48 |
49 | FT_END_HEADER
50 |
51 |
52 | #endif /* SVFNTFMT_H_ */
53 |
54 |
55 | /* END */
56 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svgldict.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svgldict.h
4 | *
5 | * The FreeType glyph dictionary services (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 index of
30 | * 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 | #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
56 | get_name_, \
57 | name_index_ ) \
58 | static const FT_Service_GlyphDictRec class_ = \
59 | { \
60 | get_name_, name_index_ \
61 | };
62 |
63 | /* */
64 |
65 |
66 | FT_END_HEADER
67 |
68 |
69 | #endif /* SVGLDICT_H_ */
70 |
71 |
72 | /* END */
73 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svgxval.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svgxval.h
4 | *
5 | * FreeType API for validating TrueTypeGX/AAT tables (specification).
6 | *
7 | * Copyright (C) 2004-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svkern.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svkern.h
4 | *
5 | * The FreeType Kerning service (specification).
6 | *
7 | * Copyright (C) 2006-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svmetric.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svmetric.h
4 | *
5 | * The FreeType services for metrics variations (specification).
6 | *
7 | * Copyright (C) 2016-2019 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 SVMETRIC_H_
20 | #define SVMETRIC_H_
21 |
22 | #include FT_INTERNAL_SERVICE_H
23 |
24 |
25 | FT_BEGIN_HEADER
26 |
27 |
28 | /*
29 | * A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables.
30 | *
31 | */
32 |
33 | #define FT_SERVICE_ID_METRICS_VARIATIONS "metrics-variations"
34 |
35 |
36 | /* HVAR */
37 |
38 | typedef FT_Error
39 | (*FT_HAdvance_Adjust_Func)( FT_Face face,
40 | FT_UInt gindex,
41 | FT_Int *avalue );
42 |
43 | typedef FT_Error
44 | (*FT_LSB_Adjust_Func)( FT_Face face,
45 | FT_UInt gindex,
46 | FT_Int *avalue );
47 |
48 | typedef FT_Error
49 | (*FT_RSB_Adjust_Func)( FT_Face face,
50 | FT_UInt gindex,
51 | FT_Int *avalue );
52 |
53 | /* VVAR */
54 |
55 | typedef FT_Error
56 | (*FT_VAdvance_Adjust_Func)( FT_Face face,
57 | FT_UInt gindex,
58 | FT_Int *avalue );
59 |
60 | typedef FT_Error
61 | (*FT_TSB_Adjust_Func)( FT_Face face,
62 | FT_UInt gindex,
63 | FT_Int *avalue );
64 |
65 | typedef FT_Error
66 | (*FT_BSB_Adjust_Func)( FT_Face face,
67 | FT_UInt gindex,
68 | FT_Int *avalue );
69 |
70 | typedef FT_Error
71 | (*FT_VOrg_Adjust_Func)( FT_Face face,
72 | FT_UInt gindex,
73 | FT_Int *avalue );
74 |
75 | /* MVAR */
76 |
77 | typedef void
78 | (*FT_Metrics_Adjust_Func)( FT_Face face );
79 |
80 |
81 | FT_DEFINE_SERVICE( MetricsVariations )
82 | {
83 | FT_HAdvance_Adjust_Func hadvance_adjust;
84 | FT_LSB_Adjust_Func lsb_adjust;
85 | FT_RSB_Adjust_Func rsb_adjust;
86 |
87 | FT_VAdvance_Adjust_Func vadvance_adjust;
88 | FT_TSB_Adjust_Func tsb_adjust;
89 | FT_BSB_Adjust_Func bsb_adjust;
90 | FT_VOrg_Adjust_Func vorg_adjust;
91 |
92 | FT_Metrics_Adjust_Func metrics_adjust;
93 | };
94 |
95 |
96 | #define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_, \
97 | hadvance_adjust_, \
98 | lsb_adjust_, \
99 | rsb_adjust_, \
100 | vadvance_adjust_, \
101 | tsb_adjust_, \
102 | bsb_adjust_, \
103 | vorg_adjust_, \
104 | metrics_adjust_ ) \
105 | static const FT_Service_MetricsVariationsRec class_ = \
106 | { \
107 | hadvance_adjust_, \
108 | lsb_adjust_, \
109 | rsb_adjust_, \
110 | vadvance_adjust_, \
111 | tsb_adjust_, \
112 | bsb_adjust_, \
113 | vorg_adjust_, \
114 | metrics_adjust_ \
115 | };
116 |
117 | /* */
118 |
119 |
120 | FT_END_HEADER
121 |
122 | #endif /* SVMETRIC_H_ */
123 |
124 |
125 | /* END */
126 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svmm.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svmm.h
4 | *
5 | * The FreeType Multiple Masters and GX var services (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 SVMM_H_
20 | #define SVMM_H_
21 |
22 | #include FT_INTERNAL_SERVICE_H
23 |
24 |
25 | FT_BEGIN_HEADER
26 |
27 |
28 | /*
29 | * A service used to manage multiple-masters data in a given face.
30 | *
31 | * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
32 | *
33 | */
34 |
35 | #define FT_SERVICE_ID_MULTI_MASTERS "multi-masters"
36 |
37 |
38 | typedef FT_Error
39 | (*FT_Get_MM_Func)( FT_Face face,
40 | FT_Multi_Master* master );
41 |
42 | typedef FT_Error
43 | (*FT_Get_MM_Var_Func)( FT_Face face,
44 | FT_MM_Var* *master );
45 |
46 | typedef FT_Error
47 | (*FT_Set_MM_Design_Func)( FT_Face face,
48 | FT_UInt num_coords,
49 | FT_Long* coords );
50 |
51 | /* use return value -1 to indicate that the new coordinates */
52 | /* are equal to the current ones; no changes are thus needed */
53 | typedef FT_Error
54 | (*FT_Set_Var_Design_Func)( FT_Face face,
55 | FT_UInt num_coords,
56 | FT_Fixed* coords );
57 |
58 | /* use return value -1 to indicate that the new coordinates */
59 | /* are equal to the current ones; no changes are thus needed */
60 | typedef FT_Error
61 | (*FT_Set_MM_Blend_Func)( FT_Face face,
62 | FT_UInt num_coords,
63 | FT_Long* coords );
64 |
65 | typedef FT_Error
66 | (*FT_Get_Var_Design_Func)( FT_Face face,
67 | FT_UInt num_coords,
68 | FT_Fixed* coords );
69 |
70 | typedef FT_Error
71 | (*FT_Set_Instance_Func)( FT_Face face,
72 | FT_UInt instance_index );
73 |
74 | typedef FT_Error
75 | (*FT_Get_MM_Blend_Func)( FT_Face face,
76 | FT_UInt num_coords,
77 | FT_Long* coords );
78 |
79 | typedef FT_Error
80 | (*FT_Get_Var_Blend_Func)( FT_Face face,
81 | FT_UInt *num_coords,
82 | FT_Fixed* *coords,
83 | FT_Fixed* *normalizedcoords,
84 | FT_MM_Var* *mm_var );
85 |
86 | typedef void
87 | (*FT_Done_Blend_Func)( FT_Face );
88 |
89 | typedef FT_Error
90 | (*FT_Set_MM_WeightVector_Func)( FT_Face face,
91 | FT_UInt len,
92 | FT_Fixed* weight_vector );
93 |
94 | typedef FT_Error
95 | (*FT_Get_MM_WeightVector_Func)( FT_Face face,
96 | FT_UInt* len,
97 | FT_Fixed* weight_vector );
98 |
99 |
100 | FT_DEFINE_SERVICE( MultiMasters )
101 | {
102 | FT_Get_MM_Func get_mm;
103 | FT_Set_MM_Design_Func set_mm_design;
104 | FT_Set_MM_Blend_Func set_mm_blend;
105 | FT_Get_MM_Blend_Func get_mm_blend;
106 | FT_Get_MM_Var_Func get_mm_var;
107 | FT_Set_Var_Design_Func set_var_design;
108 | FT_Get_Var_Design_Func get_var_design;
109 | FT_Set_Instance_Func set_instance;
110 | FT_Set_MM_WeightVector_Func set_mm_weightvector;
111 | FT_Get_MM_WeightVector_Func get_mm_weightvector;
112 |
113 | /* for internal use; only needed for code sharing between modules */
114 | FT_Get_Var_Blend_Func get_var_blend;
115 | FT_Done_Blend_Func done_blend;
116 | };
117 |
118 |
119 | #define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
120 | get_mm_, \
121 | set_mm_design_, \
122 | set_mm_blend_, \
123 | get_mm_blend_, \
124 | get_mm_var_, \
125 | set_var_design_, \
126 | get_var_design_, \
127 | set_instance_, \
128 | set_weightvector_, \
129 | get_weightvector_, \
130 | get_var_blend_, \
131 | done_blend_ ) \
132 | static const FT_Service_MultiMastersRec class_ = \
133 | { \
134 | get_mm_, \
135 | set_mm_design_, \
136 | set_mm_blend_, \
137 | get_mm_blend_, \
138 | get_mm_var_, \
139 | set_var_design_, \
140 | get_var_design_, \
141 | set_instance_, \
142 | set_weightvector_, \
143 | get_weightvector_, \
144 | get_var_blend_, \
145 | done_blend_ \
146 | };
147 |
148 | /* */
149 |
150 |
151 | FT_END_HEADER
152 |
153 | #endif /* SVMM_H_ */
154 |
155 |
156 | /* END */
157 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svotval.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svotval.h
4 | *
5 | * The FreeType OpenType validation service (specification).
6 | *
7 | * Copyright (C) 2004-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svpfr.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svpfr.h
4 | *
5 | * Internal PFR service functions (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svpostnm.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svpostnm.h
4 | *
5 | * The FreeType PostScript name services (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 font
29 | * 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 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \
51 | static const FT_Service_PsFontNameRec class_ = \
52 | { \
53 | get_ps_font_name_ \
54 | };
55 |
56 | /* */
57 |
58 |
59 | FT_END_HEADER
60 |
61 |
62 | #endif /* SVPOSTNM_H_ */
63 |
64 |
65 | /* END */
66 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svprop.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svprop.h
4 | *
5 | * The FreeType property service (specification).
6 | *
7 | * Copyright (C) 2012-2019 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 | FT_Bool value_is_string );
34 |
35 | typedef FT_Error
36 | (*FT_Properties_GetFunc)( FT_Module module,
37 | const char* property_name,
38 | void* value );
39 |
40 |
41 | FT_DEFINE_SERVICE( Properties )
42 | {
43 | FT_Properties_SetFunc set_property;
44 | FT_Properties_GetFunc get_property;
45 | };
46 |
47 |
48 | #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
49 | set_property_, \
50 | get_property_ ) \
51 | static const FT_Service_PropertiesRec class_ = \
52 | { \
53 | set_property_, \
54 | get_property_ \
55 | };
56 |
57 | /* */
58 |
59 |
60 | FT_END_HEADER
61 |
62 |
63 | #endif /* SVPROP_H_ */
64 |
65 |
66 | /* END */
67 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svpscmap.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svpscmap.h
4 | *
5 | * The FreeType PostScript charmap service (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 SVPSCMAP_H_
20 | #define SVPSCMAP_H_
21 |
22 | #include FT_INTERNAL_OBJECTS_H
23 |
24 |
25 | FT_BEGIN_HEADER
26 |
27 |
28 | #define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
29 |
30 |
31 | /*
32 | * Adobe glyph name to unicode value.
33 | */
34 | typedef FT_UInt32
35 | (*PS_Unicode_ValueFunc)( const char* glyph_name );
36 |
37 | /*
38 | * Macintosh name id to glyph name. `NULL` if invalid index.
39 | */
40 | typedef const char*
41 | (*PS_Macintosh_NameFunc)( FT_UInt name_index );
42 |
43 | /*
44 | * Adobe standard string ID to glyph name. `NULL` if invalid index.
45 | */
46 | typedef const char*
47 | (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index );
48 |
49 |
50 | /*
51 | * Simple unicode -> glyph index charmap built from font glyph names table.
52 | */
53 | typedef struct PS_UniMap_
54 | {
55 | FT_UInt32 unicode; /* bit 31 set: is glyph variant */
56 | FT_UInt glyph_index;
57 |
58 | } PS_UniMap;
59 |
60 |
61 | typedef struct PS_UnicodesRec_* PS_Unicodes;
62 |
63 | typedef struct PS_UnicodesRec_
64 | {
65 | FT_CMapRec cmap;
66 | FT_UInt num_maps;
67 | PS_UniMap* maps;
68 |
69 | } PS_UnicodesRec;
70 |
71 |
72 | /*
73 | * A function which returns a glyph name for a given index. Returns
74 | * `NULL` if invalid index.
75 | */
76 | typedef const char*
77 | (*PS_GetGlyphNameFunc)( FT_Pointer data,
78 | FT_UInt string_index );
79 |
80 | /*
81 | * A function used to release the glyph name returned by
82 | * PS_GetGlyphNameFunc, when needed
83 | */
84 | typedef void
85 | (*PS_FreeGlyphNameFunc)( FT_Pointer data,
86 | const char* name );
87 |
88 | typedef FT_Error
89 | (*PS_Unicodes_InitFunc)( FT_Memory memory,
90 | PS_Unicodes unicodes,
91 | FT_UInt num_glyphs,
92 | PS_GetGlyphNameFunc get_glyph_name,
93 | PS_FreeGlyphNameFunc free_glyph_name,
94 | FT_Pointer glyph_data );
95 |
96 | typedef FT_UInt
97 | (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes,
98 | FT_UInt32 unicode );
99 |
100 | typedef FT_UInt32
101 | (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes,
102 | FT_UInt32 *unicode );
103 |
104 |
105 | FT_DEFINE_SERVICE( PsCMaps )
106 | {
107 | PS_Unicode_ValueFunc unicode_value;
108 |
109 | PS_Unicodes_InitFunc unicodes_init;
110 | PS_Unicodes_CharIndexFunc unicodes_char_index;
111 | PS_Unicodes_CharNextFunc unicodes_char_next;
112 |
113 | PS_Macintosh_NameFunc macintosh_name;
114 | PS_Adobe_Std_StringsFunc adobe_std_strings;
115 | const unsigned short* adobe_std_encoding;
116 | const unsigned short* adobe_expert_encoding;
117 | };
118 |
119 |
120 | #define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
121 | unicode_value_, \
122 | unicodes_init_, \
123 | unicodes_char_index_, \
124 | unicodes_char_next_, \
125 | macintosh_name_, \
126 | adobe_std_strings_, \
127 | adobe_std_encoding_, \
128 | adobe_expert_encoding_ ) \
129 | static const FT_Service_PsCMapsRec class_ = \
130 | { \
131 | unicode_value_, unicodes_init_, \
132 | unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
133 | adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
134 | };
135 |
136 | /* */
137 |
138 |
139 | FT_END_HEADER
140 |
141 |
142 | #endif /* SVPSCMAP_H_ */
143 |
144 |
145 | /* END */
146 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svpsinfo.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svpsinfo.h
4 | *
5 | * The FreeType PostScript info service (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 SVPSINFO_H_
20 | #define SVPSINFO_H_
21 |
22 | #include FT_INTERNAL_SERVICE_H
23 | #include FT_INTERNAL_TYPE1_TYPES_H
24 |
25 |
26 | FT_BEGIN_HEADER
27 |
28 |
29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info"
30 |
31 |
32 | typedef FT_Error
33 | (*PS_GetFontInfoFunc)( FT_Face face,
34 | PS_FontInfoRec* afont_info );
35 |
36 | typedef FT_Error
37 | (*PS_GetFontExtraFunc)( FT_Face face,
38 | PS_FontExtraRec* afont_extra );
39 |
40 | typedef FT_Int
41 | (*PS_HasGlyphNamesFunc)( FT_Face face );
42 |
43 | typedef FT_Error
44 | (*PS_GetFontPrivateFunc)( FT_Face face,
45 | PS_PrivateRec* afont_private );
46 |
47 | typedef FT_Long
48 | (*PS_GetFontValueFunc)( FT_Face face,
49 | PS_Dict_Keys key,
50 | FT_UInt idx,
51 | void *value,
52 | FT_Long value_len );
53 |
54 |
55 | FT_DEFINE_SERVICE( PsInfo )
56 | {
57 | PS_GetFontInfoFunc ps_get_font_info;
58 | PS_GetFontExtraFunc ps_get_font_extra;
59 | PS_HasGlyphNamesFunc ps_has_glyph_names;
60 | PS_GetFontPrivateFunc ps_get_font_private;
61 | PS_GetFontValueFunc ps_get_font_value;
62 | };
63 |
64 |
65 | #define FT_DEFINE_SERVICE_PSINFOREC( class_, \
66 | get_font_info_, \
67 | ps_get_font_extra_, \
68 | has_glyph_names_, \
69 | get_font_private_, \
70 | get_font_value_ ) \
71 | static const FT_Service_PsInfoRec class_ = \
72 | { \
73 | get_font_info_, ps_get_font_extra_, has_glyph_names_, \
74 | get_font_private_, get_font_value_ \
75 | };
76 |
77 | /* */
78 |
79 |
80 | FT_END_HEADER
81 |
82 |
83 | #endif /* SVPSINFO_H_ */
84 |
85 |
86 | /* END */
87 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svsfnt.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svsfnt.h
4 | *
5 | * The FreeType SFNT table loading service (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 | #define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \
74 | static const FT_Service_SFNT_TableRec class_ = \
75 | { \
76 | load_, get_, info_ \
77 | };
78 |
79 | /* */
80 |
81 |
82 | FT_END_HEADER
83 |
84 |
85 | #endif /* SVSFNT_H_ */
86 |
87 |
88 | /* END */
89 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svttcmap.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svttcmap.h
4 | *
5 | * The FreeType TrueType/sfnt cmap extra information service.
6 | *
7 | * Copyright (C) 2003-2019 by
8 | * Masatake YAMATO, Redhat 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 | /* Development of this service is support of
20 | Information-technology Promotion Agency, Japan. */
21 |
22 | #ifndef SVTTCMAP_H_
23 | #define SVTTCMAP_H_
24 |
25 | #include FT_INTERNAL_SERVICE_H
26 | #include FT_TRUETYPE_TABLES_H
27 |
28 |
29 | FT_BEGIN_HEADER
30 |
31 |
32 | #define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
33 |
34 |
35 | /**************************************************************************
36 | *
37 | * @struct:
38 | * TT_CMapInfo
39 | *
40 | * @description:
41 | * A structure used to store TrueType/sfnt specific cmap information
42 | * which is not covered by the generic @FT_CharMap structure. This
43 | * structure can be accessed with the @FT_Get_TT_CMap_Info function.
44 | *
45 | * @fields:
46 | * language ::
47 | * The language ID used in Mac fonts. Definitions of values are in
48 | * `ttnameid.h`.
49 | *
50 | * format ::
51 | * The cmap format. OpenType 1.6 defines the formats 0 (byte encoding
52 | * table), 2~(high-byte mapping through table), 4~(segment mapping to
53 | * delta values), 6~(trimmed table mapping), 8~(mixed 16-bit and 32-bit
54 | * coverage), 10~(trimmed array), 12~(segmented coverage), 13~(last
55 | * resort font), and 14 (Unicode Variation Sequences).
56 | */
57 | typedef struct TT_CMapInfo_
58 | {
59 | FT_ULong language;
60 | FT_Long format;
61 |
62 | } TT_CMapInfo;
63 |
64 |
65 | typedef FT_Error
66 | (*TT_CMap_Info_GetFunc)( FT_CharMap charmap,
67 | TT_CMapInfo *cmap_info );
68 |
69 |
70 | FT_DEFINE_SERVICE( TTCMaps )
71 | {
72 | TT_CMap_Info_GetFunc get_cmap_info;
73 | };
74 |
75 |
76 | #define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \
77 | static const FT_Service_TTCMapsRec class_ = \
78 | { \
79 | get_cmap_info_ \
80 | };
81 |
82 | /* */
83 |
84 |
85 | FT_END_HEADER
86 |
87 | #endif /* SVTTCMAP_H_ */
88 |
89 |
90 | /* END */
91 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svtteng.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svtteng.h
4 | *
5 | * The FreeType TrueType engine query service (specification).
6 | *
7 | * Copyright (C) 2006-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svttglyf.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svttglyf.h
4 | *
5 | * The FreeType TrueType glyph service.
6 | *
7 | * Copyright (C) 2007-2019 by
8 | * David Turner.
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 SVTTGLYF_H_
19 | #define SVTTGLYF_H_
20 |
21 | #include FT_INTERNAL_SERVICE_H
22 | #include FT_TRUETYPE_TABLES_H
23 |
24 |
25 | FT_BEGIN_HEADER
26 |
27 |
28 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf"
29 |
30 |
31 | typedef FT_ULong
32 | (*TT_Glyf_GetLocationFunc)( FT_Face face,
33 | FT_UInt gindex,
34 | FT_ULong *psize );
35 |
36 | FT_DEFINE_SERVICE( TTGlyf )
37 | {
38 | TT_Glyf_GetLocationFunc get_location;
39 | };
40 |
41 |
42 | #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \
43 | static const FT_Service_TTGlyfRec class_ = \
44 | { \
45 | get_location_ \
46 | };
47 |
48 | /* */
49 |
50 |
51 | FT_END_HEADER
52 |
53 | #endif /* SVTTGLYF_H_ */
54 |
55 |
56 | /* END */
57 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/internal/services/svwinfnt.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * svwinfnt.h
4 | *
5 | * The FreeType Windows FNT/FONT service (specification).
6 | *
7 | * Copyright (C) 2003-2019 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 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/freetype/tttags.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * tttags.h
4 | *
5 | * Tags for TrueType and OpenType tables (specification only).
6 | *
7 | * Copyright (C) 1996-2019 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 TTAGS_H_
20 | #define TTAGS_H_
21 |
22 |
23 | #include
24 | #include FT_FREETYPE_H
25 |
26 | #ifdef FREETYPE_H
27 | #error "freetype.h of FreeType 1 has been loaded!"
28 | #error "Please fix the directory search order for header files"
29 | #error "so that freetype.h of FreeType 2 is found first."
30 | #endif
31 |
32 |
33 | FT_BEGIN_HEADER
34 |
35 |
36 | #define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' )
37 | #define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' )
38 | #define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' )
39 | #define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' )
40 | #define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
41 | #define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
42 | #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' )
43 | #define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' )
44 | #define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' )
45 | #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
46 | #define TTAG_CFF2 FT_MAKE_TAG( 'C', 'F', 'F', '2' )
47 | #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
48 | #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
49 | #define TTAG_COLR FT_MAKE_TAG( 'C', 'O', 'L', 'R' )
50 | #define TTAG_CPAL FT_MAKE_TAG( 'C', 'P', 'A', 'L' )
51 | #define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
52 | #define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' )
53 | #define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' )
54 | #define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' )
55 | #define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' )
56 | #define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' )
57 | #define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' )
58 | #define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' )
59 | #define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' )
60 | #define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' )
61 | #define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' )
62 | #define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' )
63 | #define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' )
64 | #define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
65 | #define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
66 | #define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' )
67 | #define TTAG_HVAR FT_MAKE_TAG( 'H', 'V', 'A', 'R' )
68 | #define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
69 | #define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
70 | #define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
71 | #define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' )
72 | #define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' )
73 | #define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' )
74 | #define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' )
75 | #define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' )
76 | #define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' )
77 | #define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' )
78 | #define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' )
79 | #define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' )
80 | #define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' )
81 | #define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' )
82 | #define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' )
83 | #define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
84 | #define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' )
85 | #define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' )
86 | #define TTAG_MVAR FT_MAKE_TAG( 'M', 'V', 'A', 'R' )
87 | #define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
88 | #define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
89 | #define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' )
90 | #define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' )
91 | #define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' )
92 | #define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' )
93 | #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' )
94 | #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
95 | #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' )
96 | #define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' )
97 | #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' )
98 | #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
99 | #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' )
100 | #define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' )
101 | #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' )
102 | #define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' )
103 | #define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' )
104 | #define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' )
105 | #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
106 | #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
107 | #define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
108 | #define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
109 | #define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
110 |
111 | /* used by "Keyboard.dfont" on legacy Mac OS X */
112 | #define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )
113 |
114 | /* used by "LastResort.dfont" on legacy Mac OS X */
115 | #define TTAG_0xA5lst FT_MAKE_TAG( 0xA5, 'l', 's', 't' )
116 |
117 |
118 | FT_END_HEADER
119 |
120 | #endif /* TTAGS_H_ */
121 |
122 |
123 | /* END */
124 |
--------------------------------------------------------------------------------
/Antario/LIB/freetype/ft2build.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | *
3 | * ft2build.h
4 | *
5 | * FreeType 2 build and setup macros.
6 | *
7 | * Copyright (C) 1996-2019 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 is the 'entry point' for FreeType header file inclusions. It is
22 | * the only header file which should be included directly; all other
23 | * FreeType header files should be accessed with macro names (after
24 | * including `ft2build.h`).
25 | *
26 | * A typical example is
27 | *
28 | * ```
29 | * #include
30 | * #include FT_FREETYPE_H
31 | * ```
32 | *
33 | */
34 |
35 |
36 | #ifndef FT2BUILD_H_
37 | #define FT2BUILD_H_
38 |
39 | #include
40 |
41 | #endif /* FT2BUILD_H_ */
42 |
43 |
44 | /* END */
45 |
--------------------------------------------------------------------------------
/Antario/Menu.cpp:
--------------------------------------------------------------------------------
1 | #include "GUI\GUI.h"
2 | #include "Settings.h"
3 |
4 |
5 | void Detach() { g_Settings.bCheatActive = false; }
6 |
7 |
8 | void MenuMain::Initialize()
9 | {
10 | static int testint;
11 | static int testint2;
12 | static int testint3 = 2;
13 | static float float123 = 10.f;
14 | /* Create our main window (Could have multiple if you'd create vec. for it) */
15 | auto mainWindow = std::make_shared("Antario - Main", SSize(360, 256), g_Fonts.vecFonts[FONT_TAHOMA_8], g_Fonts.vecFonts[FONT_TAHOMA_10]);
16 | {
17 | ///TODO: window->AddTab()
18 | auto tab1 = std::make_shared("Main Tab", 2, mainWindow);
19 | {
20 | /* Create sections for it */
21 | auto sectMain = tab1->AddSection("TestSect", 1.f);
22 | {
23 | /* Add controls within section */
24 | sectMain->AddCheckBox("Bunnyhop Enabled", &g_Settings.bBhopEnabled);
25 | sectMain->AddCheckBox("Show Player Names", &g_Settings.bShowNames);
26 | sectMain->AddButton("Shutdown", Detach);
27 | sectMain->AddSlider("TestSlider", &float123, 0, 20);
28 | sectMain->AddSlider("intslider", &testint3, 0, 10);
29 | sectMain->AddCombo("TestCombo", &testint, {"Value1", "Value2", "Value3"});
30 | }
31 |
32 | auto sectMain2 = tab1->AddSection("TestSect2", 1.f);
33 | {
34 | sectMain2->AddCombo("TestCombo2", &testint2, {"ttest", "ttest2", "ttest3"});
35 | sectMain2->AddCheckBox("CheckboxSect2_1", &g_Settings.bShowBoxes);
36 | sectMain2->AddCheckBox("Show Player Boxes", &g_Settings.bShowBoxes);
37 | sectMain2->AddCheckBox("Show Player Weapons", &g_Settings.bShowWeapons);
38 | }
39 | } mainWindow->AddChild(tab1); /* For now */
40 |
41 | auto tab2 = std::make_shared("Test Tab", 1, mainWindow);
42 | {
43 | auto sectMain = tab2->AddSection("TestSect", .5f);
44 | {
45 | /* Add controls within section */
46 | sectMain->AddCheckBox("CheckboxSect2_1", &g_Settings.bShowBoxes);
47 | sectMain->AddCheckBox("Show Player Boxes", &g_Settings.bShowBoxes);
48 | sectMain->AddCheckBox("Show Player Weapons", &g_Settings.bShowWeapons);
49 | sectMain->AddButton("Shutdown", Detach);
50 | sectMain->AddSlider("TestSlider", &float123, 0, 20);
51 | sectMain->AddSlider("intslider", &testint3, 0, 10);
52 | sectMain->AddCombo("TestCombo", &testint, std::vector{"Value1", "Value2", "Value3"});
53 | }
54 |
55 | auto sectMain2 = tab2->AddSection("TestSect2", .5f);
56 | {
57 | sectMain2->AddCombo("TestCombo2", &testint2, std::vector{"ttest", "ttest2", "ttest3"});
58 | sectMain2->AddCheckBox("Bunnyhop Enabled", &g_Settings.bBhopEnabled);
59 | sectMain2->AddCheckBox("Show Player Names", &g_Settings.bShowNames);
60 | }
61 | } mainWindow->AddChild(tab2);
62 | }
63 | this->vecChildren.push_back(mainWindow);
64 |
65 | /* Create our mouse cursor (one instance only) */
66 | mouseCursor = std::make_unique();
67 |
68 | /* Do the first init run through all of the objects */
69 | for (auto& it : vecChildren)
70 | it->Initialize();
71 | }
72 |
--------------------------------------------------------------------------------
/Antario/SDK/CEntity.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Definitions.h"
3 | #include "IClientUnknown.h"
4 | #include "IClientEntityList.h"
5 | #include "..\Utils\Utils.h"
6 | #include "..\Utils\NetvarManager.h"
7 |
8 | extern WeaponInfo_t g_WeaponInfoCopy[255];
9 |
10 | // class predefinition
11 | class C_BaseCombatWeapon;
12 |
13 | class C_BaseEntity : public IClientUnknown, public IClientRenderable, public IClientNetworkable
14 | {
15 | private:
16 | template
17 | T GetPointer(const int offset)
18 | {
19 | return reinterpret_cast(reinterpret_cast(this) + offset);
20 | }
21 | // To get value from the pointer itself
22 | template
23 | T GetValue(const int offset)
24 | {
25 | return *reinterpret_cast(reinterpret_cast(this) + offset);
26 | }
27 |
28 | public:
29 | C_BaseCombatWeapon* GetActiveWeapon()
30 | {
31 | static int m_hActiveWeapon = g_pNetvars->GetOffset("DT_BaseCombatCharacter", "m_hActiveWeapon");
32 | const auto weaponData = GetValue(m_hActiveWeapon);
33 | return reinterpret_cast(g_pEntityList->GetClientEntityFromHandle(weaponData));
34 | }
35 |
36 | int GetTeam()
37 | {
38 | static int m_iTeamNum = g_pNetvars->GetOffset("DT_BaseEntity", "m_iTeamNum");
39 | return GetValue(m_iTeamNum);
40 | }
41 |
42 | EntityFlags GetFlags()
43 | {
44 | static int m_fFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
45 | return GetValue(m_fFlags);
46 | }
47 |
48 | MoveType_t GetMoveType()
49 | {
50 | static int m_Movetype = g_pNetvars->GetOffset("DT_BaseEntity", "m_nRenderMode") + 1;
51 | return GetValue(m_Movetype);
52 | }
53 |
54 | bool GetLifeState()
55 | {
56 | static int m_lifeState = g_pNetvars->GetOffset("DT_BasePlayer", "m_lifeState");
57 | return GetValue(m_lifeState);
58 | }
59 |
60 | int GetHealth()
61 | {
62 | static int m_iHealth = g_pNetvars->GetOffset("DT_BasePlayer", "m_iHealth");
63 | return GetValue(m_iHealth);
64 | }
65 |
66 | bool IsAlive() { return this->GetHealth() > 0 && this->GetLifeState() == 0; }
67 |
68 | bool IsImmune()
69 | {
70 | static int m_bGunGameImmunity = g_pNetvars->GetOffset("DT_CSPlayer", "m_bGunGameImmunity");
71 | return GetValue(m_bGunGameImmunity);
72 | }
73 |
74 | int GetTickBase()
75 | {
76 | static int m_nTickBase = g_pNetvars->GetOffset("DT_BasePlayer", "localdata", "m_nTickBase");
77 | return GetValue(m_nTickBase);
78 | }
79 |
80 | Vector GetOrigin()
81 | {
82 | static int m_vecOrigin = g_pNetvars->GetOffset("DT_BaseEntity", "m_vecOrigin");
83 | return GetValue(m_vecOrigin);
84 | }
85 |
86 | Vector GetViewOffset()
87 | {
88 | static int m_vecViewOffset = g_pNetvars->GetOffset("DT_BasePlayer", "localdata", "m_vecViewOffset[0]");
89 | return GetValue(m_vecViewOffset);
90 | }
91 |
92 | Vector GetEyePosition() { return this->GetOrigin() + this->GetViewOffset(); }
93 | };
94 |
95 |
96 | class C_BaseCombatWeapon : public C_BaseEntity
97 | {
98 | private:
99 | template
100 | T GetPointer(const int offset)
101 | {
102 | return reinterpret_cast(reinterpret_cast(this) + offset);
103 | }
104 | // To get value from the pointer itself
105 | template
106 | T GetValue(const int offset)
107 | {
108 | return *reinterpret_cast(reinterpret_cast(this) + offset);
109 | }
110 |
111 | public:
112 | ItemDefinitionIndex GetItemDefinitionIndex()
113 | {
114 | static int m_iItemDefinitionIndex = g_pNetvars->GetOffset("DT_BaseAttributableItem", "m_AttributeManager", "m_Item", "m_iItemDefinitionIndex");
115 | return GetValue(m_iItemDefinitionIndex);
116 | }
117 |
118 | float GetNextPrimaryAttack()
119 | {
120 | static int m_flNextPrimaryAttack = g_pNetvars->GetOffset("DT_BaseCombatWeapon", "LocalActiveWeaponData", "m_flNextPrimaryAttack");
121 | return GetValue(m_flNextPrimaryAttack);
122 | }
123 |
124 | int GetAmmo()
125 | {
126 | static int m_iClip1 = g_pNetvars->GetOffset("DT_BaseCombatWeapon", "m_iClip1");
127 | return GetValue(m_iClip1);
128 | }
129 |
130 | WeaponInfo_t* GetCSWpnData()
131 | {
132 | static auto system = *reinterpret_cast(Utils::FindSignature("client_panorama.dll", "8B 35 ? ? ? ? FF 10 0F B7 C0") + 0x2u);
133 | return system->GetWpnData(this->GetItemDefinitionIndex());
134 | }
135 |
136 | std::string GetName()
137 | {
138 | ///TODO: Test if szWeaponName returns proper value for m4a4 / m4a1-s or it doesnt recognize them.
139 | return std::string(this->GetCSWpnData()->szWeaponName);
140 | }
141 | };
142 |
--------------------------------------------------------------------------------
/Antario/SDK/CGlobalVarsBase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class CGlobalVarsBase
4 | {
5 | public:
6 | float realtime;
7 | int framecount;
8 | float absoluteframetime;
9 | float absoluteframestarttimestddev;
10 | float curtime;
11 | float frametime;
12 | int maxClients;
13 | int tickcount;
14 | float intervalPerTick;
15 | float interpolationAmount;
16 | int simTicksThisFrame;
17 | int networkProtocol;
18 | void* pSaveData;
19 | bool bClient;
20 | bool bRemoteClient;
21 |
22 | private:
23 | // 100 (i.e., tickcount is rounded down to this base and then the "delta" from this base is networked
24 | int nTimestampNetworkingBase;
25 | // 32 (entindex() % nTimestampRandomizeWindow ) is subtracted from gpGlobals->tickcount to set the networking basis, prevents
26 | // all of the entities from forcing a new PackedEntity on the same tick (i.e., prevents them from getting lockstepped on this)
27 | int nTimestampRandomizeWindow;
28 | };
29 | extern CGlobalVarsBase* g_pGlobalVars;
--------------------------------------------------------------------------------
/Antario/SDK/CPrediction.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "..\Utils\Utils.h"
3 |
4 | #define MAX_SPLITSCREEN_PLAYERS 1
5 |
6 | class CBaseHandle;
7 | class C_BaseEntity;
8 | class IClientEntity;
9 | class CUserCmd;
10 |
11 | class IMoveHelper
12 | {
13 | public:
14 | void SetHost(C_BaseEntity* host)
15 | {
16 | return Utils::CallVFunc<1, void>(this, host);
17 | }
18 | };
19 | extern IMoveHelper* g_pMoveHelper;
20 |
21 | struct CMoveData { byte data[184]; };
22 |
23 | class IGameMovement
24 | {
25 | public:
26 | virtual ~IGameMovement(void) {}
27 |
28 | virtual void ProcessMovement(C_BaseEntity *pPlayer, CMoveData *pMove) = 0;
29 | virtual void Reset(void) = 0;
30 | virtual void StartTrackPredictionErrors(C_BaseEntity *pPlayer) = 0;
31 | virtual void FinishTrackPredictionErrors(C_BaseEntity *pPlayer) = 0;
32 | virtual void DiffPrint(char const *fmt, ...) = 0;
33 |
34 | virtual Vector const& GetPlayerMins(bool ducked) const = 0;
35 | virtual Vector const& GetPlayerMaxs(bool ducked) const = 0;
36 | virtual Vector const& GetPlayerViewOffset(bool ducked) const = 0;
37 |
38 | virtual bool IsMovingPlayerStuck(void) const = 0;
39 | virtual C_BaseEntity* GetMovingPlayer(void) const = 0;
40 | virtual void UnblockPusher(C_BaseEntity* pPlayer, C_BaseEntity *pPusher) = 0;
41 |
42 | virtual void SetupMovementBounds(CMoveData *pMove) = 0;
43 | };
44 | extern IGameMovement* g_pMovement;
45 |
46 | class CPrediction
47 | {
48 | // Construction
49 | public:
50 |
51 | virtual ~CPrediction(void) = 0;//
52 |
53 | virtual void Init(void) = 0;//
54 | virtual void Shutdown(void) = 0;//
55 |
56 | // Implement IPrediction
57 | public:
58 |
59 | virtual void Update
60 | (
61 | int startframe, // World update ( un-modded ) most recently received
62 | bool validframe, // Is frame data valid
63 | int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
64 | int outgoing_command // Last command (most recent) sent to server (un-modded)
65 | );//
66 |
67 | virtual void PreEntityPacketReceived(int commands_acknowledged, int current_world_update_packet);//
68 | virtual void PostEntityPacketReceived(void);//5
69 | virtual void PostNetworkDataReceived(int commands_acknowledged);//
70 |
71 | virtual void OnReceivedUncompressedPacket(void);//
72 |
73 | // The engine needs to be able to access a few predicted values
74 | virtual void GetViewOrigin(Vector& org);//
75 | virtual void SetViewOrigin(Vector& org);//
76 | virtual void GetViewAngles(Vector& ang);//10
77 | virtual void SetViewAngles(Vector& ang);//
78 |
79 | virtual void GetLocalViewAngles(Vector& ang);//
80 | virtual void SetLocalViewAngles(Vector& ang);//
81 |
82 | virtual bool InPrediction(void) const;//14
83 | virtual bool IsFirstTimePredicted(void) const;//
84 |
85 | virtual int GetLastAcknowledgedCommandNumber(void) const;//
86 |
87 | #if !defined( NO_ENTITY_PREDICTION )
88 | virtual int GetIncomingPacketNumber(void) const;//
89 | #endif
90 |
91 | virtual void CheckMovingGround(IClientEntity* player, double frametime);//
92 | virtual void RunCommand(IClientEntity* player, CUserCmd* cmd, IMoveHelper* moveHelper);//
93 |
94 | virtual void SetupMove(C_BaseEntity* player, CUserCmd* cmd, IMoveHelper* pHelper, CMoveData* move);//20
95 | virtual void FinishMove(C_BaseEntity* player, CUserCmd* cmd, CMoveData* move);//
96 | virtual void SetIdealPitch(int nSlot, IClientEntity* player, const Vector& origin, const Vector& angles, const Vector& viewheight);//
97 |
98 | virtual void CheckError(int nSlot, IClientEntity* player, int commands_acknowledged);//
99 |
100 | public:
101 | virtual void _Update
102 | (
103 | int nSlot,
104 | bool received_new_world_update,
105 | bool validframe, // Is frame data valid
106 | int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
107 | int outgoing_command // Last command (most recent) sent to server (un-modded)
108 | );
109 |
110 | // Actually does the prediction work, returns false if an error occurred
111 | bool PerformPrediction(int nSlot, IClientEntity* localPlayer, bool received_new_world_update, int incoming_acknowledged, int outgoing_command);
112 |
113 | void ShiftIntermediateDataForward(int nSlot, int slots_to_remove, int previous_last_slot);
114 |
115 | void RestoreEntityToPredictedFrame(int nSlot, int predicted_frame);
116 |
117 | int ComputeFirstCommandToExecute(int nSlot, bool received_new_world_update, int incoming_acknowledged, int outgoing_command);
118 |
119 | void DumpEntity(IClientEntity* ent, int commands_acknowledged);
120 |
121 | void ShutdownPredictables(void);
122 |
123 | void ReinitPredictables(void);
124 |
125 | void RemoveStalePredictedEntities(int nSlot, int last_command_packet);
126 |
127 | void RestoreOriginalEntityState(int nSlot);
128 |
129 | void RunSimulation(int current_command, float curtime, CUserCmd* cmd, IClientEntity* localPlayer);
130 |
131 | void Untouch(int nSlot);
132 |
133 | void StorePredictionResults(int nSlot, int predicted_frame);
134 |
135 | bool ShouldDumpEntity(IClientEntity* ent);
136 |
137 | void SmoothViewOnMovingPlatform(IClientEntity* pPlayer, Vector& offset);
138 |
139 | void ResetSimulationTick();
140 |
141 | void ShowPredictionListEntry(int listRow, int showlist, IClientEntity* ent, int& totalsize, int& totalsize_intermediate);
142 |
143 | void FinishPredictionList(int listRow, int showlist, int totalsize, int totalsize_intermediate);
144 |
145 | void CheckPredictConvar();
146 |
147 | #if !defined( NO_ENTITY_PREDICTION )
148 |
149 | #endif
150 | };
151 |
152 | extern CPrediction* g_pPrediction;
--------------------------------------------------------------------------------
/Antario/SDK/ClientClass.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Recv.h"
3 | #include "Definitions.h"
4 | #include "IClientNetworkable.h"
5 |
6 | class ClientClass;
7 |
8 | typedef IClientNetworkable* (*CreateClientClassFn)(int entnum, int serialNum);
9 | typedef IClientNetworkable* (*CreateEventFn)();
10 |
11 | class ClientClass
12 | {
13 | public:
14 | CreateClientClassFn pCreateFn;
15 | CreateEventFn pCreateEventFn;
16 | char* pNetworkName;
17 | RecvTable* pRecvTable;
18 | ClientClass* pNext;
19 | EClassIds ClassID;
20 | };
--------------------------------------------------------------------------------
/Antario/SDK/IBaseClientDll.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "CGlobalVarsBase.h"
3 | #include "ClientClass.h"
4 |
5 | class IBaseClientDLL
6 | {
7 | public:
8 | // Connect appsystem components, get global interfaces, don't run any other init code
9 | virtual int Connect(CreateInterfaceFn appSystemFactory, CGlobalVarsBase *pGlobals) = 0;
10 | virtual int Disconnect(void) = 0;
11 | virtual int Init(CreateInterfaceFn appSystemFactory, CGlobalVarsBase *pGlobals) = 0;
12 | virtual void PostInit() = 0;
13 | virtual void Shutdown(void) = 0;
14 | virtual void LevelInitPreEntity(char const* pMapName) = 0;
15 | virtual void LevelInitPostEntity() = 0;
16 | virtual void LevelShutdown(void) = 0;
17 | virtual ClientClass* GetAllClasses(void) = 0;
18 | };
19 | extern IBaseClientDLL* g_pClientDll;
--------------------------------------------------------------------------------
/Antario/SDK/IClientEntity.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "IClientUnknown.h"
3 |
4 |
5 | struct SpatializationInfo_t;
6 |
7 | class IClientEntity : public IClientUnknown, public IClientRenderable, public IClientNetworkable, public IClientThinkable
8 | {
9 | public:
10 | virtual void Release(void) = 0;
11 | virtual const Vector GetAbsOrigin(void) const = 0;
12 | virtual const QAngle GetAbsAngles(void) const = 0;
13 | virtual void* GetMouth(void) = 0;
14 | virtual bool GetSoundSpatialization(SpatializationInfo_t info) = 0;
15 | virtual bool IsBlurred(void) = 0;
16 | };
--------------------------------------------------------------------------------
/Antario/SDK/IClientEntityList.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "IClientEntity.h"
3 |
4 | class IClientEntityList
5 | {
6 | public:
7 | virtual IClientNetworkable* GetClientNetworkable(int entnum) = 0;
8 | virtual void* vtablepad0x1(void) = 0;
9 | virtual void* vtablepad0x2(void) = 0;
10 | virtual C_BaseEntity* GetClientEntity(int entNum) = 0;
11 | virtual IClientEntity* GetClientEntityFromHandle(CBaseHandle hEnt) = 0;
12 | virtual int NumberOfEntities(bool bIncludeNonNetworkable) = 0;
13 | virtual int GetHighestEntityIndex(void) = 0;
14 | virtual void SetMaxEntities(int maxEnts) = 0;
15 | virtual int GetMaxEntities() = 0;
16 | };
17 | extern IClientEntityList* g_pEntityList;
--------------------------------------------------------------------------------
/Antario/SDK/IClientMode.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Vector.h"
3 | #include "CEntity.h"
4 |
5 | class IPanel;
6 |
7 | enum class ClearFlags_t
8 | {
9 | VIEW_CLEAR_COLOR = 0x1,
10 | VIEW_CLEAR_DEPTH = 0x2,
11 | VIEW_CLEAR_FULL_TARGET = 0x4,
12 | VIEW_NO_DRAW = 0x8,
13 | VIEW_CLEAR_OBEY_STENCIL = 0x10,
14 | VIEW_CLEAR_STENCIL = 0x20,
15 | };
16 |
17 |
18 | enum class MotionBlurMode_t
19 | {
20 | MOTION_BLUR_DISABLE = 1,
21 | MOTION_BLUR_GAME = 2,
22 | MOTION_BLUR_SFM = 3
23 | };
24 |
25 | class CViewSetup
26 | {
27 | public:
28 | __int32 x; //0x0000
29 | __int32 x_old; //0x0004
30 | __int32 y; //0x0008
31 | __int32 y_old; //0x000C
32 | __int32 width; //0x0010
33 | __int32 width_old; //0x0014
34 | __int32 height; //0x0018
35 | __int32 height_old; //0x001C
36 | char pad_0x0020[0x90]; //0x0020
37 | float fov; //0x00B0
38 | float viewmodel_fov; //0x00B4
39 | Vector origin; //0x00B8
40 | Vector angles; //0x00C4
41 | char pad_0x00D0[0x7C]; //0x00D0
42 |
43 | };//Size=0x014C
44 |
45 | class IClientMode
46 | {
47 | public:
48 | virtual ~IClientMode() {}
49 | virtual int ClientModeCSNormal(void *) = 0;
50 | virtual void Init() = 0;
51 | virtual void InitViewport() = 0;
52 | virtual void Shutdown() = 0;
53 | virtual void Enable() = 0;
54 | virtual void Disable() = 0;
55 | virtual void Layout() = 0;
56 | virtual IPanel* GetViewport() = 0;
57 | virtual void* GetViewportAnimationController() = 0;
58 | virtual void ProcessInput(bool bActive) = 0;
59 | virtual bool ShouldDrawDetailObjects() = 0;
60 | virtual bool ShouldDrawEntity(C_BaseEntity *pEnt) = 0;
61 | virtual bool ShouldDrawLocalPlayer(C_BaseEntity *pPlayer) = 0;
62 | virtual bool ShouldDrawParticles() = 0;
63 | virtual bool ShouldDrawFog(void) = 0;
64 | virtual void OverrideView(CViewSetup *pSetup) = 0; // 19
65 | virtual int KeyInput(int down, int keynum, const char *pszCurrentBinding) = 0; // 20
66 | virtual void StartMessageMode(int iMessageModeType) = 0; //21
67 | virtual IPanel* GetMessagePanel() = 0; //22
68 | virtual void OverrideMouseInput(float *x, float *y) = 0; //23
69 | virtual bool CreateMove(float flSampleFrametime, void* pCmd) = 0; // 24
70 | virtual void LevelInit(const char *newmap) = 0;
71 | virtual void LevelShutdown(void) = 0;
72 | };
73 | extern IClientMode* g_pClientMode;
74 |
--------------------------------------------------------------------------------
/Antario/SDK/IClientNetworkable.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class IClientUnknown;
4 | class ClientClass;
5 | class bf_read;
6 |
7 | class IClientNetworkable
8 | {
9 | public:
10 | virtual IClientUnknown* GetIClientUnknown() = 0;
11 | virtual void Release() = 0;
12 | virtual ClientClass* GetClientClass() = 0;
13 | virtual void NotifyShouldTransmit(int state) = 0;
14 | virtual void OnPreDataChanged(int updateType) = 0;
15 | virtual void OnDataChanged(int updateType) = 0;
16 | virtual void PreDataUpdate(int updateType) = 0;
17 | virtual void PostDataUpdate(int updateType) = 0;
18 | virtual void __unkn(void) = 0;
19 | virtual bool IsDormant(void) = 0;
20 | virtual int EntIndex(void) const = 0;
21 | virtual void ReceiveMessage(int classID, bf_read& msg) = 0;
22 | virtual void* GetDataTableBasePtr() = 0;
23 | virtual void SetDestroyedOnRecreateEntities(void) = 0;
24 | };
--------------------------------------------------------------------------------
/Antario/SDK/IClientRenderable.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "VMatrix.h"
4 |
5 | typedef unsigned short ClientShadowHandle_t;
6 | typedef unsigned short ClientRenderHandle_t;
7 | typedef unsigned short ModelInstanceHandle_t;
8 | typedef unsigned char uint8;
9 |
10 |
11 | struct model_t;
12 |
13 |
14 | struct RenderableInstance_t
15 | {
16 | uint8 m_nAlpha;
17 | };
18 |
19 | class IClientRenderable
20 | {
21 | public:
22 | virtual IClientUnknown* GetIClientUnknown() = 0;
23 | virtual Vector const& GetRenderOrigin(void) = 0;
24 | virtual QAngle const& GetRenderAngles(void) = 0;
25 | virtual bool ShouldDraw(void) = 0;
26 | virtual int GetRenderFlags(void) = 0; // ERENDERFLAGS_xxx
27 | virtual void Unused(void) const {}
28 | virtual ClientShadowHandle_t GetShadowHandle() const = 0;
29 | virtual ClientRenderHandle_t& RenderHandle() = 0;
30 | virtual model_t* GetModel() const = 0;
31 | virtual int DrawModel(int flags, const RenderableInstance_t &instance) = 0;
32 | virtual int GetBody() = 0;
33 | virtual void GetColorModulation(float* color) = 0;
34 | virtual bool LODTest() = 0;
35 | virtual bool SetupBones(matrix3x4_t *pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime) = 0;
36 | virtual void SetupWeights(const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights) = 0;
37 | virtual void DoAnimationEvents(void) = 0;
38 | virtual void* /*IPVSNotify*/ GetPVSNotifyInterface() = 0;
39 | virtual void GetRenderBounds(Vector& mins, Vector& maxs) = 0;
40 | virtual void GetRenderBoundsWorldspace(Vector& mins, Vector& maxs) = 0;
41 | virtual void GetShadowRenderBounds(Vector &mins, Vector &maxs, int /*ShadowType_t*/ shadowType) = 0;
42 | virtual bool ShouldReceiveProjectedTextures(int flags) = 0;
43 | virtual bool GetShadowCastDistance(float *pDist, int /*ShadowType_t*/ shadowType) const = 0;
44 | virtual bool GetShadowCastDirection(Vector *pDirection, int /*ShadowType_t*/ shadowType) const = 0;
45 | virtual bool IsShadowDirty() = 0;
46 | virtual void MarkShadowDirty(bool bDirty) = 0;
47 | virtual IClientRenderable* GetShadowParent() = 0;
48 | virtual IClientRenderable* FirstShadowChild() = 0;
49 | virtual IClientRenderable* NextShadowPeer() = 0;
50 | virtual int /*ShadowType_t*/ ShadowCastType() = 0;
51 | virtual void CreateModelInstance() = 0;
52 | virtual ModelInstanceHandle_t GetModelInstance() = 0;
53 | virtual const matrix3x4_t& RenderableToWorldTransform() = 0;
54 | virtual int LookupAttachment(const char *pAttachmentName) = 0;
55 | virtual bool GetAttachment(int number, Vector &origin, QAngle &angles) = 0;
56 | virtual bool GetAttachment(int number, matrix3x4_t &matrix) = 0;
57 | virtual float* GetRenderClipPlane(void) = 0;
58 | virtual int GetSkin() = 0;
59 | virtual void OnThreadedDrawSetup() = 0;
60 | virtual bool UsesFlexDelayedWeights() = 0;
61 | virtual void RecordToolMessage() = 0;
62 | virtual bool ShouldDrawForSplitScreenUser(int nSlot) = 0;
63 | virtual uint8 OverrideAlphaModulation(uint8 nAlpha) = 0;
64 | virtual uint8 OverrideShadowAlphaModulation(uint8 nAlpha) = 0;
65 | };
--------------------------------------------------------------------------------
/Antario/SDK/IClientThinkable.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class IClientUnknown;
4 | class CClientThinkHandlePtr;
5 | typedef CClientThinkHandlePtr* ClientThinkHandle_t;
6 |
7 | class IClientThinkable
8 | {
9 | public:
10 | virtual IClientUnknown* GetIClientUnknown() = 0;
11 | virtual void ClientThink() = 0;
12 | virtual ClientThinkHandle_t GetThinkHandle() = 0;
13 | virtual void SetThinkHandle(ClientThinkHandle_t hThink) = 0;
14 | virtual void Release() = 0;
15 | };
--------------------------------------------------------------------------------
/Antario/SDK/IClientUnknown.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "IClientNetworkable.h"
3 | #include "IClientRenderable.h"
4 | #include "IClientThinkable.h"
5 | #include "CHandle.h"
6 |
7 | class IClientAlphaProperty;
8 | class C_BaseEntity;
9 | class IClientEntity;
10 |
11 | class ICollideable
12 | {
13 | public:
14 | virtual void pad0();
15 | virtual const Vector& OBBMins() const;
16 | virtual const Vector& OBBMaxs() const;
17 | };
18 |
19 | class IClientUnknown : public IHandleEntity
20 | {
21 | public:
22 | virtual ICollideable* GetCollideable() = 0;
23 | virtual IClientNetworkable* GetClientNetworkable() = 0;
24 | virtual IClientRenderable* GetClientRenderable() = 0;
25 | virtual IClientEntity* GetIClientEntity() = 0;
26 | virtual C_BaseEntity* GetBaseEntity() = 0;
27 | virtual IClientThinkable* GetClientThinkable() = 0;
28 | //virtual IClientModelRenderable* GetClientModelRenderable() = 0;
29 | virtual IClientAlphaProperty* GetClientAlphaProperty() = 0;
30 | };
--------------------------------------------------------------------------------
/Antario/SDK/IGameEvent.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "KeyValues.h"
3 | #include "CInput.h"
4 |
5 | #define EVENT_DEBUG_ID_INIT 42
6 | #define EVENT_DEBUG_ID_SHUTDOWN 13
7 |
8 | class IGameEvent
9 | {
10 | public:
11 | virtual ~IGameEvent() {};
12 | virtual const char *GetName() const = 0; // get event name
13 |
14 | virtual bool IsReliable() const = 0; // if event handled reliable
15 | virtual bool IsLocal() const = 0; // if event is never networked
16 | virtual bool IsEmpty(const char *keyName = NULL) = 0; // check if data field exists
17 |
18 | // Data access
19 | virtual bool GetBool(const char *keyName = NULL, bool defaultValue = false) = 0;
20 | virtual int GetInt(const char *keyName = NULL, int defaultValue = 0) = 0;
21 | virtual unsigned long long GetUint64(char const *keyName = NULL, unsigned long long defaultValue = 0) = 0;
22 | virtual float GetFloat(const char *keyName = NULL, float defaultValue = 0.0f) = 0;
23 |
24 | virtual const char *GetString(const char *keyName = NULL, const char *defaultValue = "") = 0;
25 | virtual const wchar_t *GetWString(char const *keyName = NULL, const wchar_t *defaultValue = L"") = 0;
26 |
27 | virtual void SetBool(const char *keyName, bool value) = 0;
28 | virtual void SetInt(const char *keyName, int value) = 0;
29 | virtual void SetUInt64(const char *keyName, unsigned long long value) = 0;
30 | virtual void SetFloat(const char *keyName, float value) = 0;
31 | virtual void SetString(const char *keyName, const char *value) = 0;
32 | virtual void SetWString(const char *keyName, const wchar_t *value) = 0;
33 | };
34 |
35 | class IGameEventListener2
36 | {
37 | public:
38 | virtual ~IGameEventListener2(void) {};
39 |
40 | virtual void FireGameEvent(IGameEvent *event) = 0;
41 | virtual int GetEventDebugID(void) = 0;
42 | };
43 |
44 | class IGameEventManager2
45 | {
46 | public:
47 | virtual ~IGameEventManager2(void) {};
48 | virtual int LoadEventsFromFile(const char* filename) = 0;
49 | virtual void Reset() = 0;
50 | virtual bool AddListener(IGameEventListener2* listener, const char* name, bool serverside) = 0;
51 | virtual bool FindListener(IGameEventListener2* listener, const char* name) = 0;
52 | virtual void RemoveListener(IGameEventListener2* listener) = 0;
53 | virtual void AddListenerGlobal(IGameEventListener2* listener, bool serverside) = 0;
54 | virtual IGameEvent* CreateEvent(const char* name, bool force = false, int* cookie = nullptr) = 0;
55 | virtual bool FireEvent(IGameEvent* event, bool bDontBroadcast = false) = 0;
56 | virtual bool FireEventClientSide(IGameEvent* event) = 0;
57 | virtual IGameEvent* DuplicateEvent(IGameEvent* event) = 0;
58 | virtual void FreeEvent(IGameEvent* event) = 0;
59 | virtual bool SerializeEvent(IGameEvent* event, bf_write* buffer) = 0;
60 | virtual IGameEvent* UnserializeEvent(bf_read* buffer) = 0;
61 | virtual KeyValues* GetEventDataTypes(IGameEvent* event) = 0;
62 | };
63 | extern IGameEventManager2* g_pEventManager;
--------------------------------------------------------------------------------
/Antario/SDK/ISurface.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "..\Utils\Utils.h"
3 |
4 | class ISurface
5 | {
6 | public:
7 | void UnlockCursor()
8 | {
9 | return Utils::CallVFunc<66, void>(this);
10 | }
11 | };
12 | extern ISurface* g_pSurface;
--------------------------------------------------------------------------------
/Antario/SDK/PlayerInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef struct PlayerInfo_s
4 | {
5 | __int64 unknown; //0x0000
6 | union
7 | {
8 | __int64 steamID64; //0x0008 - SteamID64
9 | struct
10 | {
11 | __int32 xuidLow;
12 | __int32 xuidHigh;
13 | };
14 | };
15 | char szName[128]; //0x0010 - Player Name
16 | int userId; //0x0090 - Unique Server Identifier
17 | char szSteamID[20]; //0x0094 - STEAM_X:Y:Z
18 | char pad_0x00A8[0x10]; //0x00A8
19 | unsigned long iSteamID; //0x00B8 - SteamID
20 | char szFriendsName[128];
21 | bool fakeplayer;
22 | bool ishltv;
23 | unsigned int customFiles[4];
24 | unsigned char filesDownloaded;
25 | } PlayerInfo_t;
--------------------------------------------------------------------------------
/Antario/Settings.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "Settings.h"
5 | #include "Hooks.h"
6 |
7 |
8 | /**
9 | * \brief Used to initialize settings parser. Call inside Hooks::init AFTER you initialized menu.
10 | * \param pMenuObj Pointer to your created menu object. In our case, its g_Hooks.nMenu
11 | */
12 | void Settings::Initialize(MenuMain* pMenuObj)
13 | {
14 | this->fsPath = this->GetFolderPath();
15 | /* Create directory in AppData/Roaming if it doesnt exist */
16 | create_directories(this->fsPath);
17 |
18 | /* Setup a proper path to default file. */
19 | auto fsDefaultPath = this->fsPath;
20 | fsDefaultPath.append("default.xml");
21 |
22 | /* Check if the default config file exists, if it doesnt - create it. */
23 | if (!exists(fsDefaultPath))
24 | this->SaveSettings(fsDefaultPath.string(), pMenuObj);
25 |
26 | /* Load default settings. These can be changed by user. */
27 | this->LoadSettings(fsDefaultPath.string(), pMenuObj);
28 |
29 | this->UpdateDirectoryContent(this->fsPath);
30 | }
31 |
32 |
33 | /**
34 | * \brief Saves settings using menu child system.
35 | * \param strFileName Name of the file you want your setting to be saved as
36 | * \param pMenuObj Pointer to your created menu object. In this case, its g_Hooks.nMenu
37 | */
38 | void Settings::SaveSettings(const std::string& strFileName, MenuMain* pMenuObj)
39 | {
40 | /* Loop through menu content and get its values */
41 | std::function loopChildSettings;
42 | loopChildSettings = [&loopChildSettings](MenuMain* pMenuObj/*, Parent/section pointer for sections in cfgFile*/) -> void
43 | {
44 | /* Replaces spaces with underscores, useful with xml parsing, can be deleted otherwise. */
45 | auto fixedSpaces = [](std::string str) -> std::string
46 | {
47 | auto tmpString = str;
48 | std::replace(tmpString.begin(), tmpString.end(), ' ', '_');
49 | return tmpString;
50 | };
51 |
52 | for (auto& it : pMenuObj->vecChildren)
53 | {
54 | switch (it->type)
55 | {
56 | /*
57 | * Ready for future sub-sections or tab settings.
58 | * Just create a new `MenuSelectableType` for it
59 | * and loop like in TYPE_SECTION to create sub-settings.
60 | */
61 | case MST::TYPE_INCORR:
62 | case MST::TYPE_WINDOW:
63 | {
64 | /* Recurrent call so we save settings for all of the child objects. */
65 | loopChildSettings(it.get()/*, parentElement*/);
66 | break;
67 | }
68 | case MST::TYPE_SECTION:
69 | {
70 | /*
71 | * Create section inside your file to which you will assign child objects (child elements, w/e)
72 | * Then loop through child objects and save them. You can use it->strLabel to get section name.
73 | */
74 | loopChildSettings(it.get()/*, SectionElement*/);
75 | break;
76 | }
77 | case MST::TYPE_CHECKBOX:
78 | {
79 | auto tmpChkbx = dynamic_cast(it.get());
80 | /*
81 | * Save checkbox value into your settings. Setting parent should be transfered in lambda call
82 | * You can use tmpChkbx->strLabel to get the name and tmpChkbx->bCheckboxValue to get true/false.
83 | */
84 | break;
85 | }
86 | case MST::TYPE_COMBO:
87 | {
88 | //auto tmpCombo = dynamic_cast(it.get());
89 | /*
90 | * Save combo index into your settings. Setting parent should be transfered in lambda call
91 | * You can use tmpCombo->strLabel to get the name and tmpCombo->iCurrentValue to get the index.
92 | */
93 | break;
94 | }
95 | default: break;
96 | }
97 | }
98 | };
99 | loopChildSettings(pMenuObj/*, rootElement*/); /* Cant inline, drops an error */
100 | }
101 |
102 | void Settings::LoadSettings(const std::string& strFileName, MenuMain* pMenuObj)
103 | {
104 | /*
105 | * Use the code from "SaveSettings" but instead of saving, load them
106 | * Not hard huh?
107 | */
108 | }
109 |
110 |
111 | /**
112 | * \brief Updates vector with file names so you can use custom configs made by users (unlimited)
113 | * \param fsPath Path to the folder containing user configs
114 | */
115 | void Settings::UpdateDirectoryContent(const fs::path& fsPath)
116 | {
117 | this->vecFileNames.clear();
118 |
119 | /* Loop through directory content and save config files to your vector */
120 | for (const auto& it : fs::directory_iterator(fsPath))
121 | {
122 | if (!is_empty(it) && fsPath.extension() == ".yourextension")
123 | this->vecFileNames.push_back(it.path().filename().string());
124 | }
125 | }
126 |
127 |
128 | /**
129 | * \brief Gets the path to the userconfig folder. In this case - %APPDATA%\Antario\configs
130 | * \return std::experimental::filesystem::path containing folder path.
131 | */
132 | fs::path Settings::GetFolderPath()
133 | {
134 | /* Get %APPDATA% path in Windows system. */
135 | TCHAR szPath[MAX_PATH];
136 | SHGetFolderPath(nullptr, CSIDL_APPDATA, nullptr, 0, szPath);
137 |
138 | /* Save as filesystem::path and extend it so we use our own folder.*/
139 | auto fsPath = fs::path(szPath);
140 | fsPath.append(R"(\Antario\configs\)");
141 | return fsPath;
142 | }
143 |
--------------------------------------------------------------------------------
/Antario/Settings.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "GUI\GUI.h"
3 | #include
4 |
5 | using namespace ui;
6 | namespace fs = std::experimental::filesystem;
7 |
8 | class Settings
9 | {
10 | public:
11 | void Initialize(MenuMain* pMenuObj);
12 |
13 | void SaveSettings(const std::string& strFileName, MenuMain* pMenuObj);
14 | void LoadSettings(const std::string& strFileName, MenuMain* pMenuObj);
15 |
16 | private:
17 | void UpdateDirectoryContent(const fs::path& fsPath);
18 | inline fs::path GetFolderPath();
19 |
20 | fs::path fsPath{};
21 | std::vector vecFileNames{};
22 |
23 | public:
24 | /* All our settings variables will be here *
25 | * The best would be if they'd get *
26 | * initialized in the class itself. */
27 |
28 | bool bCheatActive = true;
29 | bool bMenuOpened = false;
30 | bool bBhopEnabled = true;
31 | bool bShowBoxes = true;
32 | bool bShowNames = true;
33 | bool bShowWeapons = true;
34 | };
35 |
36 | extern Settings g_Settings;
37 |
38 |
--------------------------------------------------------------------------------
/Antario/Utils/Color.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | struct Color
4 | {
5 | int red, green, blue, alpha;
6 |
7 | constexpr Color() : red(0), green(0), blue(0), alpha(255) { }
8 |
9 | constexpr Color(int r, int g, int b, int a = 255)
10 | : red{ r }, green{ g }, blue{ b }, alpha{ a } { }
11 |
12 | constexpr Color& operator *=(const float coeff)
13 | {
14 | this->red = static_cast(this->red * coeff);
15 | this->green = static_cast(this->green * coeff);
16 | this->blue = static_cast(this->blue * coeff);
17 | return *this;
18 | }
19 |
20 | constexpr Color operator ()(const int a) const
21 | {
22 | return Color(red, green, blue, a);
23 | }
24 |
25 | constexpr Color& operator /=(const float div)
26 | {
27 | const auto flDiv = 1.f / div;
28 | *this *= flDiv;
29 | return *this;
30 | }
31 |
32 | constexpr Color& operator *(const float coeff) const
33 | {
34 | auto color = *this;
35 | return color *= coeff;
36 | }
37 |
38 | constexpr DWORD GetARGB() const
39 | {
40 | return 0;
41 | }
42 |
43 | constexpr Color& FromHSV(float h, float s, float v)
44 | {
45 | float colOut[3]{ };
46 | if (s == 0.0f)
47 | {
48 | red = green = blue = static_cast(v * 255);
49 | return *this;
50 | }
51 |
52 | h = fmodf(h, 1.0f) / (60.0f / 360.0f);
53 | int i = static_cast(h);
54 | float f = h - static_cast(i);
55 | float p = v * (1.0f - s);
56 | float q = v * (1.0f - s * f);
57 | float t = v * (1.0f - s * (1.0f - f));
58 |
59 | switch (i)
60 | {
61 | case 0:
62 | colOut[0] = v;
63 | colOut[1] = t;
64 | colOut[2] = p;
65 | break;
66 | case 1:
67 | colOut[0] = q;
68 | colOut[1] = v;
69 | colOut[2] = p;
70 | break;
71 | case 2:
72 | colOut[0] = p;
73 | colOut[1] = v;
74 | colOut[2] = t;
75 | break;
76 | case 3:
77 | colOut[0] = p;
78 | colOut[1] = q;
79 | colOut[2] = v;
80 | break;
81 | case 4:
82 | colOut[0] = t;
83 | colOut[1] = p;
84 | colOut[2] = v;
85 | break;
86 | case 5: default:
87 | colOut[0] = v;
88 | colOut[1] = p;
89 | colOut[2] = q;
90 | break;
91 | }
92 |
93 | red = static_cast(colOut[0] * 255);
94 | green = static_cast(colOut[1] * 255);
95 | blue = static_cast(colOut[2] * 255);
96 | return *this;
97 | }
98 |
99 | constexpr auto ToHSV(float& h, float& s, float& v)
100 | {
101 | float col[3] = { red / 255.f, green / 255.f, blue / 255.f };
102 |
103 | float K = 0.f;
104 | if (col[1] < col[2])
105 | {
106 | swap(col[1], col[2]);
107 | K = -1.f;
108 | }
109 | if (col[0] < col[1])
110 | {
111 | swap(col[0], col[1]);
112 | K = -2.f / 6.f - K;
113 | }
114 |
115 | const float chroma = col[0] - (col[1] < col[2] ? col[1] : col[2]);
116 | h = colfabs(K + (col[1] - col[2]) / (6.f * chroma + 1e-20f));
117 | s = chroma / (col[0] + 1e-20f);
118 | v = col[0];
119 | }
120 |
121 |
122 | static constexpr Color Black(int a = 255) { return { 0, 0, 0, a }; }
123 | static constexpr Color Grey(int a = 255) { return { 127, 127, 127, a }; }
124 | static constexpr Color White(int a = 255) { return { 255, 255, 255, a }; }
125 | static constexpr Color Red(int a = 255) { return { 255, 0, 0, a }; }
126 | static constexpr Color Green(int a = 255) { return { 0, 255, 0, a }; }
127 | static constexpr Color Blue(int a = 255) { return { 0, 0, 255, a }; }
128 |
129 | private:
130 | constexpr void swap(float& a, float& b) { float tmp = a; a = b; b = tmp; }
131 | constexpr float colfabs(const float& x) { return x < 0 ? x * -1 : x; }
132 |
133 | };
--------------------------------------------------------------------------------
/Antario/Utils/Font.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | #include
6 | #include