soft-hyphen

How to implement soft hyphen in Android w/ React Native Text

不打扰是莪最后的温柔 提交于 2020-05-27 03:13:17
问题 <Text> Aufmerksamkeits{'\u00AD'}defizit </Text> This leads on iOS to Aufmerksamkeits- defizit But on Android to Aufmerksamkeitsd efizit So it seems that Android ignores the given soft hyphen. How can I make this work on Android as well? Thanks! 回答1: I have the same problem and it seems that Android ignores soft hyphens. The only workaround I could think of is, only on Android , to replace the \u00AD with \u200B . It's known as zero-width-space, and it would properly break the words where

Add soft hyphens in a CMS: getting it to work in Chrome

删除回忆录丶 提交于 2020-01-06 14:15:26
问题 ­ is awesome, especially because it works in all popular browsers. You put it in the middle of a word, which tells the browser that the word may be broken in that place. If it does get broken there, a hyphen appears. If it doesn't, the character remains invisible. But it's not very easy to use for content authors: you have to go into the HTML to add it. Even if you can add it in a CMS, you can't see where it is as soon as you inserted it. So I went ahead and declared an inline style in my CMS

HTML: Soft hypen (­) without dash?

◇◆丶佛笑我妖孽 提交于 2019-12-30 08:13:08
问题 I have a little layout problem: on a clients website, we show contact information of people in a little box. The width of that box is constrained. As it happens, there are people with very long names (this is in Germany, after all...), and the email address is a concatenation of the given name and family name. The result: with certain names, the email address overflows the constraints given by the about box. Inserting a ­ before the @ results in the correct line break, but looks like this:

Soft hyphen in HTML (<wbr> vs. ­)

◇◆丶佛笑我妖孽 提交于 2019-12-17 03:22:57
问题 How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whole word is on the same line. According to comments on this page <wbr> is a non standard "tag soup invented by Netscape". It seems like ­ has its problems with standard compliance as well. There seems to be no way to get a working solution for all browsers. Which is your way for handling soft

Using ­ in Java HTML aware Component

浪子不回头ぞ 提交于 2019-12-09 21:52:45
问题 I have following problem: I display an HTML-Document with an JTextPane. In my HTML-Text there are ­ (shy at w3.org) to make a soft-hyphenation. My problem is, that no hyphenation appears. Is there some kind of flag, which I don't know, to use these option? Following Programm will show the problem: package com.dvelop.ckue.swing; import javax.swing.*; import javax.swing.text.html.HTMLEditorKit; import java.awt.*; public class SwingGui extends JFrame { public static void main(String[] args) {

In HTML, is it possible to insert a word wrapping hint?

旧巷老猫 提交于 2019-12-05 09:10:03
问题 Imagine I have a long, multi-word line of text in a DIV: Hello there, dear customer. Please have a look at our offer. The DIV has a dynamic width. I want to word wrap the above text. Currently, the wrapping happens on a word boundary which maximizes the length of the first line: |-DIV WIDTH------------------------------------| Hello there, dear customer. Please have a look at our offer. I would prefer that the wrapping happen on the sentence boundary. However, if no wrapping is necessary, I

Using ­ in Java HTML aware Component

一笑奈何 提交于 2019-12-04 17:44:08
I have following problem: I display an HTML-Document with an JTextPane. In my HTML-Text there are ­ (shy at w3.org) to make a soft-hyphenation. My problem is, that no hyphenation appears. Is there some kind of flag, which I don't know, to use these option? Following Programm will show the problem: package com.dvelop.ckue.swing; import javax.swing.*; import javax.swing.text.html.HTMLEditorKit; import java.awt.*; public class SwingGui extends JFrame { public static void main(String[] args) { SwingGui sg = new SwingGui(); sg.setSize(new Dimension(200, 800)); sg.setPreferredSize(new Dimension(200,

In HTML, is it possible to insert a word wrapping hint?

不想你离开。 提交于 2019-12-03 22:18:17
Imagine I have a long, multi-word line of text in a DIV: Hello there, dear customer. Please have a look at our offer. The DIV has a dynamic width. I want to word wrap the above text. Currently, the wrapping happens on a word boundary which maximizes the length of the first line: |-DIV WIDTH------------------------------------| Hello there, dear customer. Please have a look at our offer. I would prefer that the wrapping happen on the sentence boundary. However, if no wrapping is necessary, I would like the line to remain as one. To illustrate my point, please look at the various DIV widths and

Removing soft hyphens from a string

别来无恙 提交于 2019-12-01 05:18:31
问题 Let's say I have a string that is littered with soft hyphens (pretend that the hyphens in the text below are soft hyphens): T-h-i-s- -i-s- -a- -t-e-s-t-.- I want to remove the soft hyphens and only return the string of: This is a test. I'm trying to do this in JavaScript. Below is the farthest I have gotten so far: RemoveSoftHyphen: function (text) { var result = text.match(/[^\uA00AD].*/); alert (result); return result; } When the alert displayed, all I got was a "-", which I'm not sure

HTML: Soft hypen (­) without dash?

▼魔方 西西 提交于 2019-12-01 03:39:39
I have a little layout problem: on a clients website, we show contact information of people in a little box. The width of that box is constrained. As it happens, there are people with very long names (this is in Germany, after all...), and the email address is a concatenation of the given name and family name. The result: with certain names, the email address overflows the constraints given by the about box. Inserting a ­ before the @ results in the correct line break, but looks like this: john.doe- @example.com Is it possible to suppress that dash? I don't want to use <br /> , because for 90%