Re: [xep-support] Mixing Chinese and English fonts

From: Alexander Peshkov (peshkov@renderx.com)
Date: Tue Aug 10 2004 - 01:28:33 PDT

  • Next message: Alexander Peshkov: "Re: [xep-support] Support for SVG patterns?"

    Hello Bob,

    It seems to me that the natural way to solve your problem is to place
    English font before Chinese font in the fonts list and specify
    'character-by-character' font selection strategy:
      <fo:block font-family="EnglishFont, ChineseFont" font-selection-strategy="character-by-character">

    In this case formatter will use EnglishFont for all Latin characters
    and switch to ChineseFont for all Chinese characters. The only
    possible drawback is that all common characters (such as punctuation
    symbols) will be taken from EnglishFont also (don't know whatever it's
    acceptable in your case or not).
    As for for font modification - if you use Type 1 font you can simply
    remove undesired glyphs records from .afm file in order to make
    appropriate glyphs unavailable.

    Best regards,
    Alexander Peshkov mailto:peshkov@renderx.com
    RenderX

    BS> I have XML documents that are primarily Chinese but with occasional English
    BS> words or phrases. The current font we use to render these documents contains
    BS> both Chinese and Latin letters, but the Latin letters are of poor quality.
    BS> We would like to substitute a better font for the English characters.

    BS> I understand that with XSL-FO 1.0 you can provide a comma-separated list of
    BS> font names in the font-family property. However, one cannot designate
    BS> specific characters or ranges to be rendered in the secondary fonts. In
    BS> other words, if a character is found in the primary font, that font will be
    BS> used.

    BS> I would like to avoid having to put all the English words within fo:inlines
    BS> to switch fonts. So we are considering using something like Fontographer to
    BS> edit the (open source) Chinese font to remove the Latin characters. I
    BS> believe this will then force XEP to switch to the secondary font-family when
    BS> a Latin character is encountered in the input. Is this a sound strategy?
    BS> Has anyone attempted this?

    BS> Bob Stayton
    BS> Sagehill Enterprises
    BS> DocBook Consulting
    BS> bobs@sagehill.net

    BS> -------------------
    BS> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    BS> in the body of the message to majordomo@renderx.com from the address
    BS> you are subscribed from.
    BS> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Tue Aug 10 2004 - 01:45:22 PDT