Menu

#939 Allow defining different font for segment source and target text

future
open
nobody
fonts (1)
5
2014-10-11
2013-12-23
Jon Babcock
No

Source text in the editor's active segment is bold by default. This makes complex Chinese characters difficult or impossible to read. Compare the bold and plain versions of, and 檀, tán 'sandal wood', or and 龜, guī 'tortoise' as two of thousands of examples of mildly complex Chinese characters. The same applies to the kanji of written Japanese.

Because the font size of the target and of the source text cannot not now be independently controlled, if the font is increased to the point where the bold complex Chinese characters (or Japanese kanji) are legible, then a Western language target text font becomes huge and impractical.

Free Unicode fonts that displays Chinese clearly and also includes the tone-marked vowels for Pinyin, and the diacritical marks needed to properly spell transliterated Sanskrit, for example, are rare. But after finding one, the above two problems persist making it inefficient to use.

These problems would disappear if the editor's font for source and target text could be set independently, i.e., if two fonts could be used instead of just one.

Related

Feature Requests: #1252
Feature Requests: #1253

Discussion

  • cienislaw

    cienislaw - 2013-12-29

    something like that? i think i can add this feature, but i need someone to correct my way of thinking.

    EditorController.setFont and Document3.getFont - my main places of changes + anything need to be altered in MainWindow, Preferences and so on to make this happen. only issue I have with AttributeSet which holds any font info beside font itself. I need to have some indicator in AttributeSet to know which font return from Document3.getFont. Any ideas what attribute can be used or I should add new attribute, or make use of FontFamily in EditorSettings.getAttributeSet based on isSource parameter?

     
  • Yu Tang

    Yu Tang - 2014-01-01

    Hi Jon,

    The following is just a workaround until your RFE has been completed or you got your own custom-build OmegaT.
    Run this two-lines script right after launching OmegaT.

    [bold_font_to_plain_for_editor.groovy]

    import java.awt.Font
    {font -> editor.fontb = new Font(font.fontName, Font.PLAIN, font.size)} editor.editor.font
    

    Note that above script makes all boldings gone in editor pane. Also you should run this script again every after launching app.
    Not ideal, but you could do it in just a minute.

     
  • cienislaw

    cienislaw - 2014-01-01

    hmm, in such case adding a 'don't bold source in active segment' should be fast to do in code too.

     
  • Jon Babcock

    Jon Babcock - 2014-01-01

    Thanks Yu Tang for the script. Will use immediately. (Relief for aging eyes!)
    Thanks cienislaw for taking this on. The option to switch to 'No bold in active segment' would be a big step forward. It completely solves the immediate problem of hard-to-read or illegible 漢字 (Chinese characters or Japanese kanji or Korean hanja) caused by the current mandatory application of the font-style "bold" to the CJK source text of the editor's active segment.

     
  • Jon Babcock

    Jon Babcock - 2014-01-01

    Yu Tang, Your script works great! Now there is clear text in editor's active source segment. Thanks again!

     
  • Didier Briel

    Didier Briel - 2014-10-11
    • summary: to set a separate font for segment source and target text --> Allow defining different font for segment source and target text
     

Log in to post a comment.

MongoDB Logo MongoDB