[Sugar-devel] fonts in pyabiword

Sayamindu Dasgupta sayamindu at gmail.com
Thu Jul 23 15:58:46 EDT 2009


On Fri, Jul 24, 2009 at 1:20 AM, sumit singh<sumit.coder at gmail.com> wrote:
> Hi Sayamindu,
>
> Thanx a lot for replying.
>
> On Thu, Jul 23, 2009 at 10:57 PM, Sayamindu Dasgupta<sayamindu at gmail.com> wrote:
>> Hi,
>>
>
>
>
>> While per application/activity fonts are not supported, I suggest you
>> can try to install the fonts in your system during activity startup.
>> The font files should be copied to $HOME/.fonts and to be sure that
>
> By this you mean, /usr/share/fonts folder? or /home/olpc/.fontconfig
> one? I think the first one. Moreover, would I require to write a
> script for copying these font files to the desired folder because I
> don't think we have permissions to write files to these directories
> from our python code. And I should run this script (.sh) before
> running my actiivity for the first time?
>

Make a directory /home/olpc/.fonts if it does not exist and then copy.
You may have to do more if Rainbow is enabled - but I suggest that you
disable Rainbow first, and then once you get the font installation to
work, enable Rainbow again and see how you can work around Rainbow.

You can run a shell script everytime your activity starts : I have
done that before in a backported edition of Read Activity -
http://dev.laptop.org/git/users/sayamindu/read-activity-backport/tree/activity/activity.info
and http://dev.laptop.org/git/users/sayamindu/read-activity-backport/tree/bin/read_start
are the two files you should check out (note that read_start probably
needs to be inside a bin directory to work)
You can also look at the etoys activity for a more elaborate example.

>> the fonts get "registered", run the command fc-cache, and then you can
>> start up your activity.
> would this also require the use of scripts?
>

Yes.


Thanks,
Sayamindu


-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]


More information about the Sugar-devel mailing list