Skip to content

Commit

Permalink
Use Arial in presentation if no font has been specified.
Browse files Browse the repository at this point in the history
Fixes Issue #24
  • Loading branch information
reckel-jm committed Mar 30, 2024
1 parent c3e2b66 commit 1daffb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/generics/presentationcanvas.pas
Expand Up @@ -368,6 +368,10 @@ function TPresentationCanvasHandler.CalculateTextHeight(Font: TFont;

procedure TPresentationCanvasHandler.AssignBGRAFont(Font: TFont);
begin
// Issue #24
If (Font.Name='') or (LowerCase(Font.Name)='default') then
Font.Name := 'Arial';

Bitmap.FontName := Font.Name;
Bitmap.FontStyle := Font.Style;
Bitmap.FontHeight:= Round(Font.Height/0.85);
Expand Down

0 comments on commit 1daffb2

Please sign in to comment.