denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [Denemo-devel] Windows Font, API Call


From: Richard Shann
Subject: Re: Re: [Denemo-devel] Windows Font, API Call
Date: Mon, 08 Feb 2010 17:23:41 +0000

On Sun, 2010-02-07 at 12:13 +0100, address@hidden wrote:
> My thoughts were about making it possible for Denemo to just run, no
> matter if installed or not. Not all users have admin rights to install
> software and there are many people who want to carry around their
> windows software on an usb stick.
I like this argument.
I wonder if LilyPond can be installed as user under windows?
This windows API thing requires only a bit of fiddling you do
#include <windows.h>
and then find from somewhere (I forget where - hmm -
http://msdn.microsoft.com/en-us/library/dd183326(VS.85).aspx I guess!)
the description of the call to AddFontResource (I think it may have some
prefix or something).
The problem would be testing ...


Richard


> 
> Denemo does not use the registry, which is good, but it does use the
> windows font dir, which makes it unportable or at least pollutes the
> system with application-exclusive fonts. The whole purpose of the
> font-dir is to share the fonts to different software. Fetta.ttf and
> Denemo.ttf are only of limited use to Open Office :)
> 
> With a temp, API driven font-load this could be made possible.
> 
> Am 07.02.2010 um  Uhr haben Sie geschrieben:
> > That's interesting.
> > This would be the thing to use if the application needed to access a
> > font that it was getting dynamically (e.g. downloading from
> denemo.org).
> > Hopefully we can get the normal font installation thing working. It
> > would be a little inelegant to install code to do this for a font
that
> > is being provided with the installation, of course.
> > I have never come across a problem with installing LilyPond and
> finding
> > fonts uninstalled, and at the worst we can surely get the same
> > installation as denemo.ttf working for fetta.ttf...
> > Richard
> >
> >
> >
> > On Sun, 2010-02-07 at 00:33 +0100, address@hidden wrote:
> > > Hi.
> > >
> > > I just stumbled upon this. Its unverified but could be nice to
have.
> No
> > > more trouble with fonts. Maybe this is even possible without
> > > admin-rights.
> > >
> > > I just included the Delphi example as it was written. Don't know
if
> it
> > > helps
> > >
> > > Quote:
> > >
> > > There's a windows API call "AddFontResource" (and a companion
> > > "RemoveFontResource") which can temporarily enable a font from any
> > > directory. Either should be followed with a WM_FONTCHANGE to all
top
> > > level windows to make the font immediately available.
> > >
> > > Here's the Delphi thread that executes adding portable fonts in
> > > geek.menu:
> > >
> > > procedure TRegisterFontsThread.Execute;
> > > var
> > > srchRecord: TSearchRec;
> > > baseDir: string;
> > > begin
> > > baseDir := ExtractFileDir(Application.ExeName) +
> '\Data\PortableFonts\';
> > > if FindFirst(baseDir + '*.ttf',faAnyFile,srchRecord)=0 then
> > > repeat
> > > AddFontResource(pAnsiChar(baseDir + srchRecord.Name));
> > > until FindNext(srchRecord)<>0;
> > > FindClose(srchRecord);
> > > sendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0 );
> > > end;
> > >
> > >
> > >
> > > _______________________________________________
> > > Denemo-devel mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> >
> >
> >
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]