UILabel is character wrapping and not word wrapping correctly - uilabel

I have a UITextLabel which isn't very wide. I want to display the text "Average Score" With "Average" on the top line and "Score" on the bottom line. But instead, I am getting
Averag
e Score
What I would like to happen is for the code to automatically adjust the font scale to fit it correctly, but that's not happening.

Related

Altair tooltips: Is there a way to format box shape for long text?

I have a chart where I want to display text tooltips of variable lengths as long as 300 characters, but they are displayed with random box sizes. Sometimes they are shown in a neat square box with several lines of text, which is nice. But sometimes they attempt to put all the text in one line and it doesn't fit in the chart, so some part of the text is not visible.
I wonder if there is a way to format the tooltip box to a fixed maximum width to avoid this problem.
Below are two pictures showing the same chart. The first one shows a tooltip box out of the chart and page, so the complete text is not visible. The second one shows another tooltip that randomly shows the text fine.
Note: I tried cutting the text to a fixed length of 50 or 80 characters and it's better, but I would prefer to have the complete text.

excel rowheight - a bug here?

Excel seems to work with the row heights in the following (il)logic:
If you refer to a single cell and your cell is defined "Wrap Text" and the row height is "Autofit":
When you enter more characters than what can fit to the cell width the row in the cell is changed automatically and in the end, when you press "Enter", the row height is expanded so that the whole text is visible.
If you refer to combined cells and your cell combination is "Wrap text" and "Autofit":
When you enter more characters than what can fit to the combined cells' width the row is NOT changed automatically and after "Enter" the row height is NOT adjusted to show the whole text.
I think this is not logical.
What would be the trick to get excel to automatically adjust the row height also in the case of "Wrap Text" combined cells? Any VBA solutions? (Basically you could, maybe, count how many line changes the combined cell has and adjust the rows.height property accordingly but...

In powerpoint VBA, how to change the spacing of a font in a textbox?

Do you know what the command in VBA is in order to space out some text?
I looked on the internet and didn't find anything that would work.
this "SOMMAIRE" textbox has no spacing
and this, is what I want that textbox to look like :
there is more space in between the letters
more exactly, I am looking for the VBA code for this exact button :
Use the shape's .TextFrame2.TextRange.Font.Spacing property. By default it is probably 0. You can change it to other values to increase the font spacing.
Just wanted to add that auto-kerning is also a factor so you'll want to remove that too:
'Set character point spacing to zero
.TextFrame2.TextRange.Font.Spacing = 0
'Remove automatic kerning
.TextFrame2.TextRange.Font.Kerning = False
The kerning property can be viewed manually if you select the shape and in the Font group on the HOME ribbon, click the notch in the bottom right and then go to the Character Spacing tab - you will see a checkbox there where this property is set.

Wrong width calculation for words in PDF

I have a PDF, which has WinAnsiEncoding(Times) and it do not have any toUnicode or differences encoding.
When I try to select or highlight text, width of text is not calculated properly.
I have all the widths but somehow width is calculated incorrectly. What can be the problem? How can I get correct CID of character in order to find correct width of the glyph? I have attached screenshots for the same. "EXPLANATIONS" word is not selected completely. This can happen only if the widths of glyph are calculated incorrectly.

SizeWithFont of Text With Justification applied?

Is there a way to calculate the size of the justified text in Xcode.I am using a uitextview to show my text and I don't want the text to appear in more than 11 lines.There are methods like
sizewithfont I have used them but even after calculating the size and only populating the
uitextview with the specific amount of text when I apply NSTextAlignmentJustified more lines
are produced than actual ones !
Is there a way to calculate sizewithfont with justification ????