ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Text Setting
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndNit

Brazil
83 Posts

Posted - Jul 18 2024 :  19:40:17  Show Profile  Reply
Hey...

xequte

38958 Posts

Posted - Jul 20 2024 :  16:27:40  Show Profile  Reply
Yes, that is correct. The Font property has no effect if rich formatting is used:

http://www.imageen.com/help/TIETextLayer.Font.html

To add formatted text you would need to update the RichText Property:

http://www.imageen.com/help/TIETextLayer.RichText.html

Which would require you to build a rich text string, e.g. using TIERichEdit:

http://www.imageen.com/help/TIERichEdit.AddFormattedText.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

AndNit

Brazil
83 Posts

Posted - Jul 23 2024 :  17:14:39  Show Profile  Reply
Hello,
Go to Top of Page

xequte

38958 Posts

Posted - Jul 24 2024 :  05:13:20  Show Profile  Reply
Hi

There is no built-in functionality for that. You can only programmatically format text in as much as it is supported by TRichEdit or TIERichEdit.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38958 Posts

Posted - Jul 25 2024 :  01:56:25  Show Profile  Reply
Hi

If you use TIERichEdit (which is just an enhanced TRichEdit) then you can assign its Rich text:

http://www.imageen.com/help/TIERichEdit.RTFText.html

To the RichText property of the layer:

http://www.imageen.com/help/TIETextLayer.RichText.html


You can add formatting to a selection in TTIERichEdit using:

http://www.imageen.com/help/TIERichEdit.SelAttributes.html

Or, as mentioned, add formatted text using:

http://www.imageen.com/help/TIERichEdit.AddFormattedText.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38958 Posts

Posted - Jul 26 2024 :  21:49:24  Show Profile  Reply
Hi

If you run the demo:

\Demos\Other\RichEdit\RichEdit.dpr

You will see the RTF for your text is:

{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang5129\deflangfe5129{\fonttbl{\f0\fswiss\fprq2\fcharset0 Aptos;}}
{\*\generator Riched20 10.0.22621}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 
\pard\widctlpar\sa160\sl276\slmult1\kerning2\ul\b\f0\fs24 PROPERTY:\ulnone\b0  \b Residential building (under construction)\b0  located in \b Praia da Guanabara, n\'ba 1371\b0 , former n\'ba 433, belonging to the parish of Nossa Senhora d'Ajuda, useful domain of the land, \b outside the Federal Union.\b0\par
}


Which you can use to insert a formatted text layer as follows:

  ImageEnView1.LayersAdd( ielkText );
  TIETextLayer( ImageEnView1.CurrentLayer ).EnableFormatting := True;
  TIETextLayer( ImageEnView1.CurrentLayer ).RichText :=
    '{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang5129\deflangfe5129{\fonttbl{\f0\fswiss\fprq2\fcharset0 Aptos;}}' +
    '{\*\generator Riched20 10.0.22621}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1' +
    '\pard\widctlpar\sa160\sl276\slmult1\kerning2\ul\b\f0\fs24 PROPERTY:\ulnone\b0  \b Residential building (under construction)\b0  located in \b Praia da Guanabara, n\''ba 1371\b0 , former n\''ba 433, belonging to the parish of Nossa Senhora d''Ajuda, useful domain of the land, \b outside the Federal Union.\b0\par}';
  TIETextLayer( ImageEnView1.CurrentLayer ).SizeToText();
  ImageEnView1.Update();


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38958 Posts

Posted - Jul 27 2024 :  23:07:36  Show Profile  Reply
Hi

Do you mean a manual for the RTF standard?

Please see: https://latex2rtf.sourceforge.net/rtfspec.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: