Codebase list logstalgia / 2a61d45
Updated version 1.1.0 from 'upstream/1.1.0' with Debian dir fcd845dff0d35e807c6a329c4200db4ba75f8f97 Andrew Caudwell 6 years ago
12 changed file(s) with 106 addition(s) and 81 deletion(s). Raw diff Collapse all Expand all
0 1.1.0:
1 * Fixed rendering of FreeMonoBold with FreeType2 2.8 by disabling hinting.
2 * Updated fonts.
3
04 1.0.9:
15 * Fixed compilation issues on FreeBSD (ehaupt) and OpenBSD (gonzalo-).
26 * Fixed config change not being detected in some cases.
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for Logstalgia 1.0.9.
2 # Generated by GNU Autoconf 2.69 for Logstalgia 1.1.0.
33 #
44 # Report bugs to <acaudwell@gmail.com>.
55 #
579579 # Identity of this package.
580580 PACKAGE_NAME='Logstalgia'
581581 PACKAGE_TARNAME='logstalgia'
582 PACKAGE_VERSION='1.0.9'
583 PACKAGE_STRING='Logstalgia 1.0.9'
582 PACKAGE_VERSION='1.1.0'
583 PACKAGE_STRING='Logstalgia 1.1.0'
584584 PACKAGE_BUGREPORT='acaudwell@gmail.com'
585585 PACKAGE_URL=''
586586
13371337 # Omit some internal or obsolete options to make the list less imposing.
13381338 # This message is too long to be a string in the A/UX 3.1 sh.
13391339 cat <<_ACEOF
1340 \`configure' configures Logstalgia 1.0.9 to adapt to many kinds of systems.
1340 \`configure' configures Logstalgia 1.1.0 to adapt to many kinds of systems.
13411341
13421342 Usage: $0 [OPTION]... [VAR=VALUE]...
13431343
14121412
14131413 if test -n "$ac_init_help"; then
14141414 case $ac_init_help in
1415 short | recursive ) echo "Configuration of Logstalgia 1.0.9:";;
1415 short | recursive ) echo "Configuration of Logstalgia 1.1.0:";;
14161416 esac
14171417 cat <<\_ACEOF
14181418
15341534 test -n "$ac_init_help" && exit $ac_status
15351535 if $ac_init_version; then
15361536 cat <<\_ACEOF
1537 Logstalgia configure 1.0.9
1537 Logstalgia configure 1.1.0
15381538 generated by GNU Autoconf 2.69
15391539
15401540 Copyright (C) 2012 Free Software Foundation, Inc.
21462146 This file contains any messages produced by compilers while
21472147 running configure, to aid debugging if configure makes a mistake.
21482148
2149 It was created by Logstalgia $as_me 1.0.9, which was
2149 It was created by Logstalgia $as_me 1.1.0, which was
21502150 generated by GNU Autoconf 2.69. Invocation command line was
21512151
21522152 $ $0 $@
30113011
30123012 # Define the identity of the package.
30133013 PACKAGE='logstalgia'
3014 VERSION='1.0.9'
3014 VERSION='1.1.0'
30153015
30163016
30173017 cat >>confdefs.h <<_ACEOF
77577757 # report actual input values of CONFIG_FILES etc. instead of their
77587758 # values after options handling.
77597759 ac_log="
7760 This file was extended by Logstalgia $as_me 1.0.9, which was
7760 This file was extended by Logstalgia $as_me 1.1.0, which was
77617761 generated by GNU Autoconf 2.69. Invocation command line was
77627762
77637763 CONFIG_FILES = $CONFIG_FILES
78147814 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
78157815 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
78167816 ac_cs_version="\\
7817 Logstalgia config.status 1.0.9
7817 Logstalgia config.status 1.1.0
78187818 configured by $0, generated by GNU Autoconf 2.69,
78197819 with options \\"\$ac_cs_config\\"
78207820
22
33 AC_PREREQ(2.61)
44
5 AC_INIT(Logstalgia, 1.0.9, [acaudwell@gmail.com])
5 AC_INIT(Logstalgia, 1.1.0, [acaudwell@gmail.com])
66 AC_CONFIG_AUX_DIR([build-aux])
77 AC_CONFIG_SRCDIR([src/main.cpp])
88
Binary diff not shown
1414 Coverage
1515 --------
1616
17 FreeFont covers the following character sets
18
19 * ISO 8859 parts 1-15
20 * CEN MES-3 European Unicode Subset
21 http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
22 * IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
23 * Microsoft/Adobe Windows Glyph List 4 (WGL4)
24 http://www.microsoft.com/typography/otspec/WGL4.htm
25 * KOI8-R and KOI8-RU
26 * DEC VT100 graphics symbols
27 * International Phonetic Alphabet
28 * Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
29 including Arabic presentation forms A/B
30 * mathematical symbols, including the whole TeX repertoire of symbols
31 * APL symbols
17 FreeFont covers the following character ranges
18 * Latin, Cyrillic, and Arabic, with supplements for many languages
19 * Greek, Hebrew, Armenian, Georgian, Thaana, Syriac
20 * Devanagari, Bengali, Gujarati, Gurmukhi, Sinhala, Tamil, Malayalam
21 * Thai, Tai Le, Kayah Li, Hanunóo, Buginese
22 * Cherokee, Unified Canadian Aboriginal Syllabics
23 * Ethiopian, Tifnagh, Vai, Osmanya, Coptic
24 * Glagolitic, Gothic, Runic, Ugaritic, Old Persian, Phoenician, Old Italic
25 * Braille, International Phonetic Alphabet
26 * currency symbols, general punctuation and diacritical marks, dingbats
27 * mathematical symbols, including much of the TeX repertoire of symbols
28 * technical symbols: APL, OCR, arrows,
29 * geometrical shapes, box drawing
30 * musical symbols, gaming symbols, miscellaneous symbols
3231 etc.
32 For more detail see <http://www.gnu.org/software/freefont/coverage.html>
3333
3434 Editing
3535 -------
3636
37 The free outline font editor, George Williams's FontForge
37 The free outline font editor, George Williams' FontForge
3838 <http://fontforge.sourceforge.net/> is used for editing the fonts.
3939
4040 Design Issues
4343 Which font shapes should be made? Historical style terms like Renaissance
4444 or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
4545 scripts to any greater extent than Kufi or Nashki can be applied beyond
46 Arabic script; "italic" is really only meaningful for Latin letters.
46 Arabic script; "italic" is strictly meaningful only for Latin letters,
47 although many scripts such as Cyrillic have a history with "cursive" and
48 many others with "oblique" faces.
4749
4850 However, most modern writing systems have typographic formulations for
49 contrasting uniform and modulated character stroke widths, and have some
50 history with "oblique", faces. Since the advent of the typewriter, most
51 have developed a typographic style with uniform-width characters.
51 contrasting uniform and modulated character stroke widths, and since the
52 advent of the typewriter, most have developed a typographic style with
53 uniform-width characters.
5254
5355 Accordingly, the FreeFont family has one monospaced - FreeMono - and two
5456 proportional faces (one with uniform stroke - FreeSans - and one with
5557 modulated stroke - FreeSerif).
5658
57 To make text from different writing systems look good side-by-side, each
58 FreeFont face is meant to contain characters of similar style and weight.
59 The point of having characters from different writing systems in one font
60 is that mixed text should look good, and so each FreeFont face contains
61 characters of similar style and weight.
5962
6063 Licensing
6164 ---------
6265
6366 Free UCS scalable fonts is free software; you can redistribute it and/or
6467 modify it under the terms of the GNU General Public License as published
65 by the Free Software Foundation; either version 2 of the License, or
68 by the Free Software Foundation; either version 3 of the License, or
6669 (at your option) any later version.
6770
6871 The fonts are distributed in the hope that they will be useful, but
8386 version of the font, but you are not obligated to do so. If you do not
8487 wish to do so, delete this exception statement from your version.
8588
86
8789 Files and their suffixes
8890 ------------------------
8991
9092 The files with .sfd (Spline Font Database) are in FontForge's native format.
91 Please use these if you plan to modify the font files.
93 They may be used to modify the fonts.
9294
93 TrueType fonts for immediate consumption are the files with the .ttf
94 (TrueType Font) suffix. These are ready to use in Xwindows based
95 systems using FreeType, on Mac OS, and on older Windows systems.
95 TrueType fonts are the files with the .ttf (TrueType Font) suffix. These
96 are ready to use in Linux/Unix, on Apple Mac OS, and on Microsoft Windows
97 systems.
9698
97 OpenType fonts (with suffix .otf) are for use in Windows Vista.
98 Note that although they can be installed on Linux, but many applications
99 in Linux still don't support them.
99 OpenType fonts (with suffix .otf) are preferred for use on Linux/Unix,
100 but *not* for recent Microsoft Windows systems.
101 See the INSTALL file for more information.
100102
103 Web Open Font Format files (with suffix .woff) are for use in Web sites.
104 See the webfont_guidelines.txt for further information.
105
106 Further information
107 -------------------
108
109 Home page of GNU FreeFont:
110 http://www.gnu.org/software/freefont/
111
112 More information is at the main project page of Free UCS scalable fonts:
113 http://savannah.gnu.org/projects/freefont/
114
115 To report problems with GNU FreeFont, it is best to obtain a Savannah
116 account and post reports using that account on
117 https://savannah.gnu.org/bugs/
118
119 Public discussions about GNU FreeFont may be posted to the mailing list
120 freefont-bugs@gnu.org
101121
102122 --------------------------------------------------------------------------
103 Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
104 Steve White <stevan.white@googlemail.com>
123 Original author: Primoz Peterlin
124 Current administrator: Steve White <stevan.white@googlemail.com>
105125
106 Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
107 $Id: README,v 1.6 2008/12/25 12:51:41 Stevan_White Exp $
126 $Id: README,v 1.10 2011-06-12 07:14:12 Stevan_White Exp $
6262 this->chr = chr;
6363 this->ftglyph = 0;
6464
65 FT_Face ftface = set->getFTFace();
66
67 FT_UInt index = FT_Get_Char_Index( ftface, chr );
65 FT_Face ft_face = set->getFTFace();
66
67 FT_UInt index = FT_Get_Char_Index( ft_face, chr );
6868
6969 //debugLog("FXGlyph %x %d %d", chr, chr, index);
7070
71 if(FT_Load_Glyph( ftface, index, FT_LOAD_DEFAULT ))
72 throw FXFontException(ftface->family_name);
73
74 if(FT_Get_Glyph( ftface->glyph, &ftglyph ))
75 throw FXFontException(ftface->family_name);
76
77 FT_Glyph_Metrics *metrics = &ftface->glyph->metrics;
71 if(FT_Load_Glyph( ft_face, index, set->getFlags()))
72 throw FXFontException(ft_face->family_name);
73
74 if(FT_Get_Glyph( ft_face->glyph, &ftglyph ))
75 throw FXFontException(ft_face->family_name);
76
77 FT_Glyph_Metrics *metrics = &ft_face->glyph->metrics;
7878 height = glm::ceil(metrics->height / 64.0);
7979
8080 FT_Glyph_To_Bitmap( &ftglyph, FT_RENDER_MODE_NORMAL, 0, 1 );
8383
8484 dims = vec2( glyph_bitmap->bitmap.width, glyph_bitmap->bitmap.rows) + vec2(2.0f, 2.0f);
8585 corner = vec2( glyph_bitmap->left, -glyph_bitmap->top) + vec2(0.5, -0.5);
86 advance = vec2( ftface->glyph->advance.x >> 6, ftface->glyph->advance.y >> 6);
86 advance = vec2( ft_face->glyph->advance.x >> 6, ft_face->glyph->advance.y >> 6);
8787
8888 vertex_positions[0] = vec2(0.0f, 0.0f);
8989 vertex_positions[1] = vec2(dims.x, 0.0f);
203203
204204 //FXGlyphSet
205205
206 FXGlyphSet::FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi) {
206 FXGlyphSet::FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi, FT_Int32 ft_flags) {
207207 this->freetype = freetype;
208208 this->fontfile = fontfile;
209209 this->size = size;
210210 this->dpi = dpi;
211 this->ftface = 0;
211 this->ft_flags = ft_flags;
212 this->ft_face = 0;
212213
213214 this->tab_width = 4.0f;
214215 this->max_height = 0;
217218 }
218219
219220 FXGlyphSet::~FXGlyphSet() {
220 if(ftface!=0) FT_Done_Face(ftface);
221 if(ft_face!=0) FT_Done_Face(ft_face);
221222
222223 for(std::vector<FXGlyphPage*>::iterator it = pages.begin(); it != pages.end(); it++) {
223224 delete (*it);
232233
233234 void FXGlyphSet::init() {
234235
235 if(FT_New_Face(freetype, fontfile.c_str(), 0, &ftface)) {
236 if(FT_New_Face(freetype, fontfile.c_str(), 0, &ft_face)) {
236237 throw FXFontException(fontfile);
237238 }
238239
239240 int ft_font_size = 64 * size;
240241
241 FT_Set_Char_Size( ftface, ft_font_size, ft_font_size, dpi, dpi );
242
243 double em_size = 1.0 * ftface->units_per_EM;
244
245 unit_scale = vec2( ftface->size->metrics.x_ppem / em_size, ftface->size->metrics.y_ppem / em_size);
242 FT_Set_Char_Size( ft_face, ft_font_size, ft_font_size, dpi, dpi );
243
244 double em_size = 1.0 * ft_face->units_per_EM;
245
246 unit_scale = vec2( ft_face->size->metrics.x_ppem / em_size, ft_face->size->metrics.y_ppem / em_size);
246247
247248 precache("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;:'\",<.>/?-_=+!@#$%^&*()\\ ");
248249 }
312313 }
313314
314315 float FXGlyphSet::getMaxWidth() const {
315 return ftface->size->metrics.max_advance / 64.0f;
316 return ft_face->size->metrics.max_advance / 64.0f;
316317 }
317318
318319 float FXGlyphSet::getMaxHeight() const {
631632 fonts.clear();
632633 }
633634
634 FXFont FXFontManager::grab(std::string font_file, int size, int dpi) {
635 FXFont FXFontManager::grab(std::string font_file, int size, int dpi, FT_Int32 ft_flags) {
635636
636637 if(font_dir.size()>0 && font_file[0] != '/') {
637638 font_file = font_dir + font_file;
651652 FXGlyphSet* glyphset;
652653
653654 if(ft_it == sizemap->end()) {
654 glyphset = new FXGlyphSet(library, font_file.c_str(), size, dpi);
655 glyphset = new FXGlyphSet(library, font_file.c_str(), size, dpi, ft_flags);
655656 sizemap->insert(std::pair<int,FXGlyphSet*>(size,glyphset));
656657 } else {
657658 glyphset = ft_it->second;
126126
127127 class FXGlyphSet {
128128 FT_Library freetype;
129 FT_Face ftface;
129 FT_Face ft_face;
130 FT_Int32 ft_flags;
130131 std::string fontfile;
131132 int max_height;
132133 int size;
133134 int dpi;
134135 float tab_width;
135136 vec2 unit_scale;
136
137137 bool pre_caching;
138138
139139 std::vector<FXGlyphPage*> pages;
143143 void init();
144144 FXGlyph* getGlyph(unsigned int chr);
145145 public:
146 FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi);
146 FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi, FT_Int32 ft_flags);
147147 ~FXGlyphSet();
148148
149149 void precache(const std::string& chars);
150150
151 FT_Face getFTFace() const { return ftface; }
151 FT_Face getFTFace() const { return ft_face; }
152 FT_Int32 getFlags() const { return ft_flags; }
152153
153154 const std::string& getFontFile() const { return fontfile; }
154155
250251 void commitBuffer();
251252 void drawBuffer();
252253
253 FXFont grab(std::string font_file, int size, int dpi = 72);
254 FXFont grab(std::string font_file, int size, int dpi = 72, FT_Int32 ft_flags = FT_LOAD_DEFAULT);
254255 };
255256
256257 extern FXFontManager fontmanager;
10611061 void Logstalgia::init() {
10621062
10631063 fontLarge = fontmanager.grab("FreeSerif.ttf", 42);
1064 fontMedium = fontmanager.grab("FreeMonoBold.ttf", 16);
1065 fontBall = fontmanager.grab("FreeMonoBold.ttf", 16);
1066 fontSmall = fontmanager.grab("FreeMonoBold.ttf", settings.font_size);
1064 fontMedium = fontmanager.grab("FreeMonoBold.ttf", 16, 72, FT_LOAD_NO_HINTING);
1065 fontBall = fontmanager.grab("FreeMonoBold.ttf", 16, 72, FT_LOAD_NO_HINTING);
1066 fontSmall = fontmanager.grab("FreeMonoBold.ttf", settings.font_size, 72, FT_LOAD_NO_HINTING);
10671067
10681068 fontLarge.dropShadow(true);
10691069 fontMedium.dropShadow(true);
1717 #ifndef LOGSTALGIA_SETTINGS_H
1818 #define LOGSTALGIA_SETTINGS_H
1919
20 #define LOGSTALGIA_VERSION "1.0.9"
20 #define LOGSTALGIA_VERSION "1.1.0"
2121
2222 #include "core/settings.h"
2323
2121 PositionSlider::PositionSlider(float percent) {
2222 this->percent = percent;
2323
24 font = fontmanager.grab("FreeMonoBold.ttf", 16);
24 font = fontmanager.grab("FreeMonoBold.ttf", 16, 72, FT_LOAD_NO_HINTING);
2525 font.dropShadow(true);
2626
2727 slidercol = vec3(1.0, 1.0, 1.0);
1515
1616 void LogstalgiaTester::runTests() {
1717
18 FXFont font = fontmanager.grab("FreeMonoBold.ttf", settings.font_size);
18 FXFont font = fontmanager.grab("FreeMonoBold.ttf", settings.font_size, 72, FT_LOAD_NO_HINTING);
1919
2020 display.width = 1024;
21 display.height = 768;
21 display.height = 768;
2222
2323 int max_depth = 0;
2424 int abbreviation_depth = 0;