4
#include "goo/GooString.h"
14
GBool Ok(unsigned int xcol){ return ((xcol<=255)&&(xcol>=0));}
15
GooString *convtoX(unsigned int xcol) const;
17
HtmlFontColor():r(0),g(0),b(0){}
18
HtmlFontColor(GfxRGB rgb);
19
HtmlFontColor(const HtmlFontColor& x){r=x.r;g=x.g;b=x.b;}
20
HtmlFontColor& operator=(const HtmlFontColor &x){
25
GooString* toString() const;
26
GBool isEqual(const HtmlFontColor& col) const{
27
return ((r==col.r)&&(g==col.g)&&(b==col.b));
38
int pos; // position of the font name in the fonts array
39
static GooString *DefaultFont;
42
static GooString* HtmlFilter(Unicode* u, int uLen); //char* s);
45
HtmlFont(){FontName=NULL;};
46
HtmlFont(GooString* fontname,int _size, GfxRGB rgb);
47
HtmlFont(const HtmlFont& x);
48
HtmlFont& operator=(const HtmlFont& x);
49
HtmlFontColor getColor() const {return color;}
52
GooString* getFullName();
53
GBool isItalic() const {return italic;}
54
GBool isBold() const {return bold;}
55
unsigned int getSize() const {return size;}
56
int getLineSize() const {return lineSize;}
57
void setLineSize(int _lineSize) { lineSize = _lineSize; }
58
GooString* getFontName();
59
static GooString* getDefaultFont();
60
static void setDefaultFont(GooString* defaultFont);
61
GBool isEqual(const HtmlFont& x) const;
62
GBool isEqualIgnoreBold(const HtmlFont& x) const;
63
static GooString* simple(HtmlFont *font, Unicode *content, int uLen);
64
void print() const {printf("font: %s %d %s%spos: %d\n", FontName->getCString(), size, bold ? "bold " : "", italic ? "italic " : "", pos);};
69
GVector<HtmlFont> *accu;
74
int AddFont(const HtmlFont& font);
76
GVector<HtmlFont>::iterator g=accu->begin();
80
GooString* getCSStyle (int i, GooString* content);
81
GooString* CSStyle(int i);
82
int size() const {return accu->size();}