[pmwiki-users] Non-english characters cause wikistyles fail

Petko Yotov 5ko at 5ko.fr
Tue Apr 12 08:47:48 CDT 2011

On Tuesday 12 April 2011 12:34:08, CSGA_KPX wrote :
>      I use >>font-size:20 font-family:"黑体",simhei << , But got something
> like %div font-size:20 font-family:"黑体",simhei apply=div% when I preview
> them.

International characters are not currently supported in embedded WikiStyles, 
but you can refer to a style class in your stylesheet. Edit a text file named 
pmwiki/pub/css/local.css (if it doesn't exist, create it) and add something 
like this:

  .myclass { font-size:20px; font-family:"黑体",simhei; }

The "dot myclass" thing can be anything containing letters a-z. Then in the 
wiki page, you refer to this style class via one of those:

  %myclass% Text in 20px and in special font%% or
  %class=myclass% Text in 20px and in special font%% or
  >>class=myclass<< or >>myclass<< for div blocks.

>      I tried using >>font-size:20 font-family:simhei<< , it worked in IE
> and FireFox, but Opera browser dodn't.

The font-size value doesn't have units, it should be 20px, 20ex, 20em or 20pct 
(=20%) and some browsers ignore it or may ignore the full css block that 
contains an incorrect definition. Additionnally, the computer needs to have 
the fonts installed and containing all characters on the page section, and the 
browser to be configured to respect website styles. IIRC there was a bug in 
Opera <= 8 with font-family and I'm not sure if it was fixed.


More information about the pmwiki-users mailing list