1 #include <lib/gdi/font.h>
10 // use this for init Freetype...
12 #include FT_FREETYPE_H
14 #define FTC_Image_Cache_New(a,b) FTC_ImageCache_New(a,b)
15 #define FTC_Image_Cache_Lookup(a,b,c,d) FTC_ImageCache_Lookup(a,b,c,d,NULL)
16 #define FTC_SBit_Cache_New(a,b) FTC_SBitCache_New(a,b)
17 #define FTC_SBit_Cache_Lookup(a,b,c,d) FTC_SBitCache_Lookup(a,b,c,d,NULL)
20 #include <lib/base/eerror.h>
21 #include <lib/gdi/lcd.h>
22 #include <lib/gdi/grc.h>
23 #include <lib/base/elock.h>
24 #include <lib/base/init.h>
25 #include <lib/base/init_num.h>
28 // until we have it in the cdk
31 #include <fribidi/fribidi.h>
36 fontRenderClass *fontRenderClass::instance;
38 static pthread_mutex_t ftlock=PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
40 #ifndef HAVE_FREETYPE2
41 static FTC_Font cache_current_font=0;
46 struct fntColorCacheKey
49 fntColorCacheKey(const gRGB &start, const gRGB &end)
50 : start(start), end(end)
53 bool operator <(const fntColorCacheKey &c) const
57 else if (start == c.start)
63 std::map<fntColorCacheKey,gLookup> colorcache;
65 static gLookup &getColor(const gPalette &pal, const gRGB &start, const gRGB &end)
67 fntColorCacheKey key(start, end);
68 std::map<fntColorCacheKey,gLookup>::iterator i=colorcache.find(key);
69 if (i != colorcache.end())
71 gLookup &n=colorcache.insert(std::pair<fntColorCacheKey,gLookup>(key,gLookup())).first->second;
72 // eDebug("[FONT] creating new font color cache entry %02x%02x%02x%02x .. %02x%02x%02x%02x", start.a, start.r, start.g, start.b,
73 // end.a, end.r, end.g, end.b);
74 n.build(16, pal, start, end);
75 // for (int i=0; i<16; i++)
76 // eDebugNoNewLine("%02x|%02x%02x%02x%02x ", (int)n.lookup[i], pal.data[n.lookup[i]].a, pal.data[n.lookup[i]].r, pal.data[n.lookup[i]].g, pal.data[n.lookup[i]].b);
81 fontRenderClass *fontRenderClass::getInstance()
86 FT_Error myFTC_Face_Requester(FTC_FaceID face_id,
88 FT_Pointer request_data,
91 return ((fontRenderClass*)request_data)->FTC_Face_Requester(face_id, aface);
95 FT_Error fontRenderClass::FTC_Face_Requester(FTC_FaceID face_id, FT_Face* aface)
97 fontListEntry *font=(fontListEntry *)face_id;
101 // eDebug("[FONT] FTC_Face_Requester (%s)", font->face.c_str());
104 if ((error=FT_New_Face(library, font->filename.c_str(), 0, aface)))
106 eDebug(" failed: %s", strerror(error));
109 FT_Select_Charmap(*aface, ft_encoding_unicode);
113 FTC_FaceID fontRenderClass::getFaceID(const std::string &face)
115 for (fontListEntry *f=font; f; f=f->next)
118 return (FTC_FaceID)f;
123 FT_Error fontRenderClass::getGlyphBitmap(FTC_Image_Desc *font, FT_ULong glyph_index, FTC_SBit *sbit)
125 FT_Error res=FTC_SBit_Cache_Lookup(sbitsCache, font, glyph_index, sbit);
129 std::string fontRenderClass::AddFont(const std::string &filename, const std::string &name, int scale)
131 eDebugNoNewLine("[FONT] adding font %s...", filename.c_str());
134 fontListEntry *n=new fontListEntry;
138 singleLock s(ftlock);
140 if ((error=FT_New_Face(library, filename.c_str(), 0, &face)))
141 eFatal(" failed: %s", strerror(error));
143 n->filename=filename;
148 eDebug("OK (%s)", n->face.c_str());
154 fontRenderClass::fontListEntry::~fontListEntry()
158 fontRenderClass::fontRenderClass(): fb(fbClass::getInstance())
161 eDebug("[FONT] initializing lib...");
163 if (FT_Init_FreeType(&library))
165 eDebug("[FONT] initializing failed.");
169 eDebug("[FONT] loading fonts...");
173 int maxbytes=4*1024*1024;
174 eDebug("[FONT] Intializing font cache, using max. %dMB...", maxbytes/1024/1024);
177 if (FTC_Manager_New(library, 8, 8, maxbytes, myFTC_Face_Requester, this, &cacheManager))
179 eDebug("[FONT] initializing font cache failed!");
184 eDebug("[FONT] initializing font cache manager error.");
187 if (FTC_SBit_Cache_New(cacheManager, &sbitsCache))
189 eDebug("[FONT] initializing font cache sbit failed!");
192 if (FTC_Image_Cache_New(cacheManager, &imageCache))
194 eDebug("[FONT] initializing font cache imagecache failed!");
200 float fontRenderClass::getLineHeight(const gFont& font)
205 getFont(fnt, font.family.c_str(), font.pointSize);
208 singleLock s(ftlock);
209 FT_Face current_face;
210 #ifdef HAVE_FREETYPE2
211 if ((FTC_Manager_LookupFace(cacheManager, fnt->scaler.face_id, ¤t_face) < 0) ||
212 (FTC_Manager_LookupSize(cacheManager, &fnt->scaler, &fnt->size) < 0))
214 if (FTC_Manager_Lookup_Size(cacheManager, &fnt->font.font, ¤t_face, &fnt->size)<0)
217 eDebug("FTC_Manager_Lookup_Size failed!");
220 int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
221 float height=(current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap)/64.0;
225 fontRenderClass::~fontRenderClass()
227 singleLock s(ftlock);
230 fontListEntry *f=font;
234 // auskommentiert weil freetype und enigma die kritische masse des suckens ueberschreiten.
235 // FTC_Manager_Done(cacheManager);
236 // FT_Done_FreeType(library);
239 int fontRenderClass::getFont(ePtr<Font> &font, const std::string &face, int size, int tabwidth)
241 FTC_FaceID id=getFaceID(face);
247 font = new Font(this, id, size * ((fontListEntry*)id)->scale / 100, tabwidth);
251 void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement)
253 fontRenderClass::getInstance()->AddFont(filename, alias, scale_factor);
255 eTextPara::setReplacementFont(alias);
260 Font::Font(fontRenderClass *render, FTC_FaceID faceid, int isize, int tw): tabwidth(tw)
263 #ifdef HAVE_FREETYPE2
264 font.face_id = faceid;
267 font.flags = FT_LOAD_DEFAULT;
268 scaler.face_id = faceid;
269 scaler.width = isize;
270 scaler.height = isize;
273 font.font.face_id=faceid;
274 font.font.pix_width = isize;
275 font.font.pix_height = isize;
276 font.image_type = ftc_image_grays;
281 // font.image_type |= ftc_image_flag_autohinted;
284 FT_Error Font::getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit)
286 return renderer->getGlyphBitmap(&font, glyph_index, sbit);
293 DEFINE_REF(eTextPara);
295 int eTextPara::appendGlyph(Font *current_font, FT_Face current_face, FT_UInt glyphIndex, int flags, int rflags)
298 if (current_font->getGlyphBitmap(glyphIndex, &glyph))
311 glyphString::reverse_iterator i(glyphs.rbegin());
312 /* find first possibility (from end to begin) to break */
313 while (i != glyphs.rend())
315 if (i->flags&(GS_CANBREAK|GS_ISFIRST)) /* stop on either space/hyphen/shy or start of line (giving up) */
322 if (i != glyphs.rend() /* ... we found anything */
323 && (i->flags&GS_CANBREAK) /* ...and this is a space/hyphen/soft-hyphen */
324 && (!(i->flags & GS_ISFIRST)) /* ...and this is not an start of line (line with just a single space/hyphen) */
325 && cnt ) /* ... and there are actual non-space characters after this */
327 /* if we have a soft-hyphen, and used that for breaking, turn it into a real hyphen */
328 if (i->flags & GS_SOFTHYPHEN)
330 i->flags &= ~GS_SOFTHYPHEN;
331 i->flags |= GS_HYPHEN;
333 --i; /* skip the space/hypen/softhyphen */
334 int linelength=cursor.x()-i->x;
335 i->flags|=GS_ISFIRST; /* make this a line start */
336 ePoint offset=ePoint(i->x, i->y);
340 /* and move everything to the end into the next line. */
345 i->bbox.moveBy(-offset.x(), -offset.y());
348 } while (i-- != glyphs.rbegin()); // rearrange them into the next line
349 cursor+=ePoint(linelength, 0); // put the cursor after that line
360 int xadvance=glyph->xadvance, kern=0;
362 if (previous && use_kerning)
365 FT_Get_Kerning(current_face, previous, glyphIndex, ft_kerning_default, &delta);
370 ng.bbox.setLeft( (flags&GS_ISFIRST|cursor.x()-1)+glyph->left );
371 ng.bbox.setTop( cursor.y() - glyph->top );
372 ng.bbox.setWidth( glyph->width );
373 ng.bbox.setHeight( glyph->height );
376 ng.bbox.setWidth(xadvance);
378 ng.x = cursor.x()+kern;
381 ng.font = current_font;
382 ng.glyph_index = glyphIndex;
384 glyphs.push_back(ng);
387 /* when we have a SHY, don't xadvance. It will either be the last in the line (when used for breaking), or not displayed. */
388 if (!(flags & GS_SOFTHYPHEN))
389 cursor += ePoint(xadvance, 0);
390 previous = glyphIndex;
394 void eTextPara::calc_bbox()
405 glyphString::iterator i(glyphs.begin());
410 for (; i != glyphs.end(); ++i)
412 if (i->flags & (GS_ISSPACE|GS_SOFTHYPHEN))
414 if ( i->bbox.left() < boundBox.left() )
415 boundBox.setLeft( i->bbox.left() );
416 if ( i->bbox.top() < boundBox.top() )
417 boundBox.setTop( i->bbox.top() );
418 if ( i->bbox.right() > boundBox.right() )
419 boundBox.setRight( i->bbox.right() );
420 if ( i->bbox.bottom() > boundBox.bottom() )
421 boundBox.setBottom( i->bbox.bottom() );
423 // eDebug("boundBox left = %i, top = %i, right = %i, bottom = %i", boundBox.left(), boundBox.top(), boundBox.right(), boundBox.bottom() );
426 void eTextPara::newLine(int flags)
428 if (maximum.width()<cursor.x())
429 maximum.setWidth(cursor.x());
432 int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
434 lineOffsets.push_back(cursor.y());
435 lineChars.push_back(charCount);
438 cursor+=ePoint(0, (current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap)>>6);
440 if (maximum.height()<cursor.y())
441 maximum.setHeight(cursor.y());
445 eTextPara::~eTextPara()
450 void eTextPara::setFont(const gFont *font)
452 ePtr<Font> fnt, replacement;
453 fontRenderClass::getInstance()->getFont(fnt, font->family.c_str(), font->pointSize);
455 eWarning("FONT '%s' MISSING!", font->family.c_str());
456 fontRenderClass::getInstance()->getFont(replacement, replacement_facename.c_str(), font->pointSize);
457 setFont(fnt, replacement);
460 std::string eTextPara::replacement_facename;
461 std::set<int> eTextPara::forced_replaces;
463 void eTextPara::setFont(Font *fnt, Font *replacement)
468 replacement_font=replacement;
469 singleLock s(ftlock);
471 // we ask for replacment_font first becauseof the cache
472 if (replacement_font)
474 #ifdef HAVE_FREETYPE2
475 if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
476 replacement_font->scaler.face_id,
477 &replacement_face) < 0) ||
478 (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
479 &replacement_font->scaler,
480 &replacement_font->size) < 0))
482 if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager,
483 &replacement_font->font.font, &replacement_face,
484 &replacement_font->size)<0)
487 eDebug("FTC_Manager_Lookup_Size failed!");
493 #ifdef HAVE_FREETYPE2
494 if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
495 current_font->scaler.face_id,
496 ¤t_face) < 0) ||
497 (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
498 ¤t_font->scaler,
499 ¤t_font->size) < 0))
501 if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, ¤t_font->font.font, ¤t_face, ¤t_font->size)<0)
504 eDebug("FTC_Manager_Lookup_Size failed!");
508 #ifndef HAVE_FREETYPE2
509 cache_current_font=¤t_font->font.font;
512 use_kerning=FT_HAS_KERNING(current_face);
516 shape (std::vector<unsigned long> &string, const std::vector<unsigned long> &text);
518 int eTextPara::renderString(const char *string, int rflags)
520 singleLock s(ftlock);
525 #ifdef HAVE_FREETYPE2
526 if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
527 current_font->scaler.face_id,
528 ¤t_face) < 0) ||
529 (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
530 ¤t_font->scaler,
531 ¤t_font->size) < 0))
533 eDebug("FTC_Manager_Lookup_Size failed!");
537 if (¤t_font->font.font != cache_current_font)
539 if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, ¤t_font->font.font, ¤t_face, ¤t_font->size)<0)
541 eDebug("FTC_Manager_Lookup_Size failed!");
544 cache_current_font=¤t_font->font.font;
549 eFatal("eTextPara::renderString: no current_face");
550 if (!current_face->size)
551 eFatal("eTextPara::renderString: no current_face->size");
555 cursor=ePoint(area.x(), area.y()+(current_face->size->metrics.ascender>>6));
559 std::vector<unsigned long> uc_string, uc_visual;
561 uc_string.reserve(strlen(string));
563 const char *p = string ? string : "";
567 unsigned int unicode=(unsigned char)*p++;
569 if (unicode & 0x80) // we have (hopefully) UTF8 here, and we assume that the encoding is VALID
571 if ((unicode & 0xE0)==0xC0) // two bytes
576 unicode|=(*p++)&0x3F;
577 } else if ((unicode & 0xF0)==0xE0) // three bytes
582 unicode|=(*p++)&0x3F;
585 unicode|=(*p++)&0x3F;
586 } else if ((unicode & 0xF8)==0xF0) // four bytes
591 unicode|=(*p++)&0x3F;
594 unicode|=(*p++)&0x3F;
597 unicode|=(*p++)&0x3F;
600 uc_string.push_back(unicode);
603 std::vector<unsigned long> uc_shape;
605 // character -> glyph conversion
606 shape(uc_shape, uc_string);
608 // now do the usual logical->visual reordering
609 int size=uc_shape.size();
611 FriBidiCharType dir=FRIBIDI_TYPE_ON;
612 uc_visual.resize(size);
613 // gaaanz lahm, aber anders geht das leider nicht, sorry.
614 FriBidiChar array[size], target[size];
615 std::copy(uc_shape.begin(), uc_shape.end(), array);
616 fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
617 uc_visual.assign(target, target+size);
622 glyphs.reserve(size);
626 for (std::vector<unsigned long>::const_iterator i(uc_visual.begin());
627 i != uc_visual.end(); ++i)
630 int flags = nextflags;
632 unsigned long chr = *i;
634 if (!(rflags&RS_DIRECT))
640 unsigned long c = *(i+1);
659 cursor+=ePoint(current_font->tabwidth, 0);
660 cursor-=ePoint(cursor.x()%current_font->tabwidth, 0);
665 newline:isprintable=0;
667 nextflags|=GS_ISFIRST;
670 case 0x86: case 0xE086:
671 case 0x87: case 0xE087:
672 nprint: isprintable=0;
674 case 0xAD: // soft-hyphen
675 flags |= GS_SOFTHYPHEN;
676 chr = 0x2010; /* hyphen */
692 /* FIXME: our font doesn't seem to have a hyphen, so use hyphen-minus for it. */
696 if (forced_replaces.find(chr) == forced_replaces.end())
697 index=(rflags&RS_DIRECT)? chr : FT_Get_Char_Index(current_face, chr);
701 if (replacement_face)
702 index=(rflags&RS_DIRECT)? chr : FT_Get_Char_Index(replacement_face, chr);
705 eDebug("unicode U+%4lx not present", chr);
707 appendGlyph(replacement_font, replacement_face, index, flags, rflags);
709 appendGlyph(current_font, current_face, index, flags, rflags);
715 if (dir & FRIBIDI_MASK_RTL)
718 doTopBottomReordering=true;
724 lineOffsets.push_back(cursor.y());
725 lineChars.push_back(charCount);
732 void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, const gRGB &foreground)
734 singleLock s(ftlock);
739 #ifdef HAVE_FREETYPE2
740 if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
741 current_font->scaler.face_id,
742 ¤t_face) < 0) ||
743 (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
744 ¤t_font->scaler,
745 ¤t_font->size) < 0))
747 eDebug("FTC_Manager_Lookup_Size failed!");
751 if (¤t_font->font.font != cache_current_font)
753 if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, ¤t_font->font.font, ¤t_face, ¤t_font->size)<0)
755 eDebug("FTC_Manager_Lookup_Size failed!");
758 cache_current_font=¤t_font->font.font;
762 ePtr<gPixmap> target;
763 dc.getPixmap(target);
764 gSurface *surface = target->surface;
768 gColor *lookup8, lookup8_invert[16];
769 gColor *lookup8_normal=0;
771 __u16 lookup16_normal[16], lookup16_invert[16], *lookup16;
772 __u32 lookup32_normal[16], lookup32_invert[16], *lookup32;
774 if (surface->bpp == 8)
776 if (surface->clut.data)
778 lookup8_normal=getColor(surface->clut, background, foreground).lookup;
782 lookup8_invert[i] = lookup8_normal[i^0xF];
787 } else if (surface->bpp == 16)
790 for (int i=0; i<16; ++i)
792 #define BLEND(y, x, a) (y + (((x-y) * a)>>8))
794 unsigned char dr = background.r, dg = background.g, db = background.b;
798 dr = BLEND(background.r, foreground.r, sa) & 0xFF;
799 dg = BLEND(background.g, foreground.g, sa) & 0xFF;
800 db = BLEND(background.b, foreground.b, sa) & 0xFF;
804 lookup16_normal[i] = ((dr >> 3) << 11) | ((db >> 2) << 5) | (dg >> 3);
806 lookup16_normal[i] = ((dr >> 3) << 11) | ((dg >> 2) << 5) | (db >> 3);
809 for (int i=0; i<16; ++i)
810 lookup16_invert[i]=lookup16_normal[i^0xF];
811 } else if (surface->bpp == 32)
814 for (int i=0; i<16; ++i)
816 #define BLEND(y, x, a) (y + (((x-y) * a)>>8))
818 unsigned char da = background.a, dr = background.r, dg = background.g, db = background.b;
822 da = BLEND(background.a, foreground.a, sa) & 0xFF;
823 dr = BLEND(background.r, foreground.r, sa) & 0xFF;
824 dg = BLEND(background.g, foreground.g, sa) & 0xFF;
825 db = BLEND(background.b, foreground.b, sa) & 0xFF;
829 lookup32_normal[i]=db | (dg << 8) | (dr << 16) | (da << 24);;
831 for (int i=0; i<16; ++i)
832 lookup32_invert[i]=lookup32_normal[i^0xF];
835 eWarning("can't render to %dbpp", surface->bpp);
839 gRegion area(eRect(0, 0, surface->x, surface->y));
840 gRegion clip = dc.getClip() & area;
842 int buffer_stride=surface->stride;
844 for (unsigned int c = 0; c < clip.rects.size(); ++c)
846 std::list<int>::reverse_iterator line_offs_it(lineOffsets.rbegin());
847 std::list<int>::iterator line_chars_it(lineChars.begin());
850 for (glyphString::iterator i(glyphs.begin()); i != glyphs.end(); ++i, --line_chars)
854 line_offs = *(line_offs_it++);
855 line_chars = *(line_chars_it++);
858 if (i->flags & GS_SOFTHYPHEN)
861 if (!(i->flags & GS_INVERT))
863 lookup8 = lookup8_normal;
864 lookup16 = lookup16_normal;
865 lookup32 = lookup32_normal;
868 lookup8 = lookup8_invert;
869 lookup16 = lookup16_invert;
870 lookup32 = lookup32_invert;
873 static FTC_SBit glyph_bitmap;
874 if (fontRenderClass::instance->getGlyphBitmap(&i->font->font, i->glyph_index, &glyph_bitmap))
876 int rx=i->x+glyph_bitmap->left + offset.x();
877 int ry=(doTopBottomReordering ? line_offs : i->y) - glyph_bitmap->top + offset.y();
879 __u8 *d=(__u8*)(surface->data)+buffer_stride*ry+rx*surface->bypp;
880 __u8 *s=glyph_bitmap->buffer;
881 register int sx=glyph_bitmap->width;
882 int sy=glyph_bitmap->height;
883 if ((sy+ry) >= clip.rects[c].bottom())
884 sy=clip.rects[c].bottom()-ry;
885 if ((sx+rx) >= clip.rects[c].right())
886 sx=clip.rects[c].right()-rx;
887 if (rx < clip.rects[c].left())
889 int diff=clip.rects[c].left()-rx;
893 d+=diff*surface->bypp;
895 if (ry < clip.rects[c].top())
897 int diff=clip.rects[c].top()-ry;
898 s+=diff*glyph_bitmap->pitch;
901 d+=diff*buffer_stride;
906 case 0: // 4bit lookup to 8bit
907 for (int ay=0; ay<sy; ay++)
911 for (ax=0; ax<sx; ax++)
913 register int b=(*s++)>>4;
919 s+=glyph_bitmap->pitch-sx;
923 case 1: // 8bit direct
924 for (int ay=0; ay<sy; ay++)
928 for (ax=0; ax<sx; ax++)
933 s+=glyph_bitmap->pitch-sx;
938 for (int ay=0; ay<sy; ay++)
940 register __u16 *td=(__u16*)d;
942 for (ax=0; ax<sx; ax++)
944 register int b=(*s++)>>4;
950 s+=glyph_bitmap->pitch-sx;
955 for (int ay=0; ay<sy; ay++)
957 register __u32 *td=(__u32*)d;
959 for (ax=0; ax<sx; ax++)
961 register int b=(*s++)>>4;
967 s+=glyph_bitmap->pitch-sx;
978 void eTextPara::realign(int dir) // der code hier ist ein wenig merkwuerdig.
980 glyphString::iterator begin(glyphs.begin()), c(glyphs.begin()), end(glyphs.begin()), last;
983 while (c != glyphs.end())
986 int numspaces=0, num=0;
989 ASSERT( end != glyphs.end());
995 } while ((end != glyphs.end()) && (!(end->flags&GS_ISFIRST)));
996 // end zeigt jetzt auf begin der naechsten zeile
998 for (c=begin; c!=end; ++c)
1000 // space am zeilenende skippen
1001 if ((c==last) && (c->flags&GS_ISSPACE))
1004 if (c->flags&GS_ISSPACE)
1015 int offset=area.width()-linelength;
1018 offset+=area.left();
1019 while (begin != end)
1021 begin->bbox.moveBy(offset-begin->x,0);
1030 if (end == glyphs.end()) // letzte zeile linksbuendig lassen
1037 if ((!spacemode) && (num<2))
1039 int off=(area.width()-linelength)*256/(spacemode?numspaces:(num-1));
1041 while (begin != end)
1044 if ((!spacemode) || (begin->flags&GS_ISSPACE))
1046 begin->x+=curoff>>8;
1047 begin->bbox.moveBy(curoff>>8,0);
1060 void eTextPara::clear()
1062 singleLock s(ftlock);
1065 replacement_font = 0;
1070 eAutoInitP0<fontRenderClass> init_fontRenderClass(eAutoInitNumbers::graphic-1, "Font Render Class");