diff options
author | Mathias Gumz <akira@fluxbox.org> | 2015-01-10 21:57:00 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-01-10 21:57:00 (GMT) |
commit | dc9793c90af75fd6e3d3e512abc2167a5544caba (patch) | |
tree | a4f3488a2bc19f182e426d7d6debd6bc3ce40ceb /src/FbTk/Font.cc | |
parent | b16528de87e80dcd1ae9f70c8c76fd8da722d2da (diff) | |
download | fluxbox-dc9793c90af75fd6e3d3e512abc2167a5544caba.zip fluxbox-dc9793c90af75fd6e3d3e512abc2167a5544caba.tar.bz2 |
Code cleanup
Reorder some includes; remove unused includes
Diffstat (limited to 'src/FbTk/Font.cc')
-rw-r--r-- | src/FbTk/Font.cc | 52 |
1 files changed, 16 insertions, 36 deletions
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index 98fcc4f..0164e77 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc | |||
@@ -19,11 +19,13 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | #include "StringUtil.hh" | ||
23 | #include "stringstream.hh" | ||
24 | #include "Font.hh" | 22 | #include "Font.hh" |
25 | #include "FontImp.hh" | 23 | #include "FontImp.hh" |
24 | #include "StringUtil.hh" | ||
25 | #include "stringstream.hh" | ||
26 | #include "App.hh" | 26 | #include "App.hh" |
27 | #include "GContext.hh" | ||
28 | #include "XFontImp.hh" | ||
27 | 29 | ||
28 | // for antialias | 30 | // for antialias |
29 | #ifdef USE_XFT | 31 | #ifdef USE_XFT |
@@ -35,42 +37,21 @@ | |||
35 | #include "XmbFontImp.hh" | 37 | #include "XmbFontImp.hh" |
36 | #endif //USE_XMB | 38 | #endif //USE_XMB |
37 | 39 | ||
38 | // standard font system | 40 | #include <cstring> |
39 | #include "XFontImp.hh" | 41 | #include <cstdlib> |
40 | |||
41 | #include "GContext.hh" | ||
42 | |||
43 | #ifndef __USE_GNU | ||
44 | #define __USE_GNU | ||
45 | #endif //__USE_GNU | ||
46 | |||
47 | #ifdef HAVE_CSTRING | ||
48 | #include <cstring> | ||
49 | #else | ||
50 | #include <string.h> | ||
51 | #endif | ||
52 | #ifdef HAVE_CSTDLIB | ||
53 | #include <cstdlib> | ||
54 | #else | ||
55 | #include <stdlib.h> | ||
56 | #endif | ||
57 | #include <list> | 42 | #include <list> |
58 | #include <map> | 43 | #include <map> |
59 | #include <typeinfo> | 44 | #include <typeinfo> |
60 | #include <langinfo.h> | 45 | #include <langinfo.h> |
61 | #include <cstdio> | ||
62 | 46 | ||
63 | #include <errno.h> | 47 | #ifdef HAVE_SETLOCALE |
48 | #include <locale.h> | ||
49 | #endif //HAVE_SETLOCALE | ||
64 | 50 | ||
65 | using std::string; | 51 | using std::string; |
66 | using std::map; | 52 | using std::map; |
67 | using std::list; | 53 | using std::list; |
68 | 54 | ||
69 | |||
70 | #ifdef HAVE_SETLOCALE | ||
71 | #include <locale.h> | ||
72 | #endif //HAVE_SETLOCALE | ||
73 | |||
74 | namespace { | 55 | namespace { |
75 | 56 | ||
76 | // use to map <font1>|<font2>|<font3> => <fontthatworks> | 57 | // use to map <font1>|<font2>|<font3> => <fontthatworks> |
@@ -207,12 +188,13 @@ bool Font::load(const string &name) { | |||
207 | // Xft and X/Xmb fonts have different defaults | 188 | // Xft and X/Xmb fonts have different defaults |
208 | // (fixed doesn't really work right with Xft, especially rotated) | 189 | // (fixed doesn't really work right with Xft, especially rotated) |
209 | 190 | ||
210 | // HOWEVER, note that if a Xft-style font is requested (not start with "-"), and | 191 | // HOWEVER, note that if a Xft-style font is requested (does not start |
211 | // it turns out to be a bitmapped XFont, then Xft will load it, BUT it does not | 192 | // with "-"), and it turns out to be a bitmapped XFont, then Xft will |
212 | // currently (5jan2007) rotate bitmapped fonts (ok-ish), nor adjust the baseline for its | 193 | // load it, BUT it does not currently (2007-01-05) rotate bitmapped |
213 | // lack of rotation (not ok: messes up placement). I can't see a neat way around this, | 194 | // fonts (ok-ish), nor adjust the baseline for its lack of rotation |
214 | // other than the user re-specifying their font explicitly in XFont form so we don't use the | 195 | // (not ok: messes up placement). I can't see a neat way around this, |
215 | // Xft backend. | 196 | // other than the user re-specifying their font explicitly in XFont |
197 | // form so we don't use the Xft backend. | ||
216 | 198 | ||
217 | std::string realname = *name_it; | 199 | std::string realname = *name_it; |
218 | 200 | ||
@@ -304,8 +286,6 @@ void Font::drawText(const FbDrawable &w, int screen, GC gc, | |||
304 | } | 286 | } |
305 | 287 | ||
306 | m_fontimp->drawText(w, screen, gc, text, len, x, y, orient); | 288 | m_fontimp->drawText(w, screen, gc, text, len, x, y, orient); |
307 | |||
308 | |||
309 | } | 289 | } |
310 | 290 | ||
311 | } | 291 | } |