简体   繁体   English

CSS字母间距不适用于Safari中的SVG字体吗?

[英]Does CSS letter-spacing not work with SVG fonts in Safari?

The title pretty much says it all. 标题基本概括了所有内容。 I'm generating font-face kits using font squirrel and I am having issues with letter spacing in Safari. 我正在使用font squirrel生成font-face工具包,我在Safari中遇到字母间距问题。

As webkit browsers render SVG fonts so much nicer than WOFF fonts, I obviously want to use SVG. 由于webkit浏览器渲染SVG字体比WOFF字体好得多,我显然想要使用SVG。 However I noticed that letter-spacing doesn't seem to be working in Safari. 但是我注意到字母间距似乎在Safari中不起作用。 Is this a known issue? 这是一个已知的问题?

Probably you can refer previous posts on this, 可能你可以参考以前的帖子,

Safari, letter-spacing with custom font Safari,使用自定义字体的字母间距

Is there a way to make css letter-spacing: 0.5 px? 有没有办法让css字母间距:0.5 px?

Safari Bug Safari Bug

This link of bug says that using JavaScript you can assign the spacing. 这个bug的链接说使用JavaScript你可以分配间距。 Its weird bug.. 它奇怪的错误..

I am sure this links will give you some insights.. 我相信这个链接会给你一些见解..

I have found one Fiddle [Fiddle] 4 我找到了一个小提琴[Fiddle] 4

That will reduce your work, perhaps this works fine in Chrome now I am using version 26 of Chrome. 这将减少你的工作,也许这在Chrome中运行良好,现在我使用的是Chrome版本26。 I do not have safari installed, as I am not one of the safari fan. 我没有安装safari,因为我不是野生动物园的粉丝之一。 :) :)

As pointed out by MarmiK, this is a known issue in the WebKit bug list (Bug #20606). 正如MarmiK所指出的,这是WebKit错误列表中的一个已知问题 (Bug#20606)。 The fact that it affects WebKit as a whole means that it should show up in Chrome, Safari and any other WebKit browser. 它影响WebKit作为一个整体的事实意味着它应该出现在Chrome,Safari和任何其他WebKit浏览器中。

The latest on the bug, however, is that it was picked up by one of the Chromium developers on or around 2013-03-22 , which is major progress as the bug remained unassigned for nearly 4 years. 然而,该问题的最新消息是它被一位Chromium开发人员在2013-03-22左右接收,这是一项重大进展,因为该漏洞近4年未被分配

Given that other typographic / alignment type bugs have been fixed recently (such as 99439 , which relates to implementing text-align-last ), it seems that the WebKit development community is in the process of focusing some of these issues down. 鉴于最近已经修复了其他排版/对齐类型的错误(例如99439 ,这与实现text-align-last ),似乎WebKit开发社区正在关注其中一些问题。

If you want to keep track of the ongoing development around this issue, please continue to follow the Bug 20606 History , or track the Bug 20606 Discussion . 如果您想跟踪围绕此问题的持续开发,请继续关注Bug 20606历史记录 ,或跟踪Bug 20606讨论 The first link will show you progress / commits / edits related to the bug and its development efforts. 第一个链接将显示与错误及其开发工作相关的进度/提交/编辑。 The second will show you the user / developer conversation around the bug, as well as the auto-generated commentary of the Build Bot , as it runs unit-tests against any relevant checked-in code. 第二个将向您展示围绕该错误的用户/开发人员对话,以及Build Bot自动生成的注释 ,因为它针对任何相关的签入代码运行单元测试。

Finally, to check in any given build of your preferred browser against other benchmarks for this implementation, take a look at this link . 最后,要根据此实现的其他基准检查您的首选浏览器的任何给定版本,请查看此链接 The top-left will display your browser's rendering, and the screenshots below will show other browsers (a little outdated at this point) - and how they implement non-integer letter-spacing values. 左上角将显示浏览器的渲染,下面的屏幕截图将显示其他浏览器(此时稍微过时) - 以及它们如何实现非整数letter-spacing值。 Alternatively, you can see something similar by referring to this jsFiddle . 或者,你可以通过参考这个jsFiddle看到类似的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM