Dennis1000 / mos6502-delphi

A MOS 6502 CPU emulator written in Delphi (a very basic C64 + VIC20 emulator included)
MIT License
35 stars 16 forks source link

load font CBM on runtime #3

Open piwi66 opened 6 years ago

piwi66 commented 6 years ago

you can load the font on runtime:

at end of FormC64.pas:

var
  fontname: string;

initialization
  fontname := '..\ROMs\CBM.ttf';

  AddFontResource(PChar(fontname));
  SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);

finalization
  RemoveFontResource(PChar(fontname));
  SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
end.