• I’ve been using WP for a while now, and I like it, but there’s one little thing that annoys me, and I’m not sure if it’s something in WP, in the CSS, or somewhere else. I use a double dash quite often in my sentences. It represents an aside or a tangent.

    However, when typing a double dash–as I frequently do–something in the program translates it to an “em-dash”–a single dash of (supposedly) longer length. However, it’s *not* longer. It’s virtually impossible to differentiate from an “en-dash” (a hyphen). I want the double-dash, not the em-dash.

    Any clues?

    Version: WP 1.5 (though this was a problem in older versions, too)
    character encoding: UTF-8
    font-family: ‘Arial’, Verdana, sans-serif;

Viewing 7 replies - 1 through 7 (of 7 total)
  • If you have te Markdown and/or textile active, turn them off they always change your code.

    Arial doesn’t seem to have an en or em dash. (at least on my mac version) only the hyphen.

    It’s virtually impossible to differentiate from an “en-dash” (a hyphen).

    hyphen – (concatenation…pro-create)

    en dash – (series…2000–2005)

    em dash — (a harder break than a comma but less than a period)

    three types, all different.

    Thread Starter Blaze Miskulin

    (@blazemiskulin)

    Sleep: I’m aware of the difference. However, a keyboard doesn’t have an en-dash or em-dash, it only has a hyphen, and others may not know what they are.

    The double-dash is an accepted alternative for the em-dash, and in virtually all common usage, the hyphen is used in place of the en-dash. And the hyphens in my posts actually look like an en-dash (longer than a hyphen).

    My dilema is that something is changing my hyphens into something else. I want it to stop. 🙁

    xmarcos: I don’t have either of those plug-ins activated. I don’t have any plug-ins active, actually. I also tried turning off the emoticons (just on a whim) and that didn’t affect it, either.

    You could add a class to your CSS to make the double-hyphen the length you prefer – but then you’d have to “span-class” every time you wanted to use it. Unless there’s a way to include it in the “html, body”…. I’ll have to play with it a bit, never thought about it….

    Thread Starter Blaze Miskulin

    (@blazemiskulin)

    Fixed!

    I posted this question in another forum, and a friend happened to be really bored this morning and decided to dig through the code. 🙂

    The culprit is the “functions-formatting.php” file:

    the em-dash:
    $curl = str_replace('--', '& # 8211 ;', $curl);

    the elipsis (another punctuation that I tend to abuse)
    $curl = str_replace('...', '& # 8230 ;', $curl);

    I deleted those two lines, and it’s the way I want it now.

    You could also turn off the formatting by commenting out the wptexturize ‘add_filter’ lines in wp-includes/default-filters.php, or through a plugin…

    http://www.coffee2code.com/archives/2004/06/27/plugin-wpuntexturize/
    (Doesn’t hit en and em dashes, but they could be added to it.)

    http://dev.wp-plugins.org/wiki/TextControl

    delete or comment out line 14 of functions-formatting.php

    $curl = str_replace('--', '–', $curl);

    might do the trick…

    Took too long to post :^)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Font-rendering question.’ is closed to new replies.