[Sugar-devel] fonts in pyabiword
tomeu at sugarlabs.org
Fri Jul 24 09:46:59 EDT 2009
On Thu, Jul 23, 2009 at 21:58, Sayamindu Dasgupta<sayamindu at gmail.com> wrote:
> 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:
>>> 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.
I'm afraid with Rainbow you cannot write to /home/olpc, but if you do
write to $HOME/.fonts, the fonts may be picked up. This is because
when your activity runs under Rainbow $HOME points to different
directory, where your activity can write.
> You can run a shell script everytime your activity starts : I have
> done that before in a backported edition of Read Activity -
> 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?
> Sayamindu Dasgupta
More information about the Sugar-devel