I am having a problem, might seem like a wierd question to you, since there might not be alot of sense with it.
Anyway, I am displaying a short story on 3 scenes in a storyboard, (Its actually Fresh Prince in Bel Air lyrics, dont ask why. 😉 ) which all have different fonts.
Now I want to make a button, so that when i press it, I want the application to “fetch” the current font used, and display it.
The button and listeners etc. is not a problem, got that covered. But how do i “fetch” the fontname? I do not want to use a variable and just save the name as a string there. I want the program to find the name of it.
Hope this makes any sense. Thank you! / Joakim
If you just do:
then I don’t see a way to get to the font that text is using. However if you do:
That will change the font, in this case to Helvetica, which is what it already is and then you can simply look at that property:
to get the font. That is not set if you do the first method. But at the end of the day, you are setting a variable. In this case, its part of the object instead of a separate table.