Skip to main content
Participant
July 8, 2011
Question

Line breaks in Thai

  • July 8, 2011
  • 3 replies
  • 4877 views

Hi,

I know Thai isn't officially supported in FM, but it is possible to do. The problem is that Thai doesn't have spaces between words (or any punctuation) so the text looks like one long word and runs from one line to the next. However, you're not supposed to break words across lines. Without spaces, I don't know where the words start and end.

Has anyone found a way of automatically getting line breaks in the right place (without adding them manually)? Are they any plugins that handle this?

I'm using FM 8 on XP.

Thanks,

Daniel

    This topic has been closed for replies.

    3 replies

    D_anielAuthor
    Participant
    July 12, 2011

    Thanks for the suggestions. If anyone knows of a Thai-aware DTP app I'd be interested to hear.

    Thanks,

    Daniel

    Art.Ball
    Inspiring
    November 15, 2012

    Let's try InDesign CS5, 6 with World-Ready Composer. It can help you for thai line-breaking.

    D_anielAuthor
    Participant
    July 11, 2011

    Hi,

    Thank you both for your suggestions. The problem is that I already have the Thai text. What I need is a way to either add zero-length spaces automatically, or to add line breaks automatically. I can't read Thai so I don't know where to put them.

    I've talked to the localisation company about asking the translators to add them, but they are very reluctant. Apparently this is not standard and as the volume is quite high would be difficult (and therefore expensive).

    My source is XML so I could also parse that - does anyone know any tools, plug-ins etc. that will do the job?

    Thanks,

    Daniel

    Bob_Niland
    Community Expert
    Community Expert
    July 11, 2011

    The problem is that I already have the Thai text.

    I can't read Thai so I don't know where to put  them.

    You're probably going to need someone who does. One approach that might be worth a try is to paste the text into some WP or DTP that does support Thai and also provides control over inter-word spacing. Set the spacing really large, and use it as a guide for inserting ZWS in Frame.

    I've talked to the localisation company about asking the translators to add them, but they are very reluctant.

    They don't need to add spaces or EOLs; they only need to add some character that doesn't otherwise appear in the text, perhap an underscore ("_"). You can then insert one ZWS variable, copy it, and batch change all _ By Pasting.

    David_Crowe
    Inspiring
    July 8, 2011

    I’m on shaky ground here, and have no idea if this works, but …


    There is a Unicode character, zero-width space, U+200B. I found some in a FrameMaker document once that had come in probably via Word. More about this (but not in a FrameMaker context on Wikipedia, with a demonstration of how it works.


    The font I was using didn’t have a character for it, so it showed up as ?


    But presumably your Thai fonts will recognise it and handle it correctly.


    So you could try adding that character to the permissible line-breaks in the Text Options dialogue.

    Bob_Niland
    Community Expert
    Community Expert
    July 10, 2011

    There is a Unicode character, zero-width space, U+200B.

    The Unicode ZWS approach is more elegant, if FM recognizes it as a space for EOL purposes (and I have no idea about that). In case it matters, it won't back-port to FM 7 or earlier.

    An ordinary space, redefined to zero-width, might also do.

    This seemed to work (for point size 12 Times):

    1. Create a Character format "Spread.Zero" which has:
      Font: As-Is
      Size: 4
      Spread: -40.0%
      Pair Kern: Off

      (all others As-Is)
    2. Create a Variable named: "Char.Space.Null" which is:
      <Spread.Zero> <Default ¶ Font>

    You might need to experiment with the -40%, depending on the font. The PtSz 4 might not be necessary.

    Negative Stretch, by the way, doesn't work (at least in FM7). It won't go below positive 10.0%.

    Using a Variable prevents inadvertently remaining in the Spread.Zero mode for subsequent text.

    Using a variable also allows you to easily make all these spaces highly visible during edit, then vanish them for rendering (I'd use a Variable for the Unicode ZWS approach as well, for that same reason).