kamalx / typogrify

Automatically exported from code.google.com/p/typogrify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Handling unbreakable spaces in french typography [enhancement] #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Unfortunately, the default editor (and many others) in WP doesn't handle
the unbreakable space character, which is replaced by a simple space.
You need to edit the HTML code, look for every ' ' that needs to be
replaced by ' ' and replace it.

In french, (unbreakable) spaces are needed :
— inside quotes (e.g. « Here and here »)
— before double punctuation marks (i.e. ':', ';', '?' and '!'). Here, it
should be a thin unbreakable space. A (breakable) space is also needed
after them, but I recommend that the plugin does NOT add any space in text,
but just replaces ordinary space by unbreakable space where needed.

Examples :
[Before] « Ma recommandation : prendre en charge les espaces insécables.
Bonne idée ?! »

[After] « Ma recommandation : prendre en charge les espaces
insécables. Bonne idée ?! »

Other rules for unbreakable space :

Before '...' or '…' (e.g. …) if there is a space.
Examples :
WITHOUT SPACE : 'J'aime les carottes...'
WITH SPACE (should be unbreakable) : 'J'aime les carottes, les navets, les
oignons, ...'

In numbers, when (optionnaly) used as a thousands separator (instead of the
dot in english).
E.g. : Le montant à payer est de 10 785,73 Euros (h.t.)

Original issue reported on code.google.com by jeromein...@gmail.com on 5 May 2008 at 9:24

GoogleCodeExporter commented 8 years ago
Thank you for your comments. I'll definitely look into these once I get a 
chance to work on typogrify. However it 
looks like you're using WordPress, if that is the case WP uses the PHP version 
of typogrify which is a derivative of 
mine and one I have no control over. You may want to look into that.

Original comment by mintx...@gmail.com on 5 May 2008 at 3:16

GoogleCodeExporter commented 8 years ago
You're right, I thought this place was dedicated to the wordpress plugin, 
sorry! 
Anyway, unbreakable space in french are still a valuable concern. 
Regards.

Original comment by jeromein...@gmail.com on 5 May 2008 at 3:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I beg for it ! The way typogrify handles type is a big thing for webtypography 
on
"real" websites.  The next step ? Setting a way of internationalizing it... Not 
only
for french – even if I am french – but also for other languages. I think 
that not all
the language-specific rules can be achieved, but quotation marks for example is 
a
good point to start. 
Whatever, thank you for the work already done.

Original comment by bigjoejo...@gmail.com on 14 Nov 2008 at 7:59

GoogleCodeExporter commented 8 years ago
Hi. I'm back : ) Any news or perspective for french fine-type and unbreakable 
spaces
support ? 

Original comment by bigjoejo...@gmail.com on 15 Jan 2009 at 2:19

GoogleCodeExporter commented 8 years ago
This should do the trick… (Didn't add test for that)

Original comment by seb.dai...@gmail.com on 18 Apr 2013 at 8:40

Attachments: