paint.font problem

Post

Posted
Rating:
#1 (In Topic #2010)
Regular
bill-lancaster is in the usergroup ‘Regular’
This code:-
Public Sub Form_Open()
  Paint.Begin(hDwa)     'drawing area
    Paint.Font = Font["Ubuntu Sans, 16"]
    Paint.RichText("Title", 10, 10, 50)
    Paint.Stroke
    Paint.Font = Font["Sans Serif, 12"]
    Paint.RichText("Info", 10, 100, 50)
    Paint.Stroke
  Paint.End
End

Produces:- this doesn't look right at all.

  Screenshot_20260113_100033.png

Any advice appreciated
 
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’
How do you want it to look?

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
bill-lancaster is in the usergroup ‘Regular’
What ever font style I choose I get the image
This what Courier 10 Pitch looks like
Screenshot_20260113_145328.png
This what I'm getting

Screenshot_20260113_145950.png
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by gbWilly)
#4
Avatar
Enthusiast
Gianluigi is in the usergroup ‘Enthusiast’
Gianluigi is in the usergroup ‘GambOS Contributor’
Hi bill-lancaster
I'm not sure I understand the problem, but if you use stroke, you draw the outline; if you use fill, you fill the drawing.

If you're looking for a fill, consider Paint.DrawRichText.
If you only want to draw the outline with small characters, the result won't be good.
You can try playing with linewidth, which accepts a float…

 :goodbye:
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
bill-lancaster is in the usergroup ‘Regular’
Thanks Guilangi, I hadn't realised the difference between stroke & fill.
All is well now.
Online now: No Back to the top
1 guest and 0 members have just viewed this.