 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Sun May 25, 2008 4:55 pm Post subject: |
|
|
| ladiko wrote: | | could i use your work |
yes, please.
@daonlyfreez: Lexikos has already shown me on how to use the Res protocol here:
My problem is different.. I have to use AddFontMemResourceEx to load a font from resource, which loads as a private font and not visible to any application including AHK. All I have is the hIcon of the font and the only way it seems - is to use WM_SETFONT on AHK control.
 |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Sun May 25, 2008 5:42 pm Post subject: |
|
|
| SKAN wrote: | You have already shown how to refer images from HTML .. but how to use an embedded font .. i.e., use it from HTML ?
I did not try, but my best guess is that WM_SETFONT would not work on an IE control. |
You can only use the existing (installed) fonts on the computer with the html/css settings of the file you are showing.
However, if you use the css @font-face tag pointing to an eot (font) file, and show the html in Internet Explorer (or the control), you can use font-files that need not be installed on the client's computer. The url value accepts http and file, so maybe it works with res too, if you add the eot file as a resource?
| Quote: | <STYLE TYPE="text/css">
<--!
@font-face {
font-family: SomeFontName;
font-style: normal;
font-weight: normal;
src:url(http://www.somesite.com/somefont.eot);
}
-->
</STYLE> |
Hope this makes it more clear what I meant to point out...  |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Sun May 25, 2008 7:17 pm Post subject: |
|
|
| n-l-i-d wrote: | Hope this makes it more clear what I meant to point out...  |
I do not understand much .. but nice to hear that it would work..
Thanks friend.  |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Sun May 25, 2008 7:25 pm Post subject: |
|
|
Allrighty, then here it is: Spice up your AutoHotkey GUI with custom fonts in an IE-control.
Use stylish, weird, or specific language fonts like you see fit!
1. Download WEFT (freeware) and install
2. Find yourself some nice (free to use and distribute) font(s), download and install
3. Create a page in Microsoft Office Word in which you use the fonts you intend to use in your project (not everything you want to publish, just some words with the fonts used, the file will be destroyed anyway)
4. Save this page as html (Save As... -> Web page)
5. Run WEFT and follow the instructions, N.B.:
* You should Cancel the "Intended Web Server" dialog
* WEFT has restriction options, make sure you set them correctly.
6. The resulting EOT (Embedded OpenType) font file(s) can now be incorporated into your IE-control!
7. Create an AHK Gui with an IE-COM control.
8. Create html with the following css code in the head of the document
| Quote: | <STYLE TYPE="text/css">
<--!
@font-face {
font-family: SomeFontName;
font-style: normal;
font-weight: normal;
src:url(file://fullandforwardslashedpathtoyourscriptfolder/somefont.eot);
}
-->
</STYLE> |
(The IE control probably needs the full path)
9. Now you can use SomeFontName like any font in the css definitions of the rest of your html and show the final html with your custom font in the IE control
10. You can deinstall the fonts again
From here: Hosting Web Pages in Hindi using embedded fonts with WEFT (with screenshots)
Online examples
User ofcourse needs Internet Explorer to be installed (does not work on other browsers).
I myself cannot test this right now, but it should work, and it is a very nice GUI addition. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Sun May 25, 2008 7:31 pm Post subject: |
|
|
Very Nice .. Many thanks  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|