how to get font of text view?

How do I get the font (/properties) of the 1st word of the contents of a text view?


All I get is errors trying to read the current font using only AS. There is some mention about trying to read the font throwing an error in apple’s documentation, but it’s listed as a read/write property. Perhaps it’s really not possible in just AS? The following call methods will get you there…

set theTextView to text view "textView" of scroll view "scrollView" of window "theWindow"
set theFont to call method "font" of theTextView
set theFontName to call method "displayName" of theFont
set thePointSize to call method "pointSize" of theFont
display dialog (theFontName & " " & thePointSize as string)