Date: Fri, 28 Nov 2008 14:06:44 +0200> From: siguctua@gmail.com> To: pharo-project@lists.gforge.inria.fr> Subject: Re: [Pharo-project] New pharo-dev based on 10178> > 2008/11/28 Andrew Tween <amtween@hotmail.com>:> >> >> >> Date: Fri, 28 Nov 2008 13:07:57 +0200> >> From: siguctua@gmail.com> >> To: pharo-project@lists.gforge.inria.fr> >> Subject: Re: [Pharo-project] New pharo-dev based on 10178> >>> >> 2008/11/28 Andrew Tween <amtween@hotmail.com>:> >> >> >> >> >> >> >> >> Date: Fri, 28 Nov 2008 12:36:14 +0200> >> >> From: siguctua@gmail.com> >> >> To: pharo-project@lists.gforge.inria.fr> >> >> Subject: Re: [Pharo-project] New pharo-dev based on 10178> >> >>> >> >> 2008/11/28 Andrew Tween <amtween@hotmail.com>:> >> >> >> >> >> > If FFI is present, then FreeTypeFontProvider gets the windows font> >> >> > folder> >> >> > path with an API call.> >> >> > see FreeTypeFontProvider>>getWindowsFontFolderPath> >> >> >> >> >> > If FFI is not present, then> >> >> > FreeTypeFontProvider>>guessWindowsFontFolderPath> >> >> > is executed, which attempts to guess the fonts folder location.> >> >> > To do this it checks to see if c:\windows\fonts, d:\windows\fonts,> >> >> > e:\windows\fonts, etc. exist.> >> >> >> >> >>> >> >> use> >> >> SHGetSpecialFolderPath ( NULL, buffer , 0x14 /* = CSIDL_FONTS , from> >> >> <shlobj.h> */ , false)> >> >> of shell32.dll to retrieve the location of fonts directory in windoze.> >> >>> >> >> Then you don't need to guess anymore where windoze fonts located :)> >> >> >> > I obviously didn't make myself clear, so I'll have another go :)> >> >> >> > The guessing only happens if FFI is not present.> >> >> >> > If FFI is present then it uses FFI to call SHGetFolderPathA in> >> > shfolder.dll> >> > to get the location.> >> >> >> > please refer to FreeTypeFontProvider>>getWindowsFontFolderPath for the> >> > details.> >>> >> Aha. It not works, because there is no FFI package loaded into dev image.> >> Once i loaded FFI it stopped bugging me about inserting disk in a drive.> >>> >> May i guess, that dev image should contain FFI package by default?> >> > I would vote for including FFI in the dev image.> > And Alien, when it's ready.> >> >>> >> >> >> > SHGetSpecialFolderPath (or SHGetFolderPath) could be added to some> >> > plugin,> >> > rather than using FFI, but hasn't yet.> >> >> >>> >> s/some plugin/freetype plugin> >>> >> :)> >> > Or make it a general purpose thing in the VM> >> > i don't think that font path is too general to be in VM. True, but I was thinking beyond just the font path. Getting the Temp folder path, would also be useful. A general purpose function could do it all. e.g. getOSPath: 'fonts' getOSPath: 'temp'
I seem to recall that that this has been discussed in the past on the squeak-dev list.
-- > Best regards,> Igor Stasenko AKA sig.> > _______________________________________________> Pharo-project mailing list> Pharo-project@lists.gforge.inria.fr> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
See the most popular videos on the web http://clk.atdmt.com/GBL/go/115454061/direct/01/