[etoys-dev] Re: Etoys new fonts

Ricardo Moran richi.moran at gmail.com
Fri Jun 11 13:57:32 EDT 2010


Please correct me if I'm wrong. What I mean is: currently Etoys uses the
default directory to store project files and so it changes the default
directory to point to a different place than the imagePath. But the default
directory is used for a lot of other stuff (saving the image with "save
as...", looking for fonts, monticello's package cache, writing logs, and so
on). Maybe we could keep the default directory pointing to the image path
(as the squeak trunk image) and simply change the directory where we store
the project files. This directory would be "etoysPath" (or any other name
you consider better).
So, what I propose is, instead of making a "resourcePath" for locales,
quickguides, fonts, etc. we create an "etoysPath" only for storing projects
and we change the default directory back to the image path.

Cheers.
Richo

On Thu, Jun 10, 2010 at 11:03 PM, Korakurider <korakurider at gmail.com> wrote:

> On Fri, Jun 11, 2010 at 10:19 AM, Ricardo Moran <richi.moran at gmail.com>
> wrote:
> >
> >
> > On Wed, Jun 9, 2010 at 12:06 PM, Bert Freudenberg <bert at freudenbergs.de>
> > wrote:
> >>
> >> Yes, change it to Smalltalk imagePath.
> >> This is used in various other places (like for locales, quickguides,
> >> etc.). We might want to add a "resourcePath" method somewhere. Not sure
> in
> >> which class to best put it though.
> >
> > What if we add an "etoysPath" instead and we keep the default directory
> > pointing to the image path?
> > Richo
>
>   Default directory could be dynamically changed by security plugin
> for sandboxing of user projects that was downloaded from somewhere and
> hasn't been "blessed".
>   What is meaning and usage of etoysPath?
>   To me API name resourcePath (=same as image path as default) seems
> clearer than "etoysPath" for locating various resources.
>     <resourcePath>/QuickGuides
>     <resourcePath>/fonts
>     <resourcePath>/locale
>     <resourcePath>/ExampleEtoys
>
> /Korakurider
>
> >
> >>
> >> - Bert -
> >> On 09.06.2010, at 16:49, Ricardo Moran wrote:
> >>
> >> I see what the problem is. It seems TTFileDescription is not able to
> find
> >> the fonts because it looks in
> >>
> >> FileDirectory default directoryNamed: 'fonts'.
> >>
> >> and the default directory in the etoys-dev image is not the same
> >> directory where we put the image. If you move the fonts directory into
> the
> >> default directory, it works.
> >> Should we change TTFileDescription to look for the fonts directory into
> >> "SmalltalkImage current imagePath" just move the fonts to the default
> >> directory?
> >> I would prefer changing TTFileDescription because the default directory
> is
> >> more easily accesible by the users than the image directory and we do
> not
> >> want the fonts to get lost due to an user's mistake.
> >>
> >> Richo
> >>
> >> On Wed, Jun 9, 2010 at 10:46 AM, Ricardo Moran <richi.moran at gmail.com>
> >> wrote:
> >>>
> >>> Mmm... I think this may be related with my last commit. I tried to
> fix a
> >>> bug yesterday which caused an emergency evaluator to show up when
> changing
> >>> the locale to japanese or korean without initializing the fonts
> correctly.
> >>> Maybe I screwed up there...
> >>>
> >>> Anyway, I will try this again with a clean image. Updating still works,
> >>> right?
> >>>
> >>> Thanks for testing this!
> >>> Richo
> >>>
> >>> On Wed, Jun 9, 2010 at 4:07 AM, Korakurider <korakurider at gmail.com>
> >>> wrote:
> >>>>
> >>>> On Wed, Jun 9, 2010 at 1:40 AM, Ricardo Moran <richi.moran at gmail.com>
> >>>> wrote:
> >>>> > Hi, I managed to use the new fonts depending on the locale selected.
> >>>> > To test it, update your image, extract the new fonts into the fonts
> >>>> > directory (you can download them
> >>>> > from http://tecnodacta.com.ar/gira/gsoc/new-etoys-fonts.zip),
> execute:
> >>>> > TTFileDescription
> >>>> > installFamilyNamed: 'Mona';
> >>>> > installFamilyNamed: 'UnBatang';
> >>>> > installFamilyNamed: 'UnDotum';
> >>>> > installFamilyNamed: 'DejaVu LGC Sans';
> >>>> > installFamilyNamed: 'DejaVu LGC Serif';
> >>>> > installFamilyNamed: 'DejaVu LGC Sans Mono'.
> >>>> > and then execute:
> >>>> >
> >>>> > TTCFont registerAll.
> >>>> > latinFont := TTCFont familyName: 'DejaVu LGC Sans' pointSize: 15
> >>>> > emphasis:
> >>>> > 0.
> >>>> > japaneseFont := TTCFont familyName: 'Mona' pointSize: 15 emphasis:
> 0.
> >>>> > koreanFont := TTCFont familyName: 'UnDotum' pointSize: 16 emphasis:
> 0.
> >>>> > newFontArray := Array new: 14.
> >>>> > newFontArray at: 1 put: latinFont.
> >>>> > newFontArray at: 6 put: japaneseFont.
> >>>> > newFontArray at: 8 put: koreanFont.
> >>>> > newFontSet := TTCFontSet newFontArray: newFontArray.
> >>>> > TextStyle defaultFont fallbackFont: newFontSet.
> >>>> > Preferences standardEToysFont fallbackFont: newFontSet.
> >>>>
> >>>> I tried above but Etoys died with LowSpaceDebug.log (attached) after
> >>>> looong wait.
> >>>> I tested it on WinXP box with >2GB RAM.
> >>>> Does anyone have clue about this?
> >>>>
> >>>> /Korakurider
> >>>>
> >>>> > Now when you change your locale to japanese or korean it will use
> the
> >>>> > new
> >>>> > ttf files.
> >>>> > We should now decide which fonts to include for chinese, greek,
> >>>> > arabian,
> >>>> > russian, and so on.
> >>>> > Cheers
> >>>> > Richo
> >>>> >
> >>>> > On Fri, Jun 4, 2010 at 8:54 AM, Ricardo Moran <
> richi.moran at gmail.com>
> >>>> > wrote:
> >>>> >>
> >>>> >> Hi, I've been testing Andreas code with the DejaVu, Mona, UnDotum,
> >>>> >> and
> >>>> >> UnBatang fonts. You can install them by copying the .ttf files in
> the
> >>>> >> font
> >>>> >> directory and executing the following code (make sure you have an
> >>>> >> updated
> >>>> >> image):
> >>>> >> TTFileDescription
> >>>> >> installFamilyNamed: 'Mona';
> >>>> >> installFamilyNamed: 'UnBatang';
> >>>> >> installFamilyNamed: 'UnDotum';
> >>>> >> installFamilyNamed: 'DejaVu LGC Sans';
> >>>> >> installFamilyNamed: 'DejaVu LGC Serif';
> >>>> >> installFamilyNamed: 'DejaVu LGC Sans Mono'
> >>>> >> For convenience, I uploaded the fonts
> >>>> >> to http://tecnodacta.com.ar/gira/gsoc/new-etoys-fonts.zip. The
> size
> >>>> >> is 11.1
> >>>> >> MB.
> >>>> >> I haven't managed to link these fonts with the LanguageEnvironment
> >>>> >> (so
> >>>> >> that Mona would be the default font when you're using the japanese
> >>>> >> locale,
> >>>> >> or UnDotum for the korean) but I'm looking into that.
> >>>> >> Cheers
> >>>> >> Richo
> >>>> >
> >>>> > _______________________________________________
> >>>> > etoys-dev mailing list
> >>>> > etoys-dev at squeakland.org
> >>>> > http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >>>> >
> >>>> >
> >>>
> >>
> >> _______________________________________________
> >> etoys-dev mailing list
> >> etoys-dev at squeakland.org
> >> http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >>
> >>
> >>
> >> _______________________________________________
> >> etoys-dev mailing list
> >> etoys-dev at squeakland.org
> >> http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >>
> >
> >
> > _______________________________________________
> > etoys-dev mailing list
> > etoys-dev at squeakland.org
> > http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100611/7c9e2481/attachment.html


More information about the etoys-dev mailing list