[cairo] Accented characters and guimette
nev.delap at intelestream.net
Sat Oct 9 10:55:57 PDT 2010
As for the exact version of Cairo that I am using I don't know. I'm using
Mono.Cairo in Mono 2.6.7 on Linux, and the problem shows in Mono 2.6.4 and
2.8 on Windows. But the virtual machine in which I'm running it has 800
other things, so when I test it in clean Windows VM to figure out exactly
what it needs to run on that platform I will have a better idea since I
haven't looked deeper yet.
In case anyone does need a workaround, this is Cobra code (.Net) and extends
Context with a couple of methods that will strip accents and replace
guillemet, which until I investigate Pango makes my app work in Windows.
# $Id: Extension.Mono.Cairo.Context.cobra,v 0197babc4e6f 2010/10/09 09:47:04
def textExtentsForPlatform(s as String) as TextExtents
def showTextForPlatform(s as String)
def _transformForPlatform(s as String) as String
On Windows guillemets and accents break
the context - it cannot output anything
subsequently. So if it is not Linux I strip
that stuff out since I don't know what
Mac OS/X would do so I'm playing it safe.
platform = Environment.osVersion.platform to int
isRunningOnLinux = platform == 4 or platform == 128
if not isRunningOnLinux
s = s.replace("«", "<<")
s = s.replace("»", ">>")
s = _stripAccents(s)
def _stripAccents(s as String) as String
stringBuilder = StringBuilder()
for originalChar in s
if decomposedCharacters.length == 1
for decomposedCharacter in decomposedCharacters
if decomposedCharacter to int < 128 # If it is ascii
On 9 October 2010 06:06, justi <justi_10 at rediffmail.com> wrote:
> Hi Nev
> We are woking at present on cairo with openvg backend(ARM linux).
> If yours cairo code uses the same backend please share the code ,we can run
> it on windows and see the nature of problems.
> On Sat, 09 Oct 2010 14:00:44 +0530 wrote
> Hi there,
> I am using Cairo in a Mono application on Linux where it works perfectly.
> I'm running the application on Windows (exact same code running in Mono
> My problem is that running on Windows when it either does
> context.TextExtents() or context.ShowText() with guillemets or characters
> with accents, no subsequent output is producted. It doesn't get an
> exception, doesn't write anything to the console, it just doesn't draw
> anything more on that context.
> This is only on Windows, on Linux no problem.
> So, I want to ask is it a known problem, if so, is there any workaround, if
> not is there something you can suggest to help me track down something
> useful to provide you for debugging? And if I made a minimal Mono
> application that works on Linux and shows the problem on Windows would you
> be able to use that?
> >cairo mailing list
> >cairo at cairographics.org<http://firstname.lastname@example.org&output=web&els=0a23248c7fe46ba46c52f889070eaa55>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo