Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

CodeBlocks and Fira Code issues

<< < (4/7) > >>

New Pagodi:
This does seem to be a bug with wxSTC.  I've a standard demo application of mine for the screenshots below.  It has a wxSTC on the left and a native Scintilla window on the right.  The first is with the default GDI drawing and the second is with direct write drawing.  The font in the autocompletion window does end up larger than it should be when direct write drawing is used.  I don't know what could be going on here.

stahta01:
Link to wxwidgets master branch change https://github.com/wxWidgets/wxWidgets/pull/1123

New Pagodi:
I'm pretty sure I know what the problem is with the font size in the list boxes.  Direct write uses DIPs for font size.  So when the technology is set to direct write, Scintilla internally scales all the fonts by 96/72 so that so drawing comes out as expected for a given font size.  So, for example, when you try to set the default font size to be 10pts, Scintilla interanlly creates a 10*96/72 = 13.333 pt font.  When drawing text in the editor, that's not a problem, but when passing that font to the list control (as is done in ListBoxImpl::SetFont), the font will be larger than expected. 

The quick fix is to check the technology in ListBoxImpl::SetFont and unscale the font if needed.  A better fix would be to measure and draw the autocompletion listbox with direct write using the SurfaceD2D methods.

Miguel Gimenez:
Created ticket 835.

https://sourceforge.net/p/codeblocks/tickets/835/

oBFusCATed:
Anything in STC should first be fixed in wxWidgets. I'm just backporting fixes...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version