Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Oct : TFontDialog to show all Fonts
| Subject: | TFontDialog to show all Fonts |
| Posted by: | "Johan K" (johakorh@at-removethis-bastu.net) |
| Date: | Wed, 3 Oct 2007 16:47:07 |
I am trying to get Samsung SRP-350 POS-printer to print receipts using
oldish QuickReport. This works fine when I use TrueType fonts.
But this makes SRP-350 also slow even though the printer has fast
USB-connection.
The printer's own processing capability may just be too low. When I Use
the printer's built-in fonts that have names like 'FontA1x1','FontA1x2'
etc. then the printing is fast.
My problem is that I can't find a way to get these font names to appear
in TFontDialog, so I could pick them on QuickReport.
Yet these printer built-in Fonts do appear for instance in Word2000 or
even in old 16-bit Word-6 version without problems. The fonts like
'FontA1x1' look ugly on Word screen but they print fine and fast on
SRP-350 printer.
So the question is, whhat is the trick that even the old FontDialogs in
Word-6 version knew that seems to be missing from TFontDialog in D7? I
have not found any switch that I could use to get those printer fonts to
appear to TFontDialog.
Using EnumFontFamilies I can get those printer fonts listed for instance
to a Memo control. But how could I get them also to TFontDialog?
I tried to blindly write the 'FontA1x1' as Font Name to QuickReport, and
this trick almost succeeds. Only problem is that the narrow characters
like 'i','l' etc. do get printed too tight or over the next characters.
Inside QucikReport the printout goes to Printer with this command, and
there those narrow characters are positioned in wrong way:
ExtTextOut(Handle,parentreport.xpos(x1),ParentReport.YPos(y1),aFlag,
@arect,@cap[1],length(cap),nil);
I wonder if there are some API calls to handle those narrow chars, how
to give more space to them?
So, mostly I am looking some way to get the FontDialog filled. Or also
any other tips how to be able to use QuickReport (or some other simple
reporting tool) and still be able to use the fast, printer specific
fonts.
Writing the receipts with old WriteLn statemenst would solve it. But
that is auite a pain in the neck if you want to get good looking
receipts. And also so that they could be usable with other Receipt
Printers like Citizen, Star etc. too.
Any suggestions, thanks?
-Johan K