richmemo: simplify flag checks for byte type. corrected gtk2 style read for default font

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4017 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2015-03-12 04:08:37 +00:00
parent 47109b3dd8
commit 26fef957ec
2 changed files with 21 additions and 19 deletions

View File

@ -305,11 +305,10 @@ begin
with Result, ALogFont do
begin
Height := lfHeight;
if lfWeight >= FW_BOLD then
Include(Style, fsBold);
if lfItalic <> 0 then Include(Style, fsItalic);
if lfUnderline <> 0 then Include(Style, fsUnderline);
if lfStrikeOut <> 0 then Include(Style, fsStrikeOut);
if lfWeight >= FW_BOLD then Include(Style, fsBold);
if lfItalic > 0 then Include(Style, fsItalic);
if lfUnderline > 0 then Include(Style, fsUnderline);
if lfStrikeOut > 0 then Include(Style, fsStrikeOut);
Charset := TFontCharset(lfCharSet);
Name := lfFaceName;
case lfPitchAndFamily and $F of