| 1 |
{ |
| 2 |
Copyright 2001-2023 Michalis Kamburelis. |
| 3 |
|
| 4 |
This file is part of "Castle Game Engine". |
| 5 |
|
| 6 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 7 |
included in this distribution, for details about the copyright. |
| 8 |
|
| 9 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
---------------------------------------------------------------------------- |
| 14 |
} |
| 15 |
|
| 16 |
{ Fonts (TCastleAbstractFont, TCastleFont, TCastleBitmapFont, TCastleFontFamily and friends). } |
| 17 |
unit CastleFonts; |
| 18 |
|
| 19 |
{$I castleconf.inc} |
| 20 |
|
| 21 |
interface |
| 22 |
|
| 23 |
uses SysUtils, Classes, Generics.Collections, Contnrs, |
| 24 |
CastleGLImages, CastleStringUtils, CastleColors, CastleVectors, |
| 25 |
CastleTextureFontData, CastleImages, CastleUnicode, CastleRectangles, |
| 26 |
CastleApplicationProperties, CastleClassUtils; |
| 27 |
|
| 28 |
{$define read_interface} |
| 29 |
{$I castlefonts_abstractfont.inc} |
| 30 |
{$I castlefonts_bitmapfont.inc} |
| 31 |
{$I castlefonts_fontfamily.inc} |
| 32 |
{$I castlefonts_font.inc} |
| 33 |
{$I castlefonts_fontsizevariants.inc} |
| 34 |
{$I castlefonts_miscellaneous.inc} |
| 35 |
{$undef read_interface} |
| 36 |
|
| 37 |
implementation |
| 38 |
|
| 39 |
uses Math, {$ifndef FPC} Character,{$endif} |
| 40 |
CastleGLUtils, CastleUtils, CastleComponentSerialize, CastleInternalRichText, |
| 41 |
CastleLog, CastleUriUtils, CastleRenderContext, CastleInternalGLUtils; |
| 42 |
|
| 43 |
{$define read_implementation} |
| 44 |
{$I castlefonts_miscellaneous.inc} // must be first at implementation, to define some internal consts |
| 45 |
{$I castlefonts_abstractfont.inc} |
| 46 |
{$I castlefonts_bitmapfont.inc} |
| 47 |
{$I castlefonts_fontfamily.inc} |
| 48 |
{$I castlefonts_font.inc} |
| 49 |
{$I castlefonts_fontsizevariants.inc} |
| 50 |
{$undef read_implementation} |
| 51 |
|
| 52 |
initialization |
| 53 |
RegisterSerializableComponent(TCastleFont, 'Font'); |
| 54 |
RegisterSerializableComponent(TCastleBitmapFont, 'Bitmap Font'); |
| 55 |
RegisterSerializableComponent(TCastleFontFamily, 'Font Family'); |
| 56 |
end. |