[Mono-dev] Advanced Text Drawing Support?

jddunlap jddunlap at gmail.com
Wed Jan 26 14:06:50 EST 2011


I am trying to port a library that needs direct control over the placement of
the individual characters in the text it draws - basically all I need is to
be able to get a series of character widths, and then make a drawing call
where I send character positions for each character along with the actual
text.

On .NET + Windows I use DrawDriverString via P/Invoke to draw the text. I
know this method is not implemented in libgdiplus, but is there an
alternative?

In the Windows version I use GDI's GetCharacterPlacement API to get the
widths. MeasureCharacterRanges would work, but with the MS GDI+
implementation, it has a 32-character limit so I avoided it - does it have
this limit with Mono's libgdiplus?

My library depends on a 3rd-party library that uses System.Drawing, so I
have to be able to render the text on a Graphics object (i.e. I can't just
switch everything over to Cairo). I would prefer not to force it to depend
on WINE, just for one or two APIs. Is there any way I can control character
placement in Mono, without making a separate call for each character (which
would totally kill perf)?
-- 
View this message in context: http://mono.1490590.n4.nabble.com/Advanced-Text-Drawing-Support-tp3238634p3238634.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list