What hy­phen­ation al­go­rithm is used?

The hy­phen­ation al­go­rithm used by wp-​Typography is based on the 1983 Stan­ford Ph.D. the­sis of pro­fes­sor Frank Liang: Word Hy-​phen-​a-​tion by Com-​puter. In this the­sis, Dr. Liang al­so de­vel­oped an Eng­lish (Unit­ed States) pat­tern file for use with his al­go­rithm. Liang’s Eng­lish pat­tern file was up­dat­ed in 1991 by Pe­ter Bre­it­en­lohn­er.

The re­sult­ing al­go­rithm — with the Eng­lish (Unit­ed States) pat­terns — finds 90% of all al­lowed hy­phen­ation points iden­ti­fied in the Webster’s Unabridged Dic­tio­nary with a 0% er­ror rate. Pat­terns for many ad­di­tion­al lan­guages have been de­vel­oped by oth­ers and vary in qual­i­ty.

Does hy­phen­ation af­fect search?

It de­pends on the search en­gine. Google and Ya­hoo prop­er­ly han­dle the soft-​hyphen char­ac­ter. Mi­crosoft and Ask im­prop­er­ly treat soft-​hyphens as word breaks. For­tu­nate­ly, Google and Ya­hoo com­prise more than 90% of the search mar­ket.

Be­cause Word­Press search queries the data­base — and hy­phen­ation is not stored to the database-​local search is not af­fect­ed.

Which browsers sup­port hy­phen­ation?

Start­ing with In­ter­net Ex­plor­er 6, Fire­fox 3, Sa­fari 2, and Opera 8, all ma­jor web browsers have of­fered full sup­port for on­line hy­phen­ation.

How does hy­phen­ation work?

The soft-​hyphen is an in­vis­i­ble char­ac­ter that com­mu­ni­cates to web browsers al­low­able line breaks with­in words. When a web brows­er wraps a line at a soft-​hyphen, a hy­phen is shown at line’s end.

Sim­i­lar to the soft-​hyphen, the zero-​space char­ac­ter com­mu­ni­cates al­low­able line breaks with­in strings of text. But un­like the soft-​hyphen, it does not show a hy­phen at line’s end. This is ide­al for forc­ing con­sis­tent wrap­ping of long URLs. It al­so can be used to force line breaks in un­co­op­er­a­tive web browsers af­ter hard-​hyphens in words like “zero-​space” and “soft-​hyphen”.

Why hy­phen­ate?

Hy­phen­ation in­creas­es the vi­su­al ap­peal of your web­site. When jus­ti­fy­ing text with­out hy­phen­ation, word spac­ing is dis­tract­ing­ly large. With left-​aligned text, the right edge will be un­nec­es­sar­i­ly ragged.

What hy­phen­ation lan­guage pat­terns are in­clud­ed?

wp-​Typography has multi-​language sup­port. Pat­tern li­braries are in­clud­ed for:

  • Afrikaans,
  • Ar­men­ian,
  • Basque,
  • Bul­gar­i­an,
  • Cata­lan,
  • Chi­nese Pinyin (Latin),
  • Croa­t­ian,
  • Czech,
  • Dan­ish,
  • Dutch,
  • Eng­lish (Unit­ed King­dom),
  • Eng­lish (Unit­ed States),
  • Es­ton­ian,
  • Finnish,
  • French,
  • Gali­cian,
  • Geor­gian,
  • Ger­man,
  • Ger­man (Tra­di­tion­al),
  • Greek (An­cient),
  • Greek (Mod­ern Mo­not­o­n­ic),
  • Greek (Mod­ern Poly­ton­ic),
  • Hin­di,
  • Hun­gar­i­an,
  • Ice­landic,
  • In­done­sian,
  • In­ter­lin­gua,
  • Irish,
  • Ital­ian,
  • Latin,
  • Latin (Clas­si­cal),
  • Latin (Litur­gi­cal),
  • Lat­vian,
  • Lithuan­ian,
  • Marathi,
  • Mon­go­lian (Cyril­lic),
  • Nor­we­gian,
  • Oc­c­i­tan,
  • Oriya,
  • Pan­jabi,
  • Pol­ish,
  • Por­tuguese,
  • Ro­man­ian,
  • Russ­ian,
  • San­skrit,
  • Ser­bian (Cyril­lic),
  • Ser­bocroa­t­ian (Cyril­lic),
  • Ser­bocroa­t­ian (Latin),
  • Slo­vak,
  • Sloven­ian,
  • Span­ish,
  • Swedish,
  • Tamil,
  • Tel­ugu,
  • Thai,
  • Turk­ish,
  • Turk­men,
  • Ukrain­ian, and
  • Welsh.

My hy­phen­ation set­tings are ig­nored. What’s wrong?

Re­cent brows­er ver­sions sup­port the hyphens CSS prop­er­ty to en­able hy­phen­ation. If you want to the fin­er con­trol over hy­phen­ation that wp-​Typography of­fers, make sure that the your theme stylesheet does not con­tain

hyphens: auto;

(or one of its vendor-​prefixed vari­ants like -webkit-hyphens). If you can’t re­move the prop­er­ty from the theme’s stylesheet, make sure to add

hyphens: manual;

in a child theme stylesheet or wp-Typography’s in­ject­ed CSS. (Don’t for­get the vendor-​prefixed vari­a­tions!)