Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTF font rendering #17

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
48c0c70
Init font rendering and pcx export
haekb Jan 12, 2020
9a819c8
Actually commit fontmgr.
haekb Jan 13, 2020
75611a5
Some WIP stuff. Loads large font, need to work on spacing.
haekb Jan 13, 2020
d082b03
Font rendering now works, but it needs a clean up.
haekb Jan 13, 2020
1b65a2a
WIP
haekb Jan 14, 2020
240aee1
Working perfectly for fonts that supports all the characters it uses.
haekb Jan 14, 2020
03ffa4d
Put in place a replacement for the interface, and clean some more stu…
haekb Jan 14, 2020
c998aeb
Update Final Release
haekb Jan 14, 2020
7ab1382
Small fix to the hack in MakePCX so it doesn't cover up underscores.
haekb Jan 14, 2020
aeaa4e8
Fix extra height bug in pcx. I should be using width not pitch. Oops!
haekb Jan 15, 2020
2841c31
Plug in scale fonts to resize on resolution change
haekb Jan 15, 2020
76a45ac
Swap out ofstream for SDL_RWops, it's nicer. And also fix the off by …
haekb Jan 16, 2020
177ad08
Fix a small bug where a flag wasn't being cleared, and some useful de…
haekb Jan 16, 2020
5ec7cdc
...row -> column
haekb Jan 16, 2020
d9a0437
Flush all the folders on resolution change
haekb Jan 16, 2020
2c5caa2
Flush some fonts, and don't use old references in others
haekb Jan 16, 2020
bbee608
Update ASSETS/Attributes/LayoutNew.TXT
haekb Jan 16, 2020
66b1707
Slight modification to azure script
haekb Jan 16, 2020
d044819
Merge remote-tracking branch 'origin/ttf-font-rendering' into ttf-fon…
haekb Jan 16, 2020
318855f
Oops. Wrong folder.
haekb Jan 16, 2020
a2b4201
Ok one more edit
haekb Jan 16, 2020
e4287aa
Declare the fonts folder
haekb Jan 16, 2020
f583784
Save font sheets per resolution, first step in caching.
haekb Jan 16, 2020
db19c6d
Don't recreate font sheets that exist already, and if we can't make t…
haekb Jan 16, 2020
8e35a2f
Rebuild the help surface on resolution change
haekb Feb 5, 2020
2b6d45d
WIP
haekb Feb 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ASSETS/Attributes/LayoutNew.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ ScaleName9 = "RoundyMovingMod4"
[FolderPlayer]
FontSize = 0
PageRect = (75,95,585,385)
CharAnim = "LWF"
CharAnim = "UUW"
haekb marked this conversation as resolved.
Show resolved Hide resolved
CharRotation = -30.0
//CharPos = <35.0,-15.0,100.0>
//CharScale = 0.5
Expand Down Expand Up @@ -1634,7 +1634,13 @@ MineDetectScreenTint = <224.0, 224.0, 0.0>
WeaponPickupColor = <80.0, 40.0, 128.0>
AmmoPickupColor = <80.0, 40.0, 128.0>
TintTime = 2.000000
ExpoFont = "interface\fonts\BETHHAND.TTF"
ScaleHelpFont = "..\NOLF\Modernizer\Fonts\font_help.pcx"
ScaleSmallFont = "..\NOLF\Modernizer\Fonts\font_small.pcx"
ScaleMediumFont = "..\NOLF\Modernizer\Fonts\font_medium.pcx"
ScaleLargeFont = "..\NOLF\Modernizer\Fonts\font_large.pcx"
ScaleTitleFont = "..\NOLF\Modernizer\Fonts\font_title.pcx"
ScaleMsgFont = "..\NOLF\Modernizer\Fonts\font_msg.pcx"
ScaleHUDFont = "..\NOLF\Modernizer\Fonts\font_hud.pcx"
HelpFont = "interface\fonts\font_help.pcx"
SmallFontBase = "interface\fonts\font_small_0.pcx"
MediumFontBase = "interface\fonts\font_med_0.pcx"
Expand Down
39 changes: 39 additions & 0 deletions LIBS/SDL2_ttf-2.0.15/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
2.0.15:
Sam Lantinga - Fri Oct 26 13:26:54 PDT 2018
* Updated to FreeType version 2.9.1
Sam Lantinga - Sun Sep 10 00:18:45 PDT 2017
* Text rendering functions now use the alpha component of the text colors
Sam Lantinga - Sat Sep 9 22:21:55 PDT 2017
* Added support for characters greater than 0xFFFF (e.g. emoji) in the UTF-8 APIs

2.0.14:
Ryan Gordon - Fri Jan 29 12:53:29 PST 2016
* Deprecated TTF_GetFontKerningSize() which takes font glyph indices and added TTF_GetFontKerningSizeGlyphs() which takes characters

2.0.13:
Sylvain - Sat Jun 28 11:42:42 2014
* Fixed bug rendering text starting with a glyph with negative starting offset
beuc - Sun Jun 15 18:27:28 2014
* Fixed regression loading non-scalable fonts
Sam Lantinga - Sun Jun 15 18:21:04 PDT 2014
* TTF_GetFontKerningSize() gets kerning between two characters, not two glyph indices
David Ludwig - Sun Apr 13 22:28:26 2014
* Added support for building for Windows RT and Windows Phone

2.0.12:
Sam Lantinga - Sat Jun 1 19:11:26 PDT 2013
* Updated for SDL 2.0 release

2.0.11:
Sam Lantinga - Sat Dec 31 10:49:42 EST 2011
* SDL_ttf is now under the zlib license
Peter Kosyh - Mon Feb 28 14:57:03 PST 2011
* Improved font glyph caching for non-latin languages
Erik Snoek - Wed Jan 12 09:10:15 PST 2011
* Added API to get kerning info: TTF_GetFontKerningSize()
Sam Lantinga - Mon Jan 10 10:58:34 2011 -0800
* Added Android.mk to build on the Android platform

2.0.10:
Adam Strzelecki - Wed Oct 21 21:02:37 PDT 2009
* Find the Unicode or symbol character map if it's available in the font
20 changes: 20 additions & 0 deletions LIBS/SDL2_ttf-2.0.15/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
25 changes: 25 additions & 0 deletions LIBS/SDL2_ttf-2.0.15/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

This library is a wrapper around the excellent FreeType 2.0 library,
available at:
http://www.freetype.org/

This library allows you to use TrueType fonts to render text in SDL
applications.

To make the library, first install the FreeType library, then type
'./configure' then 'make' to build the SDL truetype library and the
showfont and glfont example applications.

Be careful when including fonts with your application, as many of them
are copyrighted. The Microsoft fonts, for example, are not freely
redistributable and even the free "web" fonts they provide are only
redistributable in their special executable installer form (May 1998).
There are plenty of freeware and shareware fonts available on the Internet
though, and may suit your purposes.

This library is under the zlib license, see the file "COPYING.txt" for details.

Portions of this software are copyright © 2013 The FreeType Project (www.freetype.org). All rights reserved.

Enjoy!
-Sam Lantinga <[email protected]> (6/20/2001)
Loading