hatman
Well-known Member
- Joined
- Apr 8, 2005
- Messages
- 2,664
I guess I am looking more for some discussion than an answer. I am not even sure if I want to do what I am proposing, but I figured I'd see what the rest of you have to say.
I am working on an application which manipulates shapes for a block diagram.
Currently, my shape sizes are either a default minimum size, or are determined based strictly on geometry. But one of two situations concern me: 1) The shape isn't big enough to accomodate all of the text that needs to fit into it, or 2) My default minimum size is still way too big for the amount of text that is going inside of it. I am considering some method of determining an optimal size for the shape to accomdate the required text, then using the larger of that or the size required to suit geometry needs.
But what I can't figure out is how to determine what size in pixels a block of text will require. Ultimately, I would REALLY like to allow the user to globally change font size, and have each shrink-wrap itself to the new text requirements.
One option I have is to use a monotype font, where the width f every character is uniform. However, our management, in their infinite wisdom has decreed that font type for all released and controlled documents shall be Helvetica. Helvetica, as a true type font, has a variation in the width of each character, as well as a variation in the white space between characters, based on which two characters are adjacent to each other. Thiss tarts to make me dizzy just thinking about it.
Anyone have any thinghts... anyone tried doing anything like this?
I am working on an application which manipulates shapes for a block diagram.
Currently, my shape sizes are either a default minimum size, or are determined based strictly on geometry. But one of two situations concern me: 1) The shape isn't big enough to accomodate all of the text that needs to fit into it, or 2) My default minimum size is still way too big for the amount of text that is going inside of it. I am considering some method of determining an optimal size for the shape to accomdate the required text, then using the larger of that or the size required to suit geometry needs.
But what I can't figure out is how to determine what size in pixels a block of text will require. Ultimately, I would REALLY like to allow the user to globally change font size, and have each shrink-wrap itself to the new text requirements.
One option I have is to use a monotype font, where the width f every character is uniform. However, our management, in their infinite wisdom has decreed that font type for all released and controlled documents shall be Helvetica. Helvetica, as a true type font, has a variation in the width of each character, as well as a variation in the white space between characters, based on which two characters are adjacent to each other. Thiss tarts to make me dizzy just thinking about it.
Anyone have any thinghts... anyone tried doing anything like this?