[Lazarus] Synedit: background colours and f(o)nts
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Mon Feb 20 20:37:25 CET 2012
Martin wrote:
> On 20/02/2012 09:24, Mark Morgan Lloyd wrote:
>> In the same program (running on Linux), the Synedit font appears to
>> force itself to a generic Sans at runtime, irrespective of what is
>> actually selected (e.g. Monospace). Again, this is OK up to around
>> 0.9.26.
>
> No idea... You set the font via the object inspector?
Yes.
> If you put a label in with the same font. does that work?
Yes.
> Have you tried other fonts?
Yes, it's a general problem.
> Are they in that name-15-*-* format ?
That was available in gtk1, but appears to not be in gtk2 or Qt's font
dialog (although it would be nice to have it as an option).
Using 0.9.30.3, Qt appears to work as expected but gtk2 is a mess. I
can't easily try other widget sets on that version, both gtk and gtk2
are OK at 0.9.24 and possibly some later versions.
> Try compiling with SYNFONTDEBUG defined
>
> also add a debugln to SynEdit.FontChanged
> and SynEdit.RecalcCharExtend
>
> and output the fontname there please
Starts off Courier New, switches to Monospace, reverts to Courier New.
./list3264-i386-linux-gtk2 ../list.txt >debug 2>&1
TheFontStock.CalcFontAdvance: Font=Courier New Size=10 TextMetrics
tmHeight=15, tmAve=8, tmMax=8, tmOver=0
TheTextDrawer.SetBaseStyle =0 CharAdvance=8 CharHeight=15
FBaseCharWidth=8 FBaseCharHeight=15
MarkMLl: in PaneMainEdit.FontChanged(), font is Monospace
MarkMLl: in PaneMainEdit.RecalcCharExtent(), font is Monospace
TheTextDrawer.SetBaseFont Name=Monospace Size=10Style=0
TheTextDrawer.SetBaseStyle =0 CharAdvance=8 CharHeight=17
FBaseCharWidth=8 FBaseCharHeight=17
MarkMLl: in PaneMainEdit.FontChanged(), font is courier 10 pitch [bitstream]
MarkMLl: in PaneMainEdit.RecalcCharExtent(), font is courier 10 pitch
[bitstream]
TheTextDrawer.SetBaseFont Name=courier 10 pitch [bitstream] Size=10Style=0
I think I'd better email you the output to avoid problems caused by line
breaks etc.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list