I have a question and need some help please.
I have a requirement to show some text in size 9 and height 3mm.
How would this be possible in TCPDF?
Do i need to just increase the font size?
Thanks,
3mm is equivalent to 8.5pt, so yeah, 9pt font size should get you pretty close.
Related
In my case UILabel size can change dynamical . If it is bigger I want to have the best fitting, biggest font size. Is it possible to set it in Storyboard or I need calculate the best one programmatically?
If you have more than 1 word in the label, you can set a very high font size and, set AutoShrink -> Minimum Font Size to a small size. Then in run time app will auto shrink to maximum possible font size. But this doesn't work for if you only have a single word.
I have 2 buttons with the same width and height, also y-Achse centered. They differ only from text length. With iPhone 5, 6 and 6+ they look very well. But with iPhone 4s one button will do not more have the same front size as the other one and it is text will be not more centered. My question is if there is a method to adopt the font size of the 2 buttons so they will take together the same font with small value of font size of one button.
If I understand correctly, you want to use the same font size for both buttons, even when one of them has to reduce the size for the text to fit it.
Use something like this to reduce the size of the font on each button, until an appropriate size is found for both buttons. Take the minimum of the sizes you found, and use it on both buttons.
I am using buttons to display product names in a matrix using TGridLayout.
The problem is that commonly Items contains 3 or 4 words and in my language (Portuguese) some words tend to be long.
I would like that somehow I could calculate the size of the font, decreasing it, in order to make all the text show up automatically (of course there is also a decrease limit, anything below 9 or 8 point for the font turn to be difficult to read).
The wordwrap property is turned on to have many lines, and use the most possible space for the text.
I don't know if you're programming for an Android/iOS app, but you can't change the fontsize of a button. I've had the same problem, my solution was to make an abbreviation of the words. And then i put labels above it to explain the abbreviations.
Of course you can adjust the font size of a button:
TButton.TextSettings.Font.Size
I need to show a body of text similar to the one shown below and limited to the red non-rectangular area. Rob's answer to this question pretty much answers my question as well, but I also need to truncate at tail of the paragraph when the text is too long.
Extra question: is it also possible to set minimum font size similar to UILabel?
Try using NSString::sizeWithFont:constrainedToSize method which is documented here. You can specify the fontsize and maximum size for the text.
You can also calculate the minimum font size using NSString::sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode: method.
I have an issue when setting minimum font size on my UILabels. As you can see the shadow isn't following along with the font size. It's supposed to be just 1 px heigh.
My label:
My settings:
Turn off "Tighten Letter Spacing".
There seems to be a bug with shadows, auto shrinking, and auto tightening.
Set the shadow.offset programmatically based on font size.
You have set the Value 12 Below the Minimum Font Size you can't set this value its Too large pass it like 0.5 or 0.8 something Like that.
Secondly your Vertical Shadow Offset is 1 so there is no chance to take that much of shadow It may be possible that you have passed shadow through Code please check it first.
When you check it in xib File while changing at that time if its not change that just reopen the Window than It'll Work.
Hope this will Help.