diff -cr libgraphic.old/base.c libgraphic/base.c *** libgraphic.old/base.c Fri Nov 16 14:11:57 1990 --- libgraphic/base.c Fri Nov 16 14:12:05 1990 *************** *** 270,275 **** --- 270,276 ---- return ok; } + // modified by chiba void Graphic::concatGS (Graphic* a, Graphic* b, Graphic* dest) { int fill; PColor* fg, *bg; *************** *** 276,282 **** PFont* font; PBrush* br; PPattern* pat; ! if (a == nil) { *dest = *b; return; --- 277,284 ---- PFont* font; PBrush* br; PPattern* pat; ! KFont* kfont; ! if (a == nil) { *dest = *b; return; *************** *** 311,316 **** --- 313,323 ---- br = a->GetBrush(); } dest->SetBrush(br); + + if((kfont = b->GetKFont()) == nil) + kfont = a->GetKFont(); + + dest->SetKFont(kfont); } void Graphic::concatTransformer ( *************** *** 786,800 **** --- 793,810 ---- return FULL_GRAPHIC == id || Graphic::IsA(id); } + // modified by chiba FullGraphic::FullGraphic (Graphic* gr) : (gr) { if (gr == nil) { SetPattern(nil); SetBrush(nil); SetFont(nil); + SetKFont(nil); } else { SetPattern(gr->GetPattern()); SetBrush(gr->GetBrush()); SetFont(gr->GetFont()); + SetKFont(gr->GetKFont()); } } *************** *** 818,820 **** --- 828,844 ---- } PFont* FullGraphic::GetFont () { return (PFont*) font(); } + + // SetKFont and GetKFont are written by chiba. + + void Graphic::SetKFont (KFont*) {} + KFont* Graphic::GetKFont () { return nil; } + + void FullGraphic::SetKFont(KFont* kf) { + if(kfont != kf){ + kfont = kf; + invalidateCaches(); + } + } + + KFont* FullGraphic::GetKFont() { return kfont; }