Unable to display Amharic(Ethiopic font)

55 views
Skip to first unread message

Seyaw

unread,
Nov 12, 2008, 7:02:10 AM11/12/08
to PyScripter
I am new to python.
for my project, I like the power python have scripting capability.
But i face this problem.
While using python's IDLE editor, i can easily process texts except to
display list characters
as an example
let me post the following catched code
===================
>>> sent= "አበበ በጣም ብዙ በሶ በልቶ ሆዱን ታመመ".decode('utf8')
>>> print sent
አበበ በጣም ብዙ በሶ በልቶ ሆዱን ታመመ

>>> print [sent[i:i+n] for i in range(len(sent)-n+1)]
[u'\u12a0\u1260\u1260', u'\u1260\u1260 ', u'\u1260 \u1260', u'
\u1260\u1323', u'\u1260\u1323\u121d', u'\u1323\u121d ', u'\u121d
\u1265', u' \u1265\u12d9', u'\u1265\u12d9 ', u'\u12d9 \u1260', u'
\u1260\u1236', u'\u1260\u1236 ', u'\u1236 \u1260', u' \u1260\u120d',
u'\u1260\u120d\u1276', u'\u120d\u1276 ', u'\u1276 \u1206', u'
\u1206\u12f1', u'\u1206\u12f1\u1295', u'\u12f1\u1295 ', u'\u1295
\u1273', u' \u1273\u1218', u'\u1273\u1218\u1218']

==============================================
so as can easily be seen, it has failed to print list contents
Now I have guessed the problem might be with the IDLE editor and
searched the web for different editor.
I have found that PyScripter is wonderfull python editor.
But while trying pyscripter it even can't understand the AMHARIC
charcter. it simply prints a square like character for all characters
i types
anybody cab help me in either of ways
thanks a lot
Seid M.

Clemens Anhuth

unread,
Nov 12, 2008, 9:44:21 AM11/12/08
to PyScr...@googlegroups.com
Hello Seid.

> But while trying pyscripter it even can't understand the AMHARIC
> charcter. it simply prints a square like character for all characters
> i types
> anybody cab help me in either of ways
>

Are you sure this is not a simpler case of "oh, the font that it uses
doesn't define these character, and thus defaults to displaying
squares/blocks"?

Maybe try differents fonts, at least for the editor. Test that font in
Notepad. If it displays the character in question properly in Notepad I
would think that it should also work properly in any other editor,
including PyScripter.

With best regards

Clemens Anhuth

Seid Mohammed

unread,
Nov 13, 2008, 2:11:37 AM11/13/08
to PyScr...@googlegroups.com
Yes I did.
The character I typed in pyscripter remains sqaure/block. but if I
copy that same character to notpad, it displays correctly.
There should be some way out there, that I can't understand.
Even in the editor option, when i click the editor font button, I
can't see the powergeez unicode font.
Hope someone may help me

Thanks a lot
Seid M
--
"RABI ZIDNI ILMA"

PyScripter

unread,
Nov 25, 2008, 8:35:45 AM11/25/08
to PyScripter
PyScripter only uses fixed width fonts.

On Nov 13, 9:11 am, "Seid Mohammed" <seidy...@gmail.com> wrote:
> Yes I did.
> The character I typed in pyscripter remains sqaure/block. but if I
> copy that same character to notpad, it displays correctly.
> There should be some way out there, that I can't understand.
> Even in the editor option, when i click the editor font button, I
> can't see the powergeez unicode font.
> Hope someone may help me
>
> Thanks a lot
> Seid M
>

Seid Mohammed

unread,
Nov 25, 2008, 8:39:10 AM11/25/08
to PyScr...@googlegroups.com
--
"RABI ZIDNI ILMA"

Seid Mohammed

unread,
Nov 25, 2008, 8:40:48 AM11/25/08
to PyScr...@googlegroups.com
I can't Understand what does "PyScripter only uses fixed width fonts."
means. Does it mean I can't use python with fonts other than english??
Thanks a lot
Seid M

--
"RABI ZIDNI ILMA"

Clemens Anhuth

unread,
Nov 25, 2008, 9:08:59 AM11/25/08
to PyScr...@googlegroups.com
Seid Mohammed wrote:
> I can't Understand what does "PyScripter only uses fixed width fonts."
> means. Does it mean I can't use python with fonts other than english??
> Thanks a lot
> Seid M
>
Hello Seid,

fonts come in two variants, fonts which display each character with the
exact same width (fixed width), and those wihch don't (proportional fonts).

An example of a proportional font is Arial. An example for a fixed width
font is Lucida Console.

Test this yourself in Notepad, enter this:

X X
X

(That is, the first line consists of X<Space Character>X
<Space Character><Space Character>X)

Now change the font to Lucida Console, the last X on each line will be
placed exactly above each other. Now change to Arial, note that the last
X on each line are not placed exactly above each other anymore. This is
because the space character has less width than the X character in Arial.

You'll have tto find yourself a fixed width ethiopic font, if the one
you tried isn't fixed width.

Reply all
Reply to author
Forward
0 new messages