Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Upgrade to freetype 2.3.7  (Read 25378 times)

0 Members and 1 Guest are viewing this topic.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« on: December 28, 2008, 10:27:33 pm »
I'm not sure why the latest SVN of SFML is using freetype 2.1.10 but I'm requesting an upgrade it to the latest 2.3.7.
I'm finally rewriting my SFML font system in preparation for its release and I'm not familiar with the older FT_Stroker interface of 2.1.10 (this is needed for outlined fonts).

I've already upgraded my local copy and have had no problems (it compiled at least).

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« Reply #1 on: December 29, 2008, 08:23:36 am »
While I'm on the subject, a debug version of freetype.lib should be provided and used in debug builds.
This will avoid the "defaultlib 'msvcrt.lib' conflicts" warning.
Read the Caution at the bottom of:
http://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.71).aspx
(URL tag does not support parentheses, copy&paste it)

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Upgrade to freetype 2.3.7
« Reply #2 on: December 29, 2008, 12:22:25 pm »
So you can draw outlined text now? I want that too but Laurent refuses to implement it ;)

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« Reply #3 on: December 29, 2008, 03:49:00 pm »
Quote from: "dabo"
So you can draw outlined text now? I want that too but Laurent refuses to implement it ;)

Well yes, with TrueType fonts.
I just never got around to releasing the code.

I should be releasing it within a week now though.  :D

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Upgrade to freetype 2.3.7
« Reply #4 on: December 29, 2008, 04:04:43 pm »
Quote from: "dewyatt"
Quote from: "dabo"
So you can draw outlined text now? I want that too but Laurent refuses to implement it ;)

Well yes, with TrueType fonts.
I just never got around to releasing the code.

I should be releasing it within a week now though.  :D


I would love a screenshot :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Upgrade to freetype 2.3.7
« Reply #5 on: December 29, 2008, 05:31:33 pm »
Well, I don't really refuse to implement it ;)

It's just that I don't see how to do it properly.
Laurent Gomila - SFML developer

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« Reply #6 on: December 29, 2008, 07:15:34 pm »
Quote from: "dabo"

I would love a screenshot :)

Here you go :wink:

All the text there is drawn with my library.
It shows:
-Outlined only (the Japanese at the bottom)
-Filled only (the FPS and mouse pos at the top)
-Outlined + Filled  (everything else)
It also shows that the outline size is adjustable.

Quote from: "Laurent"
Well, I don't really refuse to implement it ;)

It's just that I don't see how to do it properly.

Hopefully my code will give you an idea.
I don't think it would be too hard. :)

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Upgrade to freetype 2.3.7
« Reply #7 on: December 29, 2008, 08:20:12 pm »
Quote from: "dewyatt"
All the text there is drawn with my library.
It shows:
-Outlined only (the Japanese at the bottom)
-Filled only (the FPS and mouse pos at the top)
-Outlined + Filled  (everything else)
It also shows that the outline size is adjustable.


Looks great!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Upgrade to freetype 2.3.7
« Reply #8 on: December 29, 2008, 08:44:16 pm »
Quote
Hopefully my code will give you an idea.

Where can I find it?
Anyway, my concern is not how to generate the outline, but rather how to use it properly. In SFML, the bitmap font is a black and white texture which is then modulated with a global color. How do you handle this with outlines? Do you have a separate texture containing only the outline, or do you use static colors?
Laurent Gomila - SFML developer

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Upgrade to freetype 2.3.7
« Reply #9 on: December 29, 2008, 08:57:12 pm »
Quote from: "dewyatt"
That really does look great. This would be a great feature for SFML.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« Reply #10 on: December 29, 2008, 10:19:07 pm »
Quote from: "Laurent"
Quote
Hopefully my code will give you an idea.

Where can I find it?
Anyway, my concern is not how to generate the outline, but rather how to use it properly. In SFML, the bitmap font is a black and white texture which is then modulated with a global color. How do you handle this with outlines? Do you have a separate texture containing only the outline, or do you use static colors?

Well I plan on releasing it within a week or so.
Maybe today or tomorrow actually.
I just want to add a few necessary features.

And yes, I store a separate texture containing the outline.
This means:
Pros:
-Flexibility
-Ease of use
Cons:
-Slight increase in memory usage
-Slight decrease in performance (tests showed about 15%)

I understand the hardest thing would be working it into SFML's design/style.
Quote from: "dabo"
Looks great!

Quote from: "Imbue"
That really does look great. This would be a great feature for SFML.

Thanks!
I hope one day it will be standard SFML. :)
Until then, I'll be working on it.

Weetbix

  • Newbie
  • *
  • Posts: 2
    • View Profile
Upgrade to freetype 2.3.7
« Reply #11 on: December 30, 2008, 12:03:02 am »
This is excellent, great work  :lol:

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Upgrade to freetype 2.3.7
« Reply #12 on: December 31, 2008, 09:27:59 pm »
Ok!
I went ahead and released it here:
http://www.sfml-dev.org/forum/viewtopic.php?p=5562

 

anything