Make fonts that look excact like Windows message boxes

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Make fonts that look excact like Windows message boxes

Postby Grobe » Thu May 23, 2013 1:28 am

Hi.

I was trying to replicate a message box from a Win7 program. Windows fonts settings is default, probably MS Sans Serif or likewise.

The problem I face is that the system font have very pixelated letters, while Inkscape provide "perfect" letters that get smooth edges when exporting to PNG. So even if I chose a font that is namely the same as used in Window message boxes, the result will differ slightly. Espechially when a "real" message box is close to a "fake one", it's easy to tell what is the fake one.

Thanks
:lol:

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Make fonts that look excact like Windows message boxes

Postby ragstian » Thu May 23, 2013 2:24 am

Hi

This might do the trick for you (Or not - depending on what you want.);
To make screen dump from Win7 use the snippet tool.

From now on - you type whats in blue followed by Return or Enter (Your screen might differ from mine.)

If you have Python installed:
Start Python
>>>import ctypes
>>>ctypes.windll.user32.MessageBoxW(None, u"Grobe encountered an error:\nCould not find font - Error", u"My Message Window", 0)

If you don't have python installed (but Inkscape :D )
Open a "Dos" window; click Start - Run - type cmd

Get to root - type; CD ..
C:\Users\Ragnar>CD .. ( Space between CD and the two full stop characters)
Repeat until the prompt shows: C:\>
In the dos window change to your Inkscape installation directory - Normally "Program files/Inkscape"
C:\>CD "Program Files"
( Note the hyphens are necessary only if the path contains spaces )
C:\Program Files>CD Inkscape
C:\Program Files\Inkscape>CD python
C:\Program Files\Inkscape\python>python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>import ctypes
>>>ctypes.windll.user32.MessageBoxW(None, u"Grobe encountered an error:\nCould not find font - Error", u"My Message Window", 0)

This will give you;
G_Error.PNG
G_Error.PNG (14.45 KiB) Viewed 1372 times

To exit the python interpreter;
>>>quit()

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Make fonts that look excact like Windows message boxes

Postby Lazur » Thu May 23, 2013 4:10 am

The default font is segoe ui in win 7.
It can be changed to any font installed.
http://www.sevenforums.com/tutorials/1175-fonts-change.html
You can generate customised win7 message boxes simply by using html.
You can also try that out here live:
http://www.w3schools.com/js/js_popup.asp

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Make fonts that look excact like Windows message boxes

Postby Grobe » Thu May 23, 2013 8:06 am

Will try "segoe ui" tomorrow and see if that works out.

Using Phyton or HTML isn't really an option because I need to design it a very direct way.
Sure It's probably possible to make it using both Phyton and html, but I'm not an advanced HTML programmer and sure I'm not very familiar to Phyton.
:lol:


Return to “Help with using Inkscape”