Updated version 1.1.0 from 'upstream/1.1.0'
with Debian dir fcd845dff0d35e807c6a329c4200db4ba75f8f97
Andrew Caudwell
6 years ago
0 | 1.1.0: | |
1 | * Fixed rendering of FreeMonoBold with FreeType2 2.8 by disabling hinting. | |
2 | * Updated fonts. | |
3 | ||
0 | 4 | 1.0.9: |
1 | 5 | * Fixed compilation issues on FreeBSD (ehaupt) and OpenBSD (gonzalo-). |
2 | 6 | * Fixed config change not being detected in some cases. |
0 | 0 | #! /bin/sh |
1 | 1 | # 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. | |
3 | 3 | # |
4 | 4 | # Report bugs to <acaudwell@gmail.com>. |
5 | 5 | # |
579 | 579 | # Identity of this package. |
580 | 580 | PACKAGE_NAME='Logstalgia' |
581 | 581 | 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' | |
584 | 584 | PACKAGE_BUGREPORT='acaudwell@gmail.com' |
585 | 585 | PACKAGE_URL='' |
586 | 586 | |
1337 | 1337 | # Omit some internal or obsolete options to make the list less imposing. |
1338 | 1338 | # This message is too long to be a string in the A/UX 3.1 sh. |
1339 | 1339 | 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. | |
1341 | 1341 | |
1342 | 1342 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1343 | 1343 | |
1412 | 1412 | |
1413 | 1413 | if test -n "$ac_init_help"; then |
1414 | 1414 | 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:";; | |
1416 | 1416 | esac |
1417 | 1417 | cat <<\_ACEOF |
1418 | 1418 | |
1534 | 1534 | test -n "$ac_init_help" && exit $ac_status |
1535 | 1535 | if $ac_init_version; then |
1536 | 1536 | cat <<\_ACEOF |
1537 | Logstalgia configure 1.0.9 | |
1537 | Logstalgia configure 1.1.0 | |
1538 | 1538 | generated by GNU Autoconf 2.69 |
1539 | 1539 | |
1540 | 1540 | Copyright (C) 2012 Free Software Foundation, Inc. |
2146 | 2146 | This file contains any messages produced by compilers while |
2147 | 2147 | running configure, to aid debugging if configure makes a mistake. |
2148 | 2148 | |
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 | |
2150 | 2150 | generated by GNU Autoconf 2.69. Invocation command line was |
2151 | 2151 | |
2152 | 2152 | $ $0 $@ |
3011 | 3011 | |
3012 | 3012 | # Define the identity of the package. |
3013 | 3013 | PACKAGE='logstalgia' |
3014 | VERSION='1.0.9' | |
3014 | VERSION='1.1.0' | |
3015 | 3015 | |
3016 | 3016 | |
3017 | 3017 | cat >>confdefs.h <<_ACEOF |
7757 | 7757 | # report actual input values of CONFIG_FILES etc. instead of their |
7758 | 7758 | # values after options handling. |
7759 | 7759 | 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 | |
7761 | 7761 | generated by GNU Autoconf 2.69. Invocation command line was |
7762 | 7762 | |
7763 | 7763 | CONFIG_FILES = $CONFIG_FILES |
7814 | 7814 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
7815 | 7815 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
7816 | 7816 | ac_cs_version="\\ |
7817 | Logstalgia config.status 1.0.9 | |
7817 | Logstalgia config.status 1.1.0 | |
7818 | 7818 | configured by $0, generated by GNU Autoconf 2.69, |
7819 | 7819 | with options \\"\$ac_cs_config\\" |
7820 | 7820 |
2 | 2 | |
3 | 3 | AC_PREREQ(2.61) |
4 | 4 | |
5 | AC_INIT(Logstalgia, 1.0.9, [acaudwell@gmail.com]) | |
5 | AC_INIT(Logstalgia, 1.1.0, [acaudwell@gmail.com]) | |
6 | 6 | AC_CONFIG_AUX_DIR([build-aux]) |
7 | 7 | AC_CONFIG_SRCDIR([src/main.cpp]) |
8 | 8 |
Binary diff not shown
Binary diff not shown
14 | 14 | Coverage |
15 | 15 | -------- |
16 | 16 | |
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 | |
32 | 31 | etc. |
32 | For more detail see <http://www.gnu.org/software/freefont/coverage.html> | |
33 | 33 | |
34 | 34 | Editing |
35 | 35 | ------- |
36 | 36 | |
37 | The free outline font editor, George Williams's FontForge | |
37 | The free outline font editor, George Williams' FontForge | |
38 | 38 | <http://fontforge.sourceforge.net/> is used for editing the fonts. |
39 | 39 | |
40 | 40 | Design Issues |
43 | 43 | Which font shapes should be made? Historical style terms like Renaissance |
44 | 44 | or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek |
45 | 45 | 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. | |
47 | 49 | |
48 | 50 | 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. | |
52 | 54 | |
53 | 55 | Accordingly, the FreeFont family has one monospaced - FreeMono - and two |
54 | 56 | proportional faces (one with uniform stroke - FreeSans - and one with |
55 | 57 | modulated stroke - FreeSerif). |
56 | 58 | |
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. | |
59 | 62 | |
60 | 63 | Licensing |
61 | 64 | --------- |
62 | 65 | |
63 | 66 | Free UCS scalable fonts is free software; you can redistribute it and/or |
64 | 67 | 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 | |
66 | 69 | (at your option) any later version. |
67 | 70 | |
68 | 71 | The fonts are distributed in the hope that they will be useful, but |
83 | 86 | version of the font, but you are not obligated to do so. If you do not |
84 | 87 | wish to do so, delete this exception statement from your version. |
85 | 88 | |
86 | ||
87 | 89 | Files and their suffixes |
88 | 90 | ------------------------ |
89 | 91 | |
90 | 92 | 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. | |
92 | 94 | |
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. | |
96 | 98 | |
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. | |
100 | 102 | |
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 | |
101 | 121 | |
102 | 122 | -------------------------------------------------------------------------- |
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> | |
105 | 125 | |
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 $ |
62 | 62 | this->chr = chr; |
63 | 63 | this->ftglyph = 0; |
64 | 64 | |
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 ); | |
68 | 68 | |
69 | 69 | //debugLog("FXGlyph %x %d %d", chr, chr, index); |
70 | 70 | |
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; | |
78 | 78 | height = glm::ceil(metrics->height / 64.0); |
79 | 79 | |
80 | 80 | FT_Glyph_To_Bitmap( &ftglyph, FT_RENDER_MODE_NORMAL, 0, 1 ); |
83 | 83 | |
84 | 84 | dims = vec2( glyph_bitmap->bitmap.width, glyph_bitmap->bitmap.rows) + vec2(2.0f, 2.0f); |
85 | 85 | 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); | |
87 | 87 | |
88 | 88 | vertex_positions[0] = vec2(0.0f, 0.0f); |
89 | 89 | vertex_positions[1] = vec2(dims.x, 0.0f); |
203 | 203 | |
204 | 204 | //FXGlyphSet |
205 | 205 | |
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) { | |
207 | 207 | this->freetype = freetype; |
208 | 208 | this->fontfile = fontfile; |
209 | 209 | this->size = size; |
210 | 210 | this->dpi = dpi; |
211 | this->ftface = 0; | |
211 | this->ft_flags = ft_flags; | |
212 | this->ft_face = 0; | |
212 | 213 | |
213 | 214 | this->tab_width = 4.0f; |
214 | 215 | this->max_height = 0; |
217 | 218 | } |
218 | 219 | |
219 | 220 | FXGlyphSet::~FXGlyphSet() { |
220 | if(ftface!=0) FT_Done_Face(ftface); | |
221 | if(ft_face!=0) FT_Done_Face(ft_face); | |
221 | 222 | |
222 | 223 | for(std::vector<FXGlyphPage*>::iterator it = pages.begin(); it != pages.end(); it++) { |
223 | 224 | delete (*it); |
232 | 233 | |
233 | 234 | void FXGlyphSet::init() { |
234 | 235 | |
235 | if(FT_New_Face(freetype, fontfile.c_str(), 0, &ftface)) { | |
236 | if(FT_New_Face(freetype, fontfile.c_str(), 0, &ft_face)) { | |
236 | 237 | throw FXFontException(fontfile); |
237 | 238 | } |
238 | 239 | |
239 | 240 | int ft_font_size = 64 * size; |
240 | 241 | |
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); | |
246 | 247 | |
247 | 248 | precache("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;:'\",<.>/?-_=+!@#$%^&*()\\ "); |
248 | 249 | } |
312 | 313 | } |
313 | 314 | |
314 | 315 | float FXGlyphSet::getMaxWidth() const { |
315 | return ftface->size->metrics.max_advance / 64.0f; | |
316 | return ft_face->size->metrics.max_advance / 64.0f; | |
316 | 317 | } |
317 | 318 | |
318 | 319 | float FXGlyphSet::getMaxHeight() const { |
631 | 632 | fonts.clear(); |
632 | 633 | } |
633 | 634 | |
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) { | |
635 | 636 | |
636 | 637 | if(font_dir.size()>0 && font_file[0] != '/') { |
637 | 638 | font_file = font_dir + font_file; |
651 | 652 | FXGlyphSet* glyphset; |
652 | 653 | |
653 | 654 | 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); | |
655 | 656 | sizemap->insert(std::pair<int,FXGlyphSet*>(size,glyphset)); |
656 | 657 | } else { |
657 | 658 | glyphset = ft_it->second; |
126 | 126 | |
127 | 127 | class FXGlyphSet { |
128 | 128 | FT_Library freetype; |
129 | FT_Face ftface; | |
129 | FT_Face ft_face; | |
130 | FT_Int32 ft_flags; | |
130 | 131 | std::string fontfile; |
131 | 132 | int max_height; |
132 | 133 | int size; |
133 | 134 | int dpi; |
134 | 135 | float tab_width; |
135 | 136 | vec2 unit_scale; |
136 | ||
137 | 137 | bool pre_caching; |
138 | 138 | |
139 | 139 | std::vector<FXGlyphPage*> pages; |
143 | 143 | void init(); |
144 | 144 | FXGlyph* getGlyph(unsigned int chr); |
145 | 145 | 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); | |
147 | 147 | ~FXGlyphSet(); |
148 | 148 | |
149 | 149 | void precache(const std::string& chars); |
150 | 150 | |
151 | FT_Face getFTFace() const { return ftface; } | |
151 | FT_Face getFTFace() const { return ft_face; } | |
152 | FT_Int32 getFlags() const { return ft_flags; } | |
152 | 153 | |
153 | 154 | const std::string& getFontFile() const { return fontfile; } |
154 | 155 | |
250 | 251 | void commitBuffer(); |
251 | 252 | void drawBuffer(); |
252 | 253 | |
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); | |
254 | 255 | }; |
255 | 256 | |
256 | 257 | extern FXFontManager fontmanager; |
1061 | 1061 | void Logstalgia::init() { |
1062 | 1062 | |
1063 | 1063 | 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); | |
1067 | 1067 | |
1068 | 1068 | fontLarge.dropShadow(true); |
1069 | 1069 | fontMedium.dropShadow(true); |
17 | 17 | #ifndef LOGSTALGIA_SETTINGS_H |
18 | 18 | #define LOGSTALGIA_SETTINGS_H |
19 | 19 | |
20 | #define LOGSTALGIA_VERSION "1.0.9" | |
20 | #define LOGSTALGIA_VERSION "1.1.0" | |
21 | 21 | |
22 | 22 | #include "core/settings.h" |
23 | 23 |
21 | 21 | PositionSlider::PositionSlider(float percent) { |
22 | 22 | this->percent = percent; |
23 | 23 | |
24 | font = fontmanager.grab("FreeMonoBold.ttf", 16); | |
24 | font = fontmanager.grab("FreeMonoBold.ttf", 16, 72, FT_LOAD_NO_HINTING); | |
25 | 25 | font.dropShadow(true); |
26 | 26 | |
27 | 27 | slidercol = vec3(1.0, 1.0, 1.0); |
15 | 15 | |
16 | 16 | void LogstalgiaTester::runTests() { |
17 | 17 | |
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); | |
19 | 19 | |
20 | 20 | display.width = 1024; |
21 | display.height = 768; | |
21 | display.height = 768; | |
22 | 22 | |
23 | 23 | int max_depth = 0; |
24 | 24 | int abbreviation_depth = 0; |