diff --git a/delphi/KPANSI.PAS b/delphi/KPANSI.PAS index 2e2f4bf..c2f13f3 100644 --- a/delphi/KPANSI.PAS +++ b/delphi/KPANSI.PAS @@ -1139,8 +1139,12 @@ begin Exit; end; - { Render dirty rows directly to screen DC } + { Render dirty rows directly to screen DC. Re-select the OEM font each } + { frame because Delphi's Canvas infrastructure can deselect it from the } + { CS_OWNDC between paint cycles. } DC := GetDC(Handle); + SelectObject(DC, FPaintFont); + SetBkMode(DC, OPAQUE); for Row := 0 to FRows - 1 do begin if FAllDirty or FDirtyRow[Row] then @@ -1321,6 +1325,8 @@ begin { Full repaint: render each row directly to screen } FAllDirty := True; DC := Canvas.Handle; + SelectObject(DC, FPaintFont); + SetBkMode(DC, OPAQUE); for Row := 0 to FRows - 1 do begin