C#中的连字符 [英] Hyphenation in c#

查看:50
本文介绍了C#中的连字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个示例项目,该项目将在C#中执行文本的断字功能.理想情况下,这将从TeX断字算法或类似算法得出.我目前对英语感兴趣,尽管将来可能需要其他语言.有人看到过类似的东西吗?背景我计划使用CoreText将其包含在MonoTouch项目中.

I'm looking for a sample project that will perform hyphenation of text in C#. Ideally, this would be derived from the TeX hyphenation algorithm, or similar. I'm interested in English currently, although other languages may be required in the future. Anyone seen something like that? background I'm planning on including this in a MonoTouch project using CoreText.

推荐答案

很显然,Donald Knuth的算法非常出色.尽管没有可用的C#实现,但是您是否考虑过将另一个实现转换为C#?(例如,您可以转换非常接近C#的Java实现.)

Obviously, Donald Knuth's algorithms are excellent. Although there is not a C# implementation available, have you considered converting another implementation to C#? (For example, you could convert the Java implementation which is fairly close to C#.)

另一种选择是使用更简单的实现,该实现可以在此处找到答案在StackOverflow上.

Another option is to use a simpler implementation which can be found over at this answer here on StackOverflow.

这篇关于C#中的连字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