Re: Resource availability: fonts

2009-05-06 Thread Tyro[a.c.edwards]
On 5/6/2009 9:50 PM, John C wrote: Tyro[a.c.edwards] Wrote: When I do this, how do I ensure that the program is able to locate the font after extraction without "installing" it? I think AddFontResource from the SDK will do that. http://msdn.microsoft.com/en-us/library/dd183326(VS.85).aspx

Re: Resource availability: fonts

2009-05-06 Thread John C
Tyro[a.c.edwards] Wrote: > When I do this, how do I ensure that the program is able to locate the > font after extraction without "installing" it? > I think AddFontResource from the SDK will do that. http://msdn.microsoft.com/en-us/library/dd183326(VS.85).aspx

Re: Resource availability: fonts

2009-05-06 Thread Tyro[a.c.edwards]
On 5/6/2009 1:39 PM, grauzone wrote: Use ubyte[] fontbytes = cast(ubyte[])import("yourfont.ttf"); This will take care of making sure the font is available. How do you instruct the library (DFL in this case) that this variable contains the font or that after you write it back to the hard drive

Re: Resource availability: fonts

2009-05-06 Thread Tyro[a.c.edwards]
On 5/6/2009 12:30 PM, Daniel Keep wrote: Tyro[a.c.edwards] wrote: One cannot necessarily rely on particular font being available on a system, and for security reasons asminsistrators restrict instalation of fonts (among other things) onto systems in a network. I would like to know if it is po

Re: Resource availability: fonts

2009-05-06 Thread Rainer Deyke
grauzone wrote: > http://digitalmars.com/d/1.0/expression.html#ImportExpression > > It returns a char[], which is a misdesign, because the loaded file can > be binary data as well. I think. The file could also contain non-utf8 text, which should also not be stored in a char[]. char[] is for utf-

Re: Resource availability: fonts

2009-05-06 Thread grauzone
http://digitalmars.com/d/1.0/expression.html#ImportExpression It returns a char[], which is a misdesign, because the loaded file can be binary data as well. I think.

Re: Resource availability: fonts

2009-05-05 Thread Lars T. Kyllingstad
grauzone wrote: Use ubyte[] fontbytes = cast(ubyte[])import("yourfont.ttf"); That is so cool. I've seen the import() expression mentioned here on the NG before. It returns a string containing the imported source file, right? Is it mentioned anywhere in the docs? I can't seem to find it. -L

Re: Resource availability: fonts

2009-05-05 Thread grauzone
Use ubyte[] fontbytes = cast(ubyte[])import("yourfont.ttf");

Re: Resource availability: fonts

2009-05-05 Thread Daniel Keep
Tyro[a.c.edwards] wrote: > One cannot necessarily rely on particular font being available on a system, > and for security reasons asminsistrators restrict instalation of fonts (among > other things) onto systems in a network. I would like to know if it is > possible to embed a font into my cod

Resource availability: fonts

2009-05-05 Thread Tyro[a.c.edwards]
One cannot necessarily rely on particular font being available on a system, and for security reasons asminsistrators restrict instalation of fonts (among other things) onto systems in a network. I would like to know if it is possible to embed a font into my code so that I know that it will alway