4 ms·
It would be fine if it just changed visually depending on the context, without actually changing the underlying character data.
by daemin 9y ago
It would be fine if it just changed visually depending on the context, without actually changing the underlying character data.
- LeoNatan25 9y agoThen it would have to be a feature of the font, and I am not familiar with any font that does that automatically. Technically, it might be possible, with advanced scripting available in OpenType, but considering how even the most basic of ligatures are unsupported under most Linux and Windows fonts, I would not have my hopes up to have this any time soon.
- aoloe 9y agoAs far as i know it's (very) hard to do correctly. There are (small or big) differences among languages and it is not always obvious to detect ,if the quote should be converted at all, if it's a left one, or a right one. As a reference, this is a Python Script trying to do the conversion in Scribus: https://wiki.scribus.net/canvas/Convert_Typewriter_Quotes_to_Typographic_Quotes https://wiki.scribus.net/canvas/Convert_Typewriter_Quotes_to... There is also an article by the author of the script, explaining his work and pointing to at least one common case it cannot handle: https://opensource.com/article/17/3/python-scribus-smart-quotes https://opensource.com/article/17/3/python-scribus-smart-quo... Putting all this logic in a font might or not be something your really want... But I 100%: this should be done at the font level... and hard replacing characters is not a good solution.
- TeMPOraL 9y agoAnd here it would be creating a very insidious problem - representation (external format) disconnected from underlying data (internal format). What I mean is, for example, this: when I see " in a comment, I know the browser is actually storing the " character somewhere in memory. I know that when I send this comment form, HN will receive " character. If I copy and paste the comment into my Emacs, and save it, I know my hard drive now stores the " character. When external format gets completely disconnected from internal format, understanding anything about what happens with the data gets much more difficult.
- LeoNatan25 9y agoWhat about ligatures and other font character substitution features? What will you Emacs do then and why does it matter? As we advance further, we should strive to disconnect from the technology—which should just work, despite how complex it is.
- daemin 9y agoBut we already have that with things such as style sheets, where you can specify font styles which transform the text to all upper case, all lower case, small caps, etc. And as another comment pointed out there's even ligatures, which interpret a sequence of characters and render them together with a different singular glyph.
- Zarel 9y agoThe problem is that you can't really detect which single quotation mark to use unambiguously. 'n' can either be an abbreviation of "and", or a single-quoted letter "n". as an abbreviation of "and", it should be rendered as [right single quote]n[right single quote] ’n’ and as a single-quoted letter "n", it should be rendered as [left single quote]n[right single quote] ‘n’
- jimmies 9y agoIf you can't determine it automatically, then why is that "feature" there in the first place?