LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-12-2010, 06:08 PM   #1
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Rep: Reputation: 0
Question 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?
 
Old 12-13-2010, 02:40 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Why don't you pipe the symbols to "sed" and from there to your screen?
Code:
man sed
What is your "output" what application runs in Xwindows?
 
Old 12-13-2010, 01:02 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Why do you want to do this?
 
Old 12-14-2010, 05:04 AM   #4
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Original Poster
Rep: Reputation: 0
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?

Last edited by Nordman; 12-14-2010 at 05:07 AM. Reason: orthography
 
Old 12-15-2010, 01:33 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Wouldn't this be the same as setting the system fonts to cyrillic?
 
Old 12-15-2010, 11:27 AM   #6
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 12-16-2010, 01:25 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 12-16-2010, 05:33 AM   #8
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 12-16-2010, 11:08 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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
msgid "\tUsers allowed:\n"
msgstr "\tРазрешенные пользователи:\n"

to:
msgid "\tUsers allowed:\n"
msgstr "\tRazreshenye polzovateli\n"
If there was a main .po file of set phrases that programs used, this might be practical, but you would need to do this for each program. This assumes that the program isn't built for a particular domain and the .po files are located in the source. E.G. for the VLC project, the "previous" menu item in the /po/ru.po file:
Code:
#: modules/gui/qt4/menus.cpp:857
msgid "Pre&vious"
msgstr "Предыдущий"
You would need to change msgstr to "Prediduchshiy". Only 6758 entries to go. And this is for one program.
 
Old 12-16-2010, 11:48 AM   #10
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Original Poster
Rep: Reputation: 0
Lightbulb 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
 
Old 12-16-2010, 11:59 AM   #11
Nordman
LQ Newbie
 
Registered: Dec 2010
Location: Russia->Australia
Distribution: Linux Mint/LXDE
Posts: 10

Original Poster
Rep: Reputation: 0
Wink

Quote:
Originally Posted by MTK358 View Post
Why do you want to do this?
I hope it will good for studying English if latin will become my native alphabet.
 
Old 12-16-2010, 12:24 PM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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.
 
Old 12-16-2010, 01:17 PM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 12-16-2010 at 02:58 PM.
 
Old 12-17-2010, 12:57 AM   #14
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
* bows with envious regret to linguistic knowledge of jschiwal *

There is never enough time to learn all (the languages) one would like to learn.
 
Old 12-17-2010, 01:13 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
JZL240I-U:

Being a Geek, I tried to teach myself Russian in 1992. But that was a long time ago.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop bash from replacing "~/" with "/home/username"? daihard Linux - Software 8 08-22-2010 02:32 PM
Trivial regular expression for replacing "\n.\n" with "\n .\n" gregorian Linux - Newbie 3 08-23-2009 04:40 PM
How do I disable "shutdown" and "restart" options in KDE logout screen for all users? maxgsp Linux - Distributions 1 12-12-2008 03:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
Replacing "function(x)" with "x" using sed/awk/smth Griffon26 Linux - General 3 11-22-2006 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration