Can I de­vel­op a hy­phen­ation pat­tern file for an­oth­er lan­guage?

Per­haps. wp-​Typography us­es a de­riv­a­tive of hy­phen­ation pat­terns de­vel­oped for the TeX plat­form. Here is a col­lec­tion of many of the avail­able TeX hy­phen­ation pat­tern files. You will need to find a file for the lan­guage you wish to ad­dress. Next, look in the source code for wp-​Typography at /php-Typography/lang_unformatted/template.txt, the spe­cif­ic needs of lan­guage spe­cif­ic hy­phen­ation pat­terns for this plu­g­in, and how to con­vert them from the orig­i­nal TeX pat­terns are de­tailed there. If a TeX pat­tern does not ex­ist, I sup­pose you could cre­ate one, but I don’t know where to di­rect you.

Why does this plu­g­in fil­ter con­tent at page load? Wouldn’t it be more ef­fi­cient to do it when post is saved?

There are a few rea­sons:

  1. If I processed at the time of sav­ing a post, the changes are de­struc­tive. This means: 
    • If peo­ple to back to ed­it their work, there will be a mul­ti­tude of hid­den char­ac­ters that will in­ter­fere with their ef­forts
    • Spell check would be bro­ken (in browsers like Fire­fox)
    • If you dis­able the plu­g­in, the changes are still hard­cod­ed, and will not go away.
  2. Changes would on­ly ap­ply to posts saved af­ter the plu­g­in was en­abled (not on pre­vi­ous posts, since they have al­ready been saved, and thus would not trig­ger the ty­po­graph­ic fil­ter­ing).
  3. Set­tings would not be editable-​since pre­vi­ous fil­ter­ing is stored in the data­base, if you turned off hy­phen­ation, that would on­ly ap­ply to new posts saved.
  4. For most in­stal­la­tions, caching re­solves per­for­mance is­sues.

But to be hon­est, the biggest rea­son is if there is a bug in my code, I don’t want to be re­spon­si­ble for de­stroy­ing da­ta in the thou­sands of web­sites that use this plu­g­in. If some­thing goes wrong, they can just turn it off-​no dam­age done.

Do you plan on of­fer­ing drop-​cap ca­pa­bil­i­ties?

No. The gen­er­al phi­los­o­phy of this plu­g­in is to en­able func­tion­al­i­ty that is oth­er­wise un­avail­able us­ing standards-​based web de­sign. Drop caps can be im­ple­ment­ed us­ing CSS. Here is an ex­am­ple:

/* drop cap */
.mainContent > .header + p:first-letter {
	/* assumes paragraph line-height is 20px and font-size is 14px */
	display: block;
	float: left;
	margin: 0 2px 0 0;
	padding: 6px 0 0; /* for Firefox: (line-height - font-size) */
	font-size: 70px; /* (3.5 * line-height) */
	line-height: 49px; /* for Safari: (3 * line-height - 11px) */
	text-transform: uppercase;
	vertical-align: top;
}

Class names and di­men­sions will need to be ad­just­ed to your spe­cif­ic ap­pli­ca­tion.

What are wid­ows and why pro­tect them?

A wid­ow is the fi­nal word in a block of text that falls to its own line. Es­pe­cial­ly if the wid­ow is on­ly a few char­ac­ters long, she can get lone­ly. wp-​Typography will try to pro­tect wid­ows by bring­ing them com­pa­ny from the pre­vi­ous line.

There is dan­ger that the widow’s com­pa­ny will leave the pre­vi­ous line with less than op­ti­mal word spac­ing. The risk is less if your text is left-​aligned, but if it is jus­ti­fied, tread care­ful­ly. The pro­tec­tion of wid­ows is com­plete­ly cus­tomiz­able in the ad­min­is­tra­tive op­tions.

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.