Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Font List - Showing Native Printer Fonts

edited September 2002 in General
I was wondering if you had a way to get the fonts that are available for the
printer, just like you have in your report designer.

For example: If I want a list of printers available, I do this:
(cbPrinterName: TComboBox)

cbPrinterNames.Items := fMain.Report.PrinterSetup.PrinterNames;

So what I am trying to do is something like this for the fonts:

cbFontName.Items := fMain.Report.PrinterSetup.Fonts;

I have tried this:
cbFontNames.Items.Assign(Screen.Fonts);
but the problem is that it only shows the Windows Fonts, and I need Dot
Matrix Built in fonts.

Anyone have any ideas?

Comments

  • edited September 2002
    Check the source in ppDsgner.pas. The font drop-down list box is populated
    with printer fonts (when the print driver supplies them.)

    --
    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
  • edited September 2002
    I can't figure out what code makes it work. So much is happening, and I am
    probably making it more complicated that it should be. Could you please
    just give an example of how to fill the combobox?

    Thanks.


  • edited September 2002
    I figured out all I had to do was have the "printers" in the uses clause,
    and type "Printer.Fonts". Just thought I would let you know.

This discussion has been closed.