aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XftFontImp.cc
AgeCommit message (Collapse)AuthorFilesLines
2014-04-11merge Sami Kerola's new build-systemMathias Gumz1-4/+0
2013-06-22cosmeticsMathias Gumz1-7/+5
2013-06-18Speedup overlong text detectionMathias Gumz1-2/+15
Detecting very long window titles is done via FbTk::TextUtils::doAlignment(). Instead of removing one char from the title at a time to see if it fits into a given 'max_width', we now use a binary-search like approach to get faster to the right value. This massively improves the speed for windows with (arbitrary) long window titles (see bug #1090, javascript document.title = new Array(4999).join("."); leads to massive waiting for fluxbox to detect that this window has a very long title). In addition to that Xft returns 'wrapped' shorts ('integer overflows') for long texts: XGlpyhInfo.xOff is declared as signed short, it's able to hold ~32k pixels. A monospace font with font-size 10 produces an integer overflow after 3276 chars / glyphs, thus rendering the check if (text_width < max_width) { /* ... */ } pointless and leading rendering the whole title. By calculating some kind of upper limit for a pseudo-wide glyph ("WW") and strictly cutting off the input string at that limit prevents this issue.
2013-05-26build-sys: include config.h to all files using automakeSami Kerola1-4/+0
Do not try to be too smart which compilations need config.h, as most of them will simply because of the config.h has information about system capabilities.
2010-09-08introduced FbTk::BidiStringMathias Gumz1-36/+19
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
2008-04-21some fixes for gcc 3.4Thomas Orgis1-1/+1
2008-01-04remove old svn $Id$ tagsMark Tiefenbruck1-2/+0
2007-01-05fix loading of rotated fonts on style changesimonb1-4/+14
2007-01-05change default Xft font so that it works properly with rotation (see simonb1-5/+7
notes in ChangeLog or FbTk/Font.cc)
2006-05-07handle utf-8 strings properly.simonb1-7/+11
use utf8 internally
2006-03-26rotated fonts, buttons, containers. Used for tabs for nowsimonb1-18/+84
2006-02-16updated copyright infomathias1-1/+1
2005-06-03- Usage of xft-fonts is prefered, except a font-description starts with '-'mathias1-4/+4
- Removed "antialias"-option completly, to enable/disable "antialias" use either <fontname>:antialias=<bool> in the style or use Xft.antialias: <bool> in your .Xdefaults - Added new styleresources: *.font.effect: <halo|shadow> *.font.shadow.x : <int> - shadow x offset *.font.shadow.y : <int> - shadow y offset *.font.shadow.color : <color> - color of shadow *.font.halo.color : <color> - color of halo - Removed 'shadow' and 'halo' options from fontdefinitions: !! Style authors have to update their styles !! - Simplified XmbFontImp to not try all possible fonts to match locale - Style authors may specify multiple fonts: <font1>|<font2>|<font3> if loading of font1 fails, fluxbox probes <font2>, etc. The last font is "fixed". Hints for style authors: - if xft tries to load a font it will _ALWAYS_ return a valid font, it doesnt have to look like the one you want to have, read more about it: http://fontconfig.org/fontconfig-user.html - export XFT_DEBUG=1 before running fluxbox helps to see which fonts are picked. eg: *.font: Verdana,Arial-12:antialias=true|-artwiz-snap-*- if fluxbox is compiled with xft this will NEVER try to load "-artwiz-snap-*-" since xft gives for sure a font, most likely Verdana or Arial but noone knows. So, if fluxbox has no xft support the first fontpattern fails and fluxbox tries the next one, which might be successful. if everything fails, it will use "fixed" - Added caching of fonts, fonts are only loaded once. - Fixed #1090902 (slow utf8 start)
2005-01-24copyright datemathias1-1/+1
2004-11-19svn propset svn:keywords "Id"mathias1-1/+1
2004-09-11Font::drawText takes reference to FbDrawable instead of X Drawable + some ↵fluxgen1-16/+21
code cleaning
2004-09-10cosmetic + try to avoid App::instance()->display() calls when not neededakir1-11/+12
2004-08-29a few random fixesrathnor1-2/+5
2004-08-10utf-8 fix, a fixed patch from Sergey Kuleshovfluxgen1-21/+41
2002-12-01Indenting from tabs to emacs 4-spacerathnor1-83/+83
2002-11-26initial importfluxgen1-0/+143