Re: Printing formatted text



If you had explained it better, I might have, too. (Go back and read
your question as if you _don't_ know what you mean. '[how can I format]
text within the string' suggested the text on the canvas to me.)

OK, I explain it better.

Have you ever used the TextOut function on a canvas? It works like
this:
Printer.Canvas.TextOut(x,y,'some text');

Right. Now, if I want to print some bold text I've to use:
Printer.Canvas.Font.Style := [fsBold]; // Next TextOut will print bold
text
Printer.Canvas.Text.Out(x,y,'some bold text');
Printer.Canvas.Font.Style := []; // Next TextOut will print normal text

OK. Now, if I have to print a long text string with SOME words in bold,
and SOME words in italic, how can I make it without using several
TextOut instructions (along with several Printer.Canvas.Font.Style
switches and related positioning matters)?

Thank you.

.



Relevant Pages

  • Re: Printing formatted text
    ... Have you ever used the TextOut function on a canvas? ... if I want to print some bold text I've to use: ... Now, if I have to print a long text string with SOME words in bold, ...
    (comp.lang.pascal.delphi.misc)
  • How to retrieve a text string information
    ... A new feature I've recently implemented allows for changing the canvas ... information and apply the proper text coordinates rescaling. ... which information about the single text string shall I ... other corner), the number of characters, the character font (which ...
    (comp.lang.tcl)
  • Re: Canvas text with different fonts and faces
    ... with different fonts and faces within the string by using html tags. ... items and do calculation on placement, or to place a text widget. ... text item in a canvas? ...
    (comp.lang.tcl)
  • Re: canvas speedup (again?)
    ... > routines are converting back and forth between strings and ... > I see uses an argc/argv (string) interface. ... > the canvas was it was never converted to use tcl objects ... I misinterpreted the gprof results. ...
    (comp.lang.tcl)
  • Re: Is there a free .GIF software?
    ... Is there a free software to generate .GIF files? ... Graphics canvas; ... // Create the bitmap and measure the size of the string. ... int width =; ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)