Is it possible to change characters width?

Hello,

I need to change character/text width without changing height of the text. Ideally it would be able to adjust percent of text width for example:
if I set 80% of text width then text should be narrower than default
if I set 120% of text width then text should be wider then default
In both case without change height of the text.

Is it possible in FastReport? Now or in the future?

--
best regards
Adam Siwon

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 9:44AM
    Well, if you are trying to squeeze the characters, I don't think it's possible.
    There is something that you might want to try in the lack of better solution.
    In the tfrxMemoView object, you have the CharSpacing property. Although it doens't affect the character being printed itself, it reduces the space between them.
    Play with the numbers there, and note that it accept float and negative numbers, like -1.4
    As a test, drop 3 tfrxMemoView in the form with the same text, one above the other, and put -1, -1.5 and -2 in their CharSpacing property, see if you can get the right formula for your intentions.
  • edited 9:44AM
    Hi,

    thank you for answer. I know CharSpacing property but this is not what I'm really need. I have box for the text. If I change the spacing between characters, so that the entire text is located in the box then the text becomes unreadable. I'm looking for a solution that is used by dot matrix printers - change the width of characters without changing the height.

    --
    best regards
    Adam Siwon
  • edited 9:44AM
    If this behavior of printed text has a very critical meaning in your report then you may try to apply a kind of cosmic idea.
    I mean a Picture View which can be resized only in one direction, here horizontaly.

    If you can change your text for the memo into a Picture (JPG) then you can easily manipulate its width. Other supercosmic method could be changing each sign of text to be printed into a single JPG and finally concatenate those single JPGs into whole picture to be resized.

    This is far away from FastReport, but as I wrote above - if it has a very critical meaning ...

    Mick
  • edited 9:44AM
    Adam Siwon wrote: »
    Hi,

    thank you for answer. I know CharSpacing property but this is not what I'm really need. I have box for the text. If I change the spacing between characters, so that the entire text is located in the box then the text becomes unreadable. I'm looking for a solution that is used by dot matrix printers - change the width of characters without changing the height.
    Why not just use a different font?
  • edited February 2011
    Hello,

    thank you for your answers. I found another solution. I wrote my own FastReports control which let me to change horizontal size of text. I can just set property and view of the texts are changed. This control has some limitations but it is sufficient for my needs.

    I had only problem with resizing texts while exporting to the pdf files. I made appropriate changes in the FastReports PDF export filter and everything is exported correctly. The problem is that this changes cannot be made using object programming rules. This must be change of the source code. I think this is not good solution because I often use the projects with external packages and with this I cannot just change the source and add it to the project.

    To this message are attached two files with examples how my control works.

    --
    best regards
    Adam Siwon

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.