typography

Is there a way to automatically control orphaned words in an HTML document?

谁说胖子不能爱 提交于 2019-11-29 03:37:20
I was wondering if there's a way to automatically control orphaned words in an HTML file, possibly by using CSS and/or Javascript (or something else, if anyone has an alternative suggestion). By 'orphaned words', I mean singular words that appear on a new line at the end of a paragraph. For example: "This paragraph ends with an undesirable orphaned word." Instead, it would be preferable to have the paragraph break as follows: "This paragraph no longer ends with an undesirable orphaned word." While I know that I could manually correct this by placing an HTML non-breaking space (   ) between the

Is it possible to have text-overflow: ellipsis without white-space: nowrap?

女生的网名这么多〃 提交于 2019-11-29 02:33:10
问题 It seems that text-overflow: ellipsis is dependent on white-space: nowrap . The problem with this is that it limits the text to one line. However, what if I need to have 4 lines, and the ellipsis on the last line in the case of overflow? What it's currently doing... Lorem ipsum dolor sit amet ... What I want... Lorem ipsum dolor sit amet, consectetur adipisicing el- it, sed do eiusmod tempor incididunt ut labore et ... 回答1: Unfortunately the behavior you are seeing is correct for text

'Segoe UI' font with font-face & local

巧了我就是萌 提交于 2019-11-29 02:22:48
问题 I want to use the "Segoe UI" font in a website if it is installed in the user's computer. I have declared all the styles with @font-face in order to use the font-weight property to change the thickness of the font (it's a really cool feature!). The problem is that I cannot do it work with Segoe UI Bold (I think the name is wrong). Any idea? Here an example. (4) and (5) would be the same: http://jsfiddle.net/kxHQR/1/ @font-face { font-family: 'Myname'; font-style: normal; font-weight: 700; src

How to properly set line height for Android?

女生的网名这么多〃 提交于 2019-11-28 21:02:18
I am a UX architect working with a team of Android developers that are mostly junior. We are having issues properly setting line height in Android. We are using the Material Design spec as our guide for our app. In particular, you can see line height specs here: https://material.google.com/style/typography.html#typography-line-height Let's use Body 2 as our example. The spec says the type is 13sp or 14sp, and the leading (line height - same thing) should be 24dp. Here's the problem: these devs are telling me there is no such way to set line height like that in the code. Instead, they are

font-feature-settings: What is the correct syntax?

怎甘沉沦 提交于 2019-11-28 19:33:20
I purchased a webfont that supports some open type features and of course I want to use them. Unfortunately, I wasn't able to find a source online that explains the best way to use the syntax - it seems to me that font-feature-settings are another example of prefix hell. At the moment I have it written like that but I am not sure if it covers really all browsers that support those features. .element { -webkit-font-feature-settings: "kern" 1, "liga" 1, "case" 1; -moz-font-feature-settings: "kern=1", "liga=1", "case=1"; -moz-font-feature-settings: "kern" on, "liga" on, "case" on; -ms-font

What is the proper HTML entity for the “x” in a dimension?

你说的曾经没有我的故事 提交于 2019-11-28 19:28:34
问题 Is the proper HTML entity for giving dimensions × ? I want to be semantically correct, but that begs the question, is listing a dimension as 2" x 3" even semantic? If the x represents "by", would I use the letter x or ×? In my code I've been using 2″ × 3″ , or 2″ × 3″. The non-breaking spaces are to prevent the dimension from being wrapped, as per the suggestions found in The Elements of Typographic Style Applied to the Web. 回答1: × Unicode: U+00D7 MULTIPLICATION SIGN HTML: × , × CSS: \00d7

Should I avoid using “text-align: justify;”?

本秂侑毒 提交于 2019-11-28 15:38:00
Is there any reason to avoid using text-align: justify; ? Does it reduce readability or cause problems? Firstly, this is purely a design-related problem and solution. The design of your grid specifies if justifying text is needed. I think justify align alone has no major effect on usability. Bad typography that makes text illegible is what decreases usability. That said, make sure you have solid contrasts and a good balance of spacing in your type. Font-size matters too. This site is a successful attempt at justifying text online. Since you can't control the spaces between letters and words

Is there a way to make a variable width font act like a fixed width font in HTML? [duplicate]

青春壹個敷衍的年華 提交于 2019-11-28 11:57:31
This question already has an answer here: Force Non-Monospace Font into Fixed Width Using CSS 8 answers Is there a way to make a variable width font act like a fixed width font in HTML? For example, if I have the sentence, "The quick grey fox jumped over the lazy dog" displayed in "Courier New", a fixed width font, it would be wider overall than if it was in a variable width font like, "Arial". I would like to use "Arial" instead of "Courier New" but have the characters fixed width. Example of variable width: The quick grey fox jumped over the lazy dog. Example of fixed width: The quick grey

CI:使得CI在NetBeans 8.0中自动提示CI相关类和方法

假装没事ソ 提交于 2019-11-28 11:08:15
把这两个文件放到项目文件根目录的nbproject文件夹下面,运行index.php如: http://localhost/你的CI目录/nbproject/index.php ,之后重启netbeans。试试写$this->看后面出现什么!哈哈哈 index.php =============================================== <?php $filearr = file('CI_Autocomplete_2.0.php'); $startpos = array(); $conpos = 0; $modpos=0; getpos($startpos, $conpos, $modpos, $filearr); $model = ''; $lib = ''; $resultnames = array(); //getdirfilesname('../application/models'); $filesmodel = ListFiles('../application/models'); $fileslib = ListFiles('../application/libraries'); $tets=filenamechange($filesmodel); $resultnames = array_merge(array(filenamechange

BoldDays for TDateTimePicker?

百般思念 提交于 2019-11-28 10:30:53
问题 I'm using Delphi7 and I'd like to bold some days of a TDateTimePicker control. I've read that, originally, it's a descendant of TMonthCalendar , thus it should be possible. I've also found some example code, but it's in C#: http://social.msdn.microsoft.com/Forums/en/winforms/thread/03527023-694d-41ab-bffb-18c59fca1fda Please note that I don't want to use any third party DateTimePicker controls, I'd like to stay with the standard one. 回答1: You are both right and wrong :-) See: http://www