问题标签 [uniscribe]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1061 浏览

text - Uniscribe Kerning

At work, I have been tasked with improving the text rendering of our application to better support text character kerning. Our application generates images that appear on Television, so image quality is paramount. Therefore, even small improvements to the appearance of any output we generate is very useful.

Our current text engine is implemented using Uniscribe, which seems to be an ideal solution. As mentioned here, it supports ligature substitution in a context aware fashion with complex scripts. It also handles right-to-left languages, and BiDi. This is all important as we need to be able to render arabic/cursive languages perfectly.

It therefore seems rather peculiar that Uniscribe doesn't appear to output glyph kerning information. I have attached a screenshot to demonstrate the issue.

alt text http://www.aliparr.net/kerning.jpg

My app performs the same as notepad in that every glyph appears 'monospaced'. Notice how in Photoshop CS2, the bridge at the top of the 'T' nicely overhangs the 'e'. I want to recreate this.

I am aware of other APIs such as Pango/Freetype - but it seems a rather heavyweight solution to include all of that just to do the final 1% of this task, if Uniscribe is so great at everything else.

Am I missing a step using Uniscribe? What is the best solution to this? Can Freetype export kerning information in a lightweight fashion, so that I can integrate it with the existing Uniscribe solution?

N.b. We only need to run on Windows - platform portability is thankfully not an issue I need to worry about right now.

Cheers in advance !

0 投票
1 回答
663 浏览

unicode - 启用复杂脚本支持后究竟会发生什么?

当我们在区域和语言设置中单击复选框“安装复杂脚本和从右到左语言(包括泰语)的文件”时,究竟会发生什么?

  1. 更改注册表项?
  2. 我注意到它安装了一些 .fon 文件和键盘 dll。

如果只想在 Windows XP 上阅读复杂的脚本,这是否完全有必要?我在以 Windows 7 为主机操作系统的 VirtualBox 中进行的测试似乎表明不需要启用读取复杂脚本。然而,这并不是所有关于这个主题的文献所说的。这是怎么回事?

更新:

如果未启用复杂脚本,则http://hi.wikipedia.org不可读

http://hi.wikipedia.org/wiki/विकिपीडिया:Davanagari_Help

问题是它是可读的。

0 投票
1 回答
490 浏览

delphi - 在 Delphi 中使用 ScriptGetProperties

如何在 Delphi 中使用 Uniscribe Dll (usp10.dll) 中的 ScriptGetProperties API

我在C++中找到了一个例子,但我不知道如何翻译它,因为我不擅长C。

Delphi 代码应符合 Turbo Delphi 2006 或更高版本。

0 投票
1 回答
492 浏览

windows - 为什么 FONTSIGNATURE 不反映 lfCharSet?

我正在枚举这样的 Windows 字体:

我的回调函数有这个签名:

对于 TrueType 字体,我通常会多次获取每个人脸名称。例如,对于多个呼叫,我将获取pelf->elfFullNamepelf->elfLogFont.lfFaceName设置为"Arial". 更仔细地查看其他字段,我发现每个调用都针对不同的脚本。例如,在第一次调用pelf->elfScript时将是"Western"并且pelf->elfLogFont.lfCharSet将是 的数字等价物ANSI_CHARSET。在第二次通话中,我得到"Hebrew"and HEBREW_CHARSET。第三次通话"Arabic"ARABIC_CHARSET。等等。到现在为止还挺好。

但是所有版本的 Arial 的字体签名( pMetrics->ntmFontSig) 字段都是相同的。事实上,字体签名声称所有这些版本的 Arial 都支持 Latin-1、希伯来语、阿拉伯语等。

我知道我要绘制的字符串的字符集,所以我试图根据字体签名实例化适当的字体。因为字体签名总是匹配的,所以我总是选择“西方”字体,即使在显示希伯来语或阿拉伯语文本时也是如此。我正在使用低级别的 Uniscribe API,所以我没有从 Windows 字体链接中受益,但我的代码似乎可以工作。

