如何删除从WPF阿拉伯字符连接位置的行程?阿拉伯、行程、字符、位置

由网友(长安归故里)分享简介:我的项目中使用某些字体例如阿拉伯语字符,我也需要用笔划上的字体。我已经尝试一些方式来显示行程,这样的:My project use some font like Arabic character, I also need use stroke on the font.I already try some way...

我的项目中使用某些字体例如阿拉伯语字符,我也需要用笔划上的字体。 我已经尝试一些方式来显示行程,这样的:

My project use some font like Arabic character, I also need use stroke on the font. I already try some way to display the Stroke, like :

http://stackoverflow.com/a/9887123/1900498 (OuterTextBlock)

http://stackoverflow.com/a/97728/1900498 (OutlineText)

该行程现在可以显示,但问题是阿拉伯字符连接位置仍然显示一些行程,所以我需要将其删除

The Stroke can display now, but the problem is the Arabic character connection position still display some stroke, So I need to remove it.

这样的结果:

the result like this:

那么,有什么办法可以去除连接位置的行程?我的意思是如果该字符连接,在完整的连接只是行程如雷贯耳,不是所有的汉字笔划1次。

So Is there any way I can remove the stroke from the connection position? I mean If the character is connection, just stroke on the full connection outsize, not all character stroke 1 time.

我需要的结果是这样(我用的 PHOTOSHOP 以编辑第二张图片和字符连接位置取出中风,不是 WPF ,那就是只为你明白正确的结果,必须处理由WPF)

I need the result like this(I'm using PHOTOSHOP to edit the second picture and remove the stroke from character connection position, not WPF, that is just for you understand the correct result must handle by WPF)

更新: 请从2链接下载2类,然后用这个code:

UPDATE: please download the 2 class from the 2 link , then use This code :

<Window x:Class="test.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:test"
    Title="MainWindow" Height="200" Width="400">
<Grid Background="Black">
    <local:OutlinedTextBlock  HorizontalAlignment="Left" Height="200" VerticalAlignment="Bottom"  FontSize="150" StrokeThickness="1" Fill="White" Stroke="Red" TextDecorations="">ئالما</local:OutlinedTextBlock>
    <local:OutlinedText  HorizontalAlignment="Right" Height="200" VerticalAlignment="Top"  FontSize="150" StrokeThickness="1" Fill="White" Stroke="Red" Text="ئالما"></local:OutlinedText>
</Grid>

推荐答案

初步意见:您所看到的文物似乎是单个字符的实际边缘。字符触摸和轻微重叠,你会同时喜欢察觉几个字符作为连续的一个形状。

Initial observations: The artifacts you are seeing seem to be the actual edges of the single characters. The characters touch and overlap slightly, while you would like to perceive several characters as one consecutive shape.

我试图从我的意见建议,从的第一个链接的答案通过肯特Boogaart 。

I have tried my suggestion from the comments by extending the OutlinedTextBlock class from the first linked answer by Kent Boogaart.

借助 几何 例如从 BuildGeometry 方法包括嵌套的 GeometryGroup 情况下(至少,独立这些群体创建结合文字与几家阅读方向时)。通过这些团体跳水后,你会找到一个的的PathGeometry =nofollow的>

阅读全文

相关推荐

最新文章