I need to create an image containing one line of text. But the problem, i first need to create the context (CGBitmapContextCreate) with require the width and the height of the image to have the possibility to later calculate the bounds of the text (via CTLineGetImageBounds). but i want the size of the image = the bounds of the text :( how can i do ?
actually i use
CGBitmapContextCreate
CTLineGetImageBounds
CTLineDraw
maybe it's possible to call CTLineGetImageBounds without a context ?
Note: i m on delphi, it's not really a problem as i can have access to all the API, i just need the function name