Code Monkey home page Code Monkey logo

autotypo's Introduction

autotypo

Scribus plugin to fix text typography according to french rules... Adds "add non breaking thin space" before double signs

Specifications inspired from : https://wiki.openoffice.org/wiki/Non_Breaking_Spaces_Before_Punctuation_In_French_(espaces_ins%C3%A9cables)

  • carefull not to change urls as http://etc.usw?so=on
  • dont change repeated glyphs as !?!!
  • dont change when there is a tab before

INPUTS

  • choose a text frame, launch script
  • choose langage
  • choose sort of space to add for typography : default is thin nonbreakable space.
  • choose whether existing spaces should be replaced or not

FEATURES

  • replaces " with « and » as required
  • warns when « and » dont match or for other such issues
  • adds choosen spaces after « and before »
  • applies some heuristics (some would call that AI) to best deal with ' and "
  • when langages is french, does more typography job :
    • replaces or adds the choosen space before ! ? ; : and …
    • doesnt mess urls = doesnt change http://scribus.net
    • only adds one choosen space before a set of double ponctuations as "!!!?!"

LIMITS

  • recognizes urls with "p:/" pattern : it matches http://... but there could be false positive
  • same choosen space for « » ; ! ; : …
  • space is added or replaced with absolutely no local font awareness

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.