Preventing Font Substitution
This may be a Windows API or Delphi issue, but since it is
related to reporting, I figured I'd start here.
I wrote a program that is used to design custom envelopes
using D5 & RB6.03. The reports are created on a PC that
contains hundreds of fonts (installed & used by various
applications), but the envelopes are printed on a high
speed inkjet printer attached to a dedicated PC.
The PC used for printing has a small set of fonts installed
(by choice) and every so often a font is accidently used
in the report design that is not installed in the printer's
PC.
Currently, Windows just substitutes the font (usually poorly),
but I really would like to prevent the report from running
and warn the user.
Is there an easy way to accomplish this in Report Builder?
Thanks,
Gary Colclough
Zartarian Publishing, Inc.
related to reporting, I figured I'd start here.
I wrote a program that is used to design custom envelopes
using D5 & RB6.03. The reports are created on a PC that
contains hundreds of fonts (installed & used by various
applications), but the envelopes are printed on a high
speed inkjet printer attached to a dedicated PC.
The PC used for printing has a small set of fonts installed
(by choice) and every so often a font is accidently used
in the report design that is not installed in the printer's
PC.
Currently, Windows just substitutes the font (usually poorly),
but I really would like to prevent the report from running
and warn the user.
Is there an easy way to accomplish this in Report Builder?
Thanks,
Gary Colclough
Zartarian Publishing, Inc.
This discussion has been closed.
Comments
particular printer. You can loop through the objects as shown in the
techtips newsgroup in the 'Code Based' thread. Then change the font to one
that is known to be installed. There is a routine in the ppViewr.pas that
we use to substitute fonts for better screen scaling/viewing. It is
TppScreenDevice.SubstituteFont. You'll want to do something similiar to
change the font with a simple routine.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I saw the object loop suggestion in some earlier threads and I
figured that I'd have to go in that direction, but in my case
I don't want any substitution to take place - just want to stop
the report from printing.
So I was hoping there was some event that I overlooked that would
throw an exception or warning if any substitution took place.
One more question:
How do you check the fonts in a richtext object?
Thanks again,
Gary Colclough
Zartarian Publishing, Inc.
with a Dlephi TRichEdit. See demo the main reports demo #29 for an example
of using the rich edit methods.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com