Git Product home page Git Product logo

Comments (12)

fabianmichael avatar fabianmichael commented on July 23, 2024

Yeah, I must admit you’re right on this topic. Changed it locally, but did not push it already. Another thing I changed it the default setting for smart dashes. In wp-Typography, it is traditionalUS, I changed it to international because that better with any other language (as far as I know) than US English, but even in the US, this does not seem to be handled the same by everyone.

There seems to be some controversy on this topic. See https://en.wikipedia.org/wiki/Dash#En_dash_versus_em_dash

What do you think?

from kirby-typography.

fvsch avatar fvsch commented on July 23, 2024

For the dashes, I tend to use the EM dash because it's the norm in American English and common enough in French typography (though in French that dash should be less common than in American English). Also in my book the EN dash is for ranges, e.g. 2012–2016 or Paris–Roubais (ideally with thin spaces).

I have no strong opinion on what could be a good default for dashes. Maybe EM + spaces is a good choice, with some people being happy with it as-is, others needing to remove the spaces, and others needing to change to EN.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

Okay, common sense wins again. ;-) I changed the default setting to traditionalUS, to have all rules matching the US puncutation style by default. Spacing around dashes is enabled by default, controllable via typography.dashes.spacing setting. I prefer to have at least a little space around em dashes, but a lot of the settings are IMHO very depending on personal preference and the font you use.

Maybe it would be a great idea to add recommended settings for every language, at the end of the readme file? I can make a configuration example for German, maybe you can put together defaults for French?

Cheers
Fabian

from kirby-typography.

fvsch avatar fvsch commented on July 23, 2024

Would gladly contribute one for French. If you make one for German, ping me and I'll use it as a template for the French one.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

I think, the following settings should do:


German (Germany):

c::set([
  'typography.dashes.style'         => 'international',
  'typography.quotes.primary'       => 'doubleLow9Reversed',
  'typography.quotes.secondary'     => 'singleLow9Reversed',
  'typography.hyphenation.language' => 'de-DE',
]);

Diacritics replacements will be disabled by default with the next commit, because this feature could trigger unexpected behaviour. Also increased minimum length for hyphenated words to 7 characters, because IMHO hyphenation should not apply to almost every word by default.

from kirby-typography.

fvsch avatar fvsch commented on July 23, 2024

Looking at the source files for php-typography, should the 'typography.hyphenation.language' config for German be 'de' only? Unless it looks for de-DE.php and then falls back to de.php?


French (France):

c::set([
  'typography.punctuation.spacing.french' => true,
  'typography.dashes.style' => 'traditionalUS', // cadratin ('international' for demi-cadratin)
  'typography.quotes.primary' => 'doubleGuillemetsFrench',
  'typography.quotes.secondary' => 'doubleCurled',
  'typography.hyphenation.language' => 'fr',
]);

The “traditionalUS” and “international” key bother me a bit, as it’s more a distinction between EM and EN dashes, and classic French tends to use EM while some modern French texts (and Swiss French apparently) prefer EN, but hey.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

Yes, typography.hyphenation.language should be de for German.

For French, shouldn’t typography.quotes.secondarybe singleGuillemetsFrench instead of doubleCurled?

The “traditionalUS” and “international” key bother me a bit, as it’s more a distinction between EM and EN dashes, and classic French tends to use EM while some modern French texts (and Swiss French apparently) prefer EN, but hey.

I also think those names are misleading. Maybe I should use emdash and endash for configuration instead?

from kirby-typography.

fvsch avatar fvsch commented on July 23, 2024

For French, shouldn’t typography.quotes.secondarybe singleGuillemetsFrench instead of doubleCurled?

Nope. It might be the case in Belgium, Switzerland or Québec, but the standard French style for nested quotes looks like: « Elle me dit : “t’es trop nul, sors un peu de ta bulle !” »

Single quotes are not understood as quotation marks by French readers, they would be seen as an apostrophe and a strange mirrored apostrophe.

I also think those names are misleading. Maybe I should use emdash and endash for configuration instead?

Yes, or just em and en since it’s the typography.dashes.style config, dash is implicit. (But both are fine.)

from kirby-typography.

malvese avatar malvese commented on July 23, 2024

In French em and en dashes are pretty much interchangeable, but they're both always used with full spaces around and thin spaces inside, and traditionalUS adds no spaces.
« Texte texte – texte texte – texte… »

These days EN dashes seem to be used a lot more in written media, so it's a good default for Kirby sites.

For these reasons my vote is for international.

Is there a way to split the settings for the dash kind and the spaces used around it? I mean, the annotation for typography.dashes.style seems to suggest it sets both the dash kind and the spacing, but does it?

@fabianmichael I'm with @fvsch regarding quotes, doubleCurled is the right choice for secondary quotes in French. It is considered more legible: « Il me dit “Va-t-en” » versus « Il me dit ‹Va-t-en› »
Swiss French uses singleGuillemetsFrench though.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

@malvese @fvsch Okay, than this will be the default for French as you said. Also agree, that this is more readable.


Just thought about providing the presets for different languages as a separate configuration option, like typography.preset or typgraphy.language. Maybe this is more user-friendly than copying a whole set of presets?


@malvese I tried to remove the space around the em dash by messing with PHP_Typography, but without success. But thin spaces are used, resulting in a smaller gap. If you want the em dash without spaces arount it, I am afraid that there is currently no other way than using a kirbytext::$post filter. Hope this helps anyway.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

I’ll think about the default dash style once again and also about renaming dash styles to en and em.

from kirby-typography.

fabianmichael avatar fabianmichael commented on July 23, 2024

Changed default quotes style and also added aliases for dash styles in Commit 22da4d2.

from kirby-typography.

Related Issues (20)

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.