hyphenation

Hyphenation in native iOS app

江枫思渺然 提交于 2019-12-20 09:20:56
问题 How can I activate automatic hyphenation in iOS? I have tried to set the hyphenation factor to 1 in the attributed text options of an UILabel, however I don't get any hyphens though. 回答1: The iOS 7 way . Use an UITextView instead of an UILabel . The hyphenationFactor (either as a NSParagraphStyle attribute or as a NSLayoutManager property) should work then (thanks to the new TextKit). The Web way . Use an UIWebView and the -webkit-hyphens CSS properties. The Core Text or the hard way . Use

Enforce Hyphens in .NET MVC 4.0 URL Structure

孤街浪徒 提交于 2019-12-18 17:22:30
问题 I'm looking specifically for a way to automatically hyphenate CamelCase actions and views. That is, I'm hoping I don't have to actually rename my views or add decorators to every ActionResult in the site. So far, I've been using routes.MapRouteLowercase , as shown here. That works pretty well for the lowercase aspect of URL structure, but not hyphens. So I recently started playing with Canonicalize (install via NuGet), but it also doesn't have anything for hyphens yet. I was trying... routes

CSS3 Automatic Word Hyphenation works on FireFox, not on Internet Explorer and Chrome

心已入冬 提交于 2019-12-18 09:06:43
问题 According to this link not only FireFox but also Internet Explorer should support the use of automatic hyphenation in css/html, however my demo (using the Dutch language, which is supported by IE). SEE MY CSS DEMO where hyphenation does work flawlessly on FF 42 but not on current IE 11 while it should be supported. What am I doing wrong? Below the css and html i'm using. article p{ -webkit-hyphens : auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } <article lang="nl"> <p>........<

How to optimize hyphenation

[亡魂溺海] 提交于 2019-12-13 14:49:03
问题 I'm struggling with the different ways browsers handle hyphenation for justified text from line to line. I have the following css settings for my text: text-align: justify; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; My language setting is en . One word that is being handled inconsistently is "expressing": Chrome: no hyphenation Firefox: express-ing [correct!] IE11: express-ing [correct!] Safari: express-ing [correct!] Bafflingly, Safari is able to hyphenate

CSS Hyphens Not Working in Firefox?

瘦欲@ 提交于 2019-12-12 10:49:03
问题 I am attempting to use CSS Hyphens. They work in IE 11 and Safari but does not work in Firefox properly and I am unsure why. Here is an example: .container{ width: 16.6667%; background:#ccc; } h3{ font-size: 0.95rem; font-weight: 600; -moz-hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } <div class="container"> <h3>DIAGNOSEVERFAHREN</h3> </div> When you run the snippet in Firefox the word DIAGNOSEVERFAHREN overflows the container and does not break. In Safari and IE

How to use this Hyphenation library in delphi?

99封情书 提交于 2019-12-12 05:03:57
问题 This is a hyphenation lib by Synopse delphi open source. The demo is a console application. I do not know how to use it in GUI application. Below is my test, but not work. It does not display word with hyphen (or separaror). The lib can be downloaded here: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, hyphen, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private procedure

Remove punctuation but keep hyphenated phrases in R text cleaning

给你一囗甜甜゛ 提交于 2019-12-10 22:14:10
问题 Is there any effective way to remove punctuation in text but keeping hyphenated expressions, such as "accident-prone"? I used the following function to clean my text clean.text = function(x) { # remove rt x = gsub("rt ", "", x) # remove at x = gsub("@\\w+", "", x) x = gsub("[[:punct:]]", "", x) x = gsub("[[:digit:]]", "", x) # remove http x = gsub("http\\w+", "", x) x = gsub("[ |\t]{2,}", "", x) x = gsub("^ ", "", x) x = gsub(" $", "", x) x = str_replace_all(x, "[^[:alnum:][:space:]'-]", " ")

How to force hyphenation in TextView? (character “-” on word split)

岁酱吖の 提交于 2019-12-10 21:53:16
问题 I'm using a TextView extension class which writtes a String like a type writter, character per character. It works fine but when is writting a workd which not fit in the current line, it makes a annoying behaviour and deletes the non fitting workd from the current line and writtes it into the next line. Welcome all. I need to know how to tell a TextView to use Hyphenation, it must force word breaks like this: superlargewo- rd verylarg- eword It means putting character - instead of passing the

HTML element attribute names with hyphens are auto-converted to camelcase

孤街浪徒 提交于 2019-12-10 15:57:30
问题 I'm building a custom AngularJS directive to create a google map, and I've stored some of the google map options in custom attributes within my tag: <googlemap zoom-control="true" …></googlemap> Angular's directive compile method has parameters (tElement, tAttrs, transclude) ; when I log tAttrs to the console, the object has properties with names that have converted hyphens to camelCase: Who is doing this—Angular or the browser (checked in Firefox & Chrome)? Can I rely on this behaviour? P.S.

Can I use CSS to justify text with hyphenating words at the end of a line?

让人想犯罪 __ 提交于 2019-12-05 06:06:44
I have a div that is too narrow to text-align:justify (gaps too wide), but yet looks un-uniform when right- or left-justified, because then there is a large gap at the end of lines. Left-justified looks best, but could I use hyphenation, like in books? Using CSS? You can use hyphens: auto provided that you have declared the content language in HTML, e.g. using <html lang=en-US> . Browser support is still limited but getting better, see http://caniuse.com/css-hyphens For good quality, you may need to manually control hyphenation e.g. by using soft hyphens ( ­ ) in words that might otherwise be