Jump to content

Outline Text.


Recommended Posts

  • Moderators

You have to know that is not enough information for anyone to help you. Outline text within SciTE, in a document, on a web page, what? You need to describe in detail what you are trying to accomplish.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Please do not bump your posts without waiting at least 24 hours. This forum is manned by volunteers from all over the globe (just because your script is the most important thing in the world to you doesn't mean it is to everyone else). The person best suited to assist your particular needs may not be online right now.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • 3 months later...

You want to increase the weight of the font. I'm sure you are aware, but maybe you're not, that is the parameter 400 in the GUICtrlSetFont function as you now have it defined. Try 700420 may work.. but only in your mind.. ;) See this page for more 'font-weight' info - https://duckduckgo.com/?q=font+weight.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

I don't know if it's possible to do that in AutoIt. Natively anyway.. Someone may have authored a UDF for that purpose. The only way that it might be done natively is to create a label in one color, and then create another label with a slightly smaller font-size (and a different color of course) and in a slightly off-set position of the first label. I dont know if this will work and I highly doubt it will. Now that you have accurately described what you want, you'll just have to wait for somebody else to come along and tell you something.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

I don't know if it's possible to do that in AutoIt. Natively anyway.. Someone may have authored a UDF for that purpose. The only way that it might be done natively is to create a label in one color, and then create another label with a slightly smaller font-size (and a different color of course) and in a slightly off-set position of the first label. I dont know if this will work and I highly doubt it will. Now that you have accurately described what you want, you'll just have to wait for somebody else to come along and tell you something.

Okay thank you ;)

I hope someone might have another idea on how to do it, but i appreciate your help ;)

Link to comment
Share on other sites

@GraaF1337

You have not been explicit enough in describing what you actually want to acheive, so people have to try and second guess what you asking them to help you with!

BrewManNH has a link to in his signature to this,  How to ask questions the smart way, you may find it helpful.

 

In the meantime, have you tried to download an 'outline' font, install it and then set the control to that font?

Here is a link for a site that supplies FREE fonts, I have linked to the 'outline' fonts section.

 

Good Luck.

DeMo.

Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages:

  

  • I'd be unstoppable... if not for law enforcement and physics.
  • Marriage, the number 1 cause of divorce.
  • Don't steal... the government hates competition.
  • Irish Government Motto: We’ve got what it takes to take what you’ve got.
  • Birthdays are good for you. Statistics show that the people who have the most live the longest.
  • Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld
  • If you learn from your mistakes, then why ain't I a genius?! -- Anonymous
  • Remember, live every day as if it was your last day! one day you will be right.
  • How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?
  • Sure my system is secure, it just locked up again.
  • I haven't lost my mind; I have a tape back-up somewhere.  ~Author Unknown
Link to comment
Share on other sites

@GraaF1337

You have not been explicit enough in describing what you actually want to acheive, so people have to try and second guess what you asking them to help you with!

BrewManNH has a link to in his signature to this,  How to ask questions the smart way, you may find it helpful.

 

In the meantime, have you tried to download an 'outline' font, install it and then set the control to that font?

Here is a link for a site that supplies FREE fonts, I have linked to the 'outline' fonts section.

 

Good Luck.

DeMo.

 

I guess i could do it like this, but i was more hoping for a feature which made is possible to do it.

Link to comment
Share on other sites

From what little research I've done on this, it's not easy at all to do this. You practically have to trace the outline of every character with a line, which means you'd have to use GDI+ at the very least to do it, and it probably wouldn't look very good. 

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I found an old snippet in my GDI+ folder:

#include <GDIPlus.au3>

_GDIPlus_Startup()

$iBGColor = 0xFFFFFF
$iW = 880
$iH = 150
$hgui = GUICreate("Outlined Text Effect", $iW, $iH)
GUISetBkColor($iBGColor, $hgui)
GUISetState()

$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)

$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic)
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
 _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)
 _GDIPlus_GraphicsSetTextRenderingHint($hBackbuffer, 4)
 _GDIPlus_GraphicsClear($hBackbuffer, 0xFF000000 + $iBGColor)

$hFamily = _GDIPlus_FontFamilyCreate("Verdana")
$hFormat = _GDIPlus_StringFormatCreate()
$tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)

$hPath = _GDIPlus_PathCreate()
_GDIPlus_PathAddString($hPath, "Outlined Text", $tLayout, $hFamily, 0, 90  * 1.333333, $hFormat)

$hPen = _GDIPlus_PenCreate(0xF0000000, 8)
_GDIPlus_GraphicsDrawPath($hBackbuffer, $hPath, $hPen)

$hBrush = _GDIPlus_BrushCreateSolid(0xFFFF0000)
_GDIPlus_GraphicsFillPath($hBackbuffer, $hPath, $hBrush)

_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH)

_GDIPlus_PathDispose($hPath)
_GDIPlus_PenDispose($hPen)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_BitmapDispose ($hBitmap)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()

Do
Until GUIGetMsg() = -3

GUIDelete()
Exit

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...