glyph

Using NSLayoutManager to calculate frames for each glyph

吃可爱长大的小学妹 提交于 2019-12-03 10:39:27
On this thread, Core Text calculate letter frame in iOS , they were able to calculate the frame of each glyph very precisely using Core Text. The final rects hug the actual drawn glyphs perfectly. Using NSLayoutManager's boundingRectForGlyphRange:inTextContainer: doesn't seem to return the glyph bounding boxes that precisely: And the returned rects don't fully enclose more complex fonts (Zapfino example): Does anyone know how to replicate the results from the above mentioned discussion without going into Core Text under iOS 7 only apps? Thanks. ugiflezet I've found a solution for this issue or

What's the unicode glyph used to indicate combining characters?

廉价感情. 提交于 2019-12-03 05:35:13
My application needs to display "orphaned" combining characters. I would like to use the same format as the "official" unicode charts, using the dotted circle placeholder. See, for example: Combining Diacritical Marks (PDF) A quick scan through the charts and I came up with U+25CC "DOTTED CIRCLE". That looks good, but the note on this character reads: note that the reference glyph for this character is intentionally larger than the dotted circle glyph used to indicate combining characters in this standard; see, for example, 0300 Which says (I think) that U+25CC is not the correct character.

Glyphicon works locally but not on Heroku

Deadly 提交于 2019-12-02 23:10:57
If you look at my app here: http://quiet-brushlands-5712.herokuapp.com/ , close to the button is an icon, a glyphicon. But it's not appearing on heroku. locally it show as nicely like this: I tried the "solution" from here Using boostrap.css file in Rails production/heroku w/o LESS or SASS and from other links in Google. I need the glyph to show on Heroku as well. Any help? I didn't download the Twitter Bootstrap manually, I'm just using a gem. In my Javascript console I have this: GET http://quiet-brushlands-5712.herokuapp.com/assets/glyphicons-halflings.png 404 (Not Found) My Gemfile if it

How to get glyph widths by parsing a TTF font file?

蹲街弑〆低调 提交于 2019-12-02 13:32:13
问题 For capturing the glyph widths of a TrueType font, I convert the corresponding TTF file by fontforge into AFM , which is in text format (not binary). Then, parsing the text file to capture the glyph widths. There should be easier way to directly parse the binary TTF file to capture the glyph widths. I appreciate a strategy for shell script or C, but any programming language is OK, as the idea is the key, and codes can be adapted. 回答1: Assuming you mean advance widths , what you're interested

How to “decode” eexec of font file?

人走茶凉 提交于 2019-12-01 06:14:10
I have a .pfa font file and I would like to read the "algorithm" for rendering the font. However, most of the information is hidden in binary in the line: currentfile eexec 743F8413F3636CA85A9FFEFB50B4BB27302A5F6C876586CCC1670A7EF5521E6ADE15AAB4 DD2DDDB83735311FC63DB80D2C96AECFA05BB67F865EA35934B4B79A203A8DD489B09C79 FF6EB9DBCFD889C3E73F8C94BC342AF671D6F688870A62EE1A0DF216E150FFEC64A8C2B7 509AD05C011599C1AD84E6C4B668E07EA219BD72663D8AF4CA8EC8E23AA90DE90BE940C6 6DB849CEDB3B64961365A7CCE47F4FC9E30FDEE4B14B90C2E0D8C344EBC974EABF417B3D

Number of characters in a string (not number of bytes)

丶灬走出姿态 提交于 2019-11-30 21:35:36
In a string in objective-c if I say something like [myStr length]; it returns a number which is the number of bytes but what can I use to return the number of characters in a string. For example: a string with the letter "a" in it returns a length of 1 a string with a single emoji in it returns a length of 2 (or even a length of 4 sometimes) this is because that is the number of bytes in the string... I just need the number of characters. I just whipped up this method. Add it to an NSString category. - (NSUInteger)characterCount { NSUInteger cnt = 0; NSUInteger index = 0; while (index < self

Number of characters in a string (not number of bytes)

折月煮酒 提交于 2019-11-30 17:43:37
问题 In a string in objective-c if I say something like [myStr length]; it returns a number which is the number of bytes but what can I use to return the number of characters in a string. For example: a string with the letter "a" in it returns a length of 1 a string with a single emoji in it returns a length of 2 (or even a length of 4 sometimes) this is because that is the number of bytes in the string... I just need the number of characters. 回答1: I just whipped up this method. Add it to an

Is there a list of characters that look similar to English letters?

Deadly 提交于 2019-11-30 10:29:35
问题 I’m having a crack at profanity filtering for a web forum written in Python. As part of that, I’m attempting to write a function that takes a word, and returns all possible mock spellings of that word that use visually similar characters in place of specific letters (e.g. s†å©køv€rƒ|øw). I expect I’ll have to expand this list over time to cover people’s creativity, but is there a list floating around anywhere on the internet that I could use as a starting point? 回答1: This is probably both

AngularDart Material Design 按钮

时光毁灭记忆、已成空白 提交于 2019-11-30 08:54:46
MaterialButtonComponent Selector: <material-button> 平面或凸起按钮,带有可选的波纹效果。 Attributes: 以下属性通常与<material-button>一起使用: icon: 如果存在,则删除按钮的最小宽度样式。 要指定按钮中的实际图标,请使用<glyph>,<material-icon>或<img>。 no-ink: 如果存在,则从按钮中消除涟漪效应。 clear-size: 如果存在,则从按钮中删除最小宽度和边距。 dense: 如果存在,将字体大小减小到13px,按钮高度减少到32px。 Styling: 指定按钮颜色的首选方法是使用mixins: /* Make #myButton green with yellow text */ @include button-background-color('#myButton', green); @include button-color('#myButton', yellow); 将mixin用于颜色的优点是它们不会覆盖禁用的状态颜色。您也可以像使用普通DOM元素一样使用CSS设置按钮的样式,尽管这也会影响禁用状态: /* Make #myButton green with yellow text */ #myButton { background: green;

Downsizing an .OTF font by removing glyphs

风格不统一 提交于 2019-11-30 08:04:28
I can't quite believe this question hasn't been asked specifically for OpenType fonts, but does anyone know of a way to remove glyphs from these fonts? I have an .OTF with a very large file-size (almost 10MB) and I need to make it smaller. The reasons are two fold. 1) I'm trying to prepare it for web embedding, so the smaller the files, the easier for the client. 2) Font Squirrel (used for easy preparation of font files) has a 2MB upload limit - I know there are alternatives, but none so far have been successful. To save wasting peoples time, the ones I've tried that have failed are http:/