Replacing all chars "ё" at screen to "ö"
I need to change all symbols (for example "ё", i know its unicode) to another (for example "ö", i also know its unicode) befor output to XWindow's screen.
Should I patch freetype2, cairo, pango or Xft2? Or is enough to add some lines to /etc/fonts/fonts.conf? How can I replace char code before rendering in font's subsystem? |
Why don't you pipe the symbols to "sed" and from there to your screen?
Code:
man sed |
Why do you want to do this?
|
The elaboration of aim
Sed is util for transforming some files.
But I need to transley ALL OUTPUT to the screen! I want to make transliteration all cyrillic (russian) letters to latin letters on the fly, on all desktop output of all X-applications. I know I should hack font render mechanism or to change mapping table (map screen). How can I do it? |
Wouldn't this be the same as setting the system fonts to cyrillic?
|
I want to exchange the system char mapping for all fonts by one patch. I don't want to edit each font file. It's inconceivable.
|
As I understand it there is no need for patching. You can install linux with a cyrillic character set from the beginning or you can change that later. "Localization" is what I mean.
|
You don't understand me right.
There is russian localisation already at my computer. There are russian symbols at my screen now. But I want to change russian symbols to latin's. |
What you want to do would require more than system changes, as they go beyond locale changes and font definitions.
The `ё' character is never used except in dictionaries. It is a pronunciation guide. So the 'e' would be the same printed character, that you want to sometimes print as 'e' and sometimes as 'ö' depending on the word. Many characters would be translated to character sequences on latin. ц->ts щ->chsh ш->sh ч->ch. You would literally be inventing your own language, and need to translate the documents and patch the text in programs. About the best you could do, AFAIK, is create your own .po files for applications that use gettext to translate text at runtime. Code:
eg: from Code:
|
Glyphs remap
Goooood!... Nobody understand me!
I don't want to change any localizations. I don't need to correct some ".po". I NEED TO CHANGE THE VIEW OF ALL OUTPUT CHARS. I need to remap font system so that glyphs of russian charset will chenged to latin's glyphs. The result will be new view of all cyrillic symbols (other glyphs) in all programs, for example, in each page on browser. P.S. Sorry my English, I'm still learning it :) |
Quote:
|
I don't really know, but aren't there many separate ways programs can draw fonts?
If so, there probably isn't hope of modifying each and every one. |
There isn't a one to one correlation between russian and latin glyphs.
It would be easier to learn the latin alphabet than invent your own locale and code pages, resulting in partially transliterated gibberish. For partial transliterated encoding changes, perhaps read /usr/share/X11/doc/fonts/fonts.pdf. There is a short paragraph on adhoc encoding changes, which points out a file which does it. This maps a character to a different glyph. |
* bows with envious regret to linguistic knowledge of jschiwal *
There is never enough time to learn all (the languages) one would like to learn. |
JZL240I-U:
Being a Geek, I tried to teach myself Russian in 1992. But that was a long time ago. |
All times are GMT -5. The time now is 03:35 PM. |