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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to get Font Style from Text Layer?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Apr 05 2020 : 10:56:17
Hello,

I want to get following about font of selected text layer:
  • Font Name (which I can get using TIETextLayer( lyr ).Font.Name)
  • Font Style like Bold/Italic/Bold Italic/Underline/etc
  • Font Size (which I can get using TIETextLayer( lyr ).Font.Size)
  • Font Color


TIA


Yogi Yang
5   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Apr 08 2020 : 03:58:22
Hello Nigel,

I have solved the problem now.

Instead of creating a font style variable I am using it like this:
FntName := TIETextLayer(lyr).Font.Name;
  FntSize := TIETextLayer(lyr).Font.Size;
  FntClr := TIETextLayer(lyr).Font.Color;

if fsBold in TIETextLayer(lyr).Font.Style then


TIA


Yogi Yang
xequte Posted - Apr 07 2020 : 05:52:18
What is the compilation error?

Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Apr 05 2020 : 23:46:55
Hello,

It is plain text. Next I have tried to read Style info using following code:
fs: TFontStyle;

fs := TIETextLayer( lyr ).Font.Style;

But this does not compile.

I need to distinguish the formatting info and accordingly show associated buttons down or up.

I checked the help and tried everything before posing here.

TIA


Yogi Yang
xequte Posted - Apr 05 2020 : 18:51:43
Is it a plain text or rich text layer? (EnableFormatting enabled or not)

If it's plain text, then just use:

TIETextLayer( lyr ).Font.Style

Nigel
Xequte Software
www.imageen.com
klausdoege Posted - Apr 05 2020 : 14:42:44
Hi Yogi,
see the help -> TIETextLayer
All you can find there.

Klaus
www.klausdoege.de