For a Label Printer, i am trying to achieve the following Method:
- Define an Area with Left, Top, Width and Height.
- Draw a centered (possible Multiline) String into this Area
- If the String is to wide to fit into the Width, write it on multiple Lines, but do not exceed the Height.
- If the Text would need to be smaller than 9 Points to be able to fit it even on multiple Lines into Width & Height, instead write as much as possible on multiple Lines and condense (…) the rest of the text. But it should still be centered.
Here is an example of the results I’m hoping for:
I need it for an macOS App and the use of MBS or Einhugur Plugins would be ok.
BTW: After 2 days of trying it by myself, I have not even achieved any code I could offer as a starting point. I think this Graphics Stuff is not my “thing” and Font Baselines & Co. are just confusing me…