SDL_ttf.pdf

(347 KB) Pobierz
20072921 UNPDF
SDLttf
14January2006
JonathanAtkins
20072921.003.png
Copyrightc2003-2005JonathanAtkins
Permissionisgrantedtodistributefreely,orinadistributionofanykind.Alldistributions
ofthisfilemustbeinanunalteredstate,exceptforcorrections.
Thelatestcopyofthisdocumentcanbefoundat http://jcatki.no-ip.org/SDL_ttf
i
TableofContents
1Overview .................................. 1
2GettingStarted ............................ 3
2.1Includes.................................................... 4
2.2Compiling.................................................. 5
3Functions ................................. 6
3.1General..................................................... 7
3.1.1TTFLinkedVersion.................................... 8
3.1.2TTFInit............................................... 9
3.1.3TTFWasInit.......................................... 10
3.1.4TTFQuit............................................. 11
3.1.5TTFSetError......................................... 12
3.1.6TTFGetError........................................ 13
3.2Management............................................... 14
3.2.1TTFOpenFont........................................ 15
3.2.2TTFOpenFontRW.................................... 16
3.2.3TTFOpenFontIndex.................................. 17
3.2.4TTFOpenFontIndexRW............................... 18
3.2.5TTFCloseFont........................................ 19
3.3Attributes................................................. 20
3.3.1TTFByteSwappedUNICODE.......................... 21
3.3.2TTFGetFontStyle..................................... 22
3.3.3TTFSetFontStyle..................................... 23
3.3.4TTFFontHeight...................................... 24
3.3.5TTFFontAscent...................................... 25
3.3.6TTFFontDescent..................................... 26
3.3.7TTFFontLineSkip..................................... 27
3.3.8TTFFontFaces........................................ 28
3.3.9TTFFontFaceIsFixedWidth............................ 29
3.3.10TTFFontFaceFamilyName............................ 30
3.3.11TTFFontFaceStyleName............................. 31
3.3.12TTFGlyphMetrics................................... 32
3.3.13TTFSizeText........................................ 35
3.3.14TTFSizeUTF8....................................... 36
3.3.15TTFSizeUNICODE.................................. 37
3.4Render.................................................... 38
3.4.1TTFRenderTextSolid................................ 39
3.4.2TTFRenderUTF8Solid............................... 40
3.4.3TTFRenderUNICODESolid........................... 41
3.4.4TTFRenderGlyphSolid............................... 42
3.4.5TTFRenderTextShaded.............................. 43
20072921.004.png
ii
3.4.6TTFRenderUTF8Shaded............................. 44
3.4.7TTFRenderUNICODEShaded........................ 45
3.4.8TTFRenderGlyphShaded............................. 46
3.4.9TTFRenderTextBlended.............................. 47
3.4.10TTFRenderUTF8Blended........................... 48
3.4.11TTFRenderUNICODEBlended....................... 49
3.4.12TTFRenderGlyphBlended........................... 50
4Types .................................... 51
4.1TTFFont................................................. 52
5Defines ................................... 53
6Glossary ................................. 54
Index ....................................... 57
20072921.005.png
 
Chapter1:Overview 1
1Overview
ALittleBitAboutMe
Iamcurrently,asIwritethisdocument,aprogrammerforRaytheon.ThereIdoallsorts
ofcommunications,network,GUI,andothergeneralprogrammingtasksinC/C ++ onthe
SolarisandsometimesLinuxOperatingSystems.I’veusedSDLttfasoneofthemany
methodsofputtingtextonmySDLapplications,anduseitinmyownSDLGUIcodeas
well.Whilethisdocumentdoesn’texplainhowandwheretogetfontstouse,itwillexplain
howtousethemwithSDLttf.
Feelfreetocontactme: jcatki@jcatki.no-ip.org
Thelatestversionofthislibraryisavailablefrom:
IamalsousuallyonIRCatirc.freenode.netinthe#SDLchannelasLIM
20072921.001.png 20072921.002.png
 
Zgłoś jeśli naruszono regulamin