[scribus] Script for (french) thin typographic spaces

Gregory Pittman gpittman at iglou.com
Tue Jun 2 17:32:03 UTC 2020


On 6/2/20 12:09 PM, JLuc wrote:
> Le 02/06/2020 à 14:57, Victor / tokiop a écrit :
>> Utf8 and regex is a bit tricky, not sure it is optimal as is, but thin space is correctly replaced before "»", which is not the case if utf8/regex is messed up.
> 
> AMOF Autoquotes script also manages spaces around " and « and »
> but it's interesting to read how you do so using regexps rather than parsing.
> 
> What misses is adding (or changing spaces into) thin non breakable spaces before ! ; ? :
> and after some glyphs also.
> 

HI JLuc,

This has already been solved, with the Autoquote2 script included with Scribus. I even thought it was you that made Autoquote2:

# © 2010.08.28 Gregory Pittman
# © 2013.10.07 Enhancements by Jean-Luc Girard

Maybe a different JLuc?
Anyway, 'fr' is the default language with the first dialog. This way, the dialogs are also in French. If you pass all the error-checking, you get:

"Selon les polices de caractère utilisées, choisissez le type d'espace ajouté avec les doubles guillemets français, lorsqu'il n'y en a pas déjà un.\n0 : aucun espace ajouté ; 1 : insécable ; 2 : insécable fine ; 3 : fine"

with a default of 1, insécable.

The next, and very important dialog, asks:

"Voulez vous aussi appliquer ce traitement sur les double-guillemets français déjà en place ? Oui: O ; Non : N "

so you can run this script on a document that already has double-guillemets in place. 

As far as concern about whether a font has the non-breaking thin space, I had a hard time finding any of mine that didn't, and to me this is a reason to disable those fonts in Scribus.

Greg




More information about the scribus mailing list