是否lfCharSet真的有任何意义,还是它是一个遗留物?我应该设置lfCharSetDEFAULT_CHARSET停止担心每张脸的所有脚本变化吗?

出于我的目的,我只关心 TrueType 和 OpenType 字体。

0 投票
3 回答
463 浏览

java - 印度文字的复杂文本布局

我正在为泰卢固语使用 unicode truetype 字体。我想在为泰卢固语指定的范围内输入一个 unicode 字符序列,并使用 java 函数来显示相应的字母。java 的哪个部分处理将序列分成簇?我相信在 Windows UNISCRIBE 中可以做到。我想知道 java 是否有类似的东西
sivachander

0 投票
1 回答
239 浏览

font-size - 如何使用 Uniscribe API 调整字体的宽度

请耐心等待,我是 Uniscribe 的新手,所以我希望这不是一个愚蠢的问题,但我无法在其他任何地方找到解决方案。所以,这里...

我正在尝试使用 Uniscribe API 来减小字体的宽度;也就是说,给定特定高度的特定字体,我希望能够将每个字符的宽度(以及所有相关间距)减少一些用户定义的百分比。

LOGFONT通过获取当前字体的结构并将lfWidth字段调整为其原始值的百分比,我成功地实现了这一点,而无需调用任何 Uniscribe 函数。我意识到这只是一个平均字符宽度,但它似乎有预期的结果。

但是,当我尝试使用 Uniscribe 做同样的事情时,我注意到该lfWidth字段在调用ScriptShape(). 结果,所有渲染的文本都使用其原始宽度输出。我不知道为什么会这样或如何解决它。

有没有人知道是否有可能做我想做的事情?

0 投票
2 回答
1388 浏览

windows - 如何获取 Unicode 字符的字形 unicode 表示

Windows 使用 uniscribe 库根据位置替换阿拉伯文和印地语字符。新字形仍然具有输入字符的原始 unicode,尽管它在 Unicode 中有其专用表示 如何获取实际显示内容而不是输入内容的 Unicode。

0 投票
3 回答
2305 浏览

c++ - 将 LTR 转换为 RTL?

如您所知,许多 ui 组件和开发工具不支持 rtl,我们可以称之为翻转文本,因为结果是相同的示例:

LTR

RTL

无论如何要将此 LTR 转换为 RTL ,我没有任何想法,语言无关紧要

实际上,我正在寻找一种解决方案来在 RAD Studio Firemonkey Application 中完成这项工作,因为您可能知道 firemonkey 应用程序不支持 rtl,它在 rad studio 的路线图中但尚未实施

0 投票
1 回答
987 浏览

c++ - Windows API 选择粗体

我正在尝试编写一些代码来选择粗体字体(我实际上想获取字体文件名以发送到跨平台字体渲染器,但这不太相关)。我使用 CreateFont() 将 cWeight 设置为 FW_BOLD 并将 pszFaceName 设置为“Arial”。我将此字体选择到 DC 中并使用 GetTextFace() 检查实际选择了哪种字体。结果是宋体。我很惊讶字体不是 Arial Bold,它是一个带有不同字体文件的单独面孔。指定 Arial Bold 字体的唯一方法是将 pszFaceName 设置为“Arial Bold”。不幸的是,简单地将粗体附加到字体名称的末尾仅适用于某些字体,因为某些字体没有单独的粗体字体。

是否有任何通用方法来指定粗体以确保返回字体的实际粗体版本?

谢谢

菲尔

0 投票
1 回答
224 浏览

truetype - Uniscribe 和文本大纲

我可以使用 Uniscribe 中 ScriptShape/ScriptItemize 的输出来获取字符代码并将字符代码传递给 GetGlyphOutline 以获取贝塞尔曲线吗?

Uniscribe 有电话直接获取大纲吗?