holidaysjnr.blogg.se

Non breaking space code javascript
Non breaking space code javascript










The first method will always work and is a simple version of what I use for my own rich text processing. This probably (without testing it) will work to give you much the same information as the first method without the looping: the key bit that makes me uncertain is the phrase "below" the drawing area, and if your line is unbreakable it may think it processed the entire text. The number can be the length of the string or the index of the first line that falls below the drawing area." You should Member which is "the number of characters processed by drawtextex, including white-space characters. Concatenate these substrings withīetween each to force a manual break, then draw with That is, find the subset from index 0-n which fits horizontally in the width of your drawing area find the string from n+1-m which fits horizontally again repeat until you hit the end of your string. To calculate the size of the rectangle - loop, shortening your string, until you've found the string for the first line, then repeat for the remaining string.

non breaking space code javascript non breaking space code javascript

You will need to look after the breaks yourself. From the DrawText documentation on MSDN, this:












Non breaking space code javascript