Skip to main content
Vikram_S
Known Participant
November 30, 2012
Answered

How to get character Width?

  • November 30, 2012
  • 1 reply
  • 1766 views

I am working on an application written using Flex converted  from Flex 3 to 4.5. It has bullet list functionality. I had seen one post (url is not remb now.) during development to include bullet in text flow. What that post suggesting is, include bullet character at first line and add indentation to first line and to paragraph. i.e. First line indentation is -18 and paragraph indent is 18. so that this will appear as bulleted paragraph.

My problem is, I am not able to manage number of spaces between bullet character and next character for different font-family and fontsize. I tried to find character width but no luck (not able to find api), I need expert advice.

Is there anything to get font matrix so that I can find width of space and adjust the spaces number and indentation.

Thanks,

Vikram

This topic has been closed for replies.
Correct answer Alex J Harui

The resulting TextLines should have APIs to help you get widths of the “atoms”.

1 reply

Adobe Employee
November 30, 2012

Which text controls are you using in 4.5?

Vikram_S
Vikram_SAuthor
Known Participant
December 4, 2012

I am using Text Layout Framework 2. I have drawn text field using TextFlow and container controller.

Alex J HaruiCorrect answer
Adobe Employee
December 4, 2012

The resulting TextLines should have APIs to help you get widths of the “atoms”.