Hi Porting to cl-freetype2
cl-freetype2 replaces zpb-ttf and cl-vectors dependencies. All funcalls to these packages should be replaced with similar cl-freetype2 funcalls. They include * font caching https://github.com/filonenko-mikhail/clx-truetype/blob/master/font-cache.lisp#L29-L42 * font loader https://github.com/filonenko-mikhail/clx-truetype/blob/master/clx-truetype.lisp#L111-L120 * font metrics https://github.com/filonenko-mikhail/clx-truetype/blob/master/clx-truetype.lisp#L145-L184 * symbol/string biboxing https://github.com/filonenko-mikhail/clx-truetype/blob/master/clx-truetype.lisp#L186-L269 * font rasterizing https://github.com/filonenko-mikhail/clx-truetype/blob/master/clx-truetype.lisp#L310-L499 About cl-cairo. When I handle text drawing in stumpwm, I get clx:window (drawable surface) and clx:gcontext (graphical context) objects, which are used by clx drawing functions then. https://github.com/sabetts/stumpwm/compare/tt-fonts#diff-7e56d08baa29d13311787486231783f2R88 Unfortunately cl-cairo2 drawing functions can't take clx:window and clx:gcontext objects. It uses internal c structures from cairo c library. So, I don't know how to port drawing functions from clx to cl-cairo in stumpwm space. On Tue, Feb 11, 2014 at 10:00 PM, David Bjergaard <dbjerga...@gmail.com>wrote: > Hi All, > > A number of people have wrote in mentioning slower/sluggish performance > with the using TrueType fonts in the experimental branch. I can confirm > this. On the face of it (pardon the pun), the strings stumpwm has to > render are small, but some people dump large outputs to messages, and an > obvious one is "C-t ?" > > I can't merge this in with the main branch until rendering performance > is significantly improved. I've been doing some research and there are > two potentially "off the shelf" replacements/improvements: > * cl-freetype2 replacing zpb-ttf (this would allow opening otf, ttf and > any other format supported by FreeType) > * Replace rendering with cl-cairo2 > > There are examples in the cl-cairo2/tutorial directory on how to do this > with freetype2 and xlib. > > Michael: I know you don't have time to support or improve the rendering > of your patch, and that you've written clx-truetype. Could you comment > on the feasibility of the above? Any input is appreciated, I didn't > realize how complicated font rendering was! > > Cheers, > > Dave > > _______________________________________________ > Stumpwm-devel mailing list > Stumpwm-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/stumpwm-devel > -- With best regards, Michael Filonenko
_______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/stumpwm-devel