How to incbin a font and use it? + Copyright issue

BlitzMax Forums/BlitzMax Programming/How to incbin a font and use it? + Copyright issue

Grey Alien(Posted 2006) [#1]
Hi I'm a bit of a noob iwth incbin and how to use stuff. (maybe I should have posted this in beginners). But how do I incbin a font and then use it with LoadImageFont please?

Also an interesting idea occured the other day. Normally I download free fonts (for commercial use) only - I check the docs very carefully. This means that I can distribute the font file with my game instead of having to make it into a bitmap font (which is allowed for copyrighted fonts, because only the font "code", the ttf, is copyrighted, not the actual image).

OK So if I inc. bin a font which is not free for commercial use, the code is no longer available to the public (I'm not distributing the file) because it's embedded in my exe and would have to be hacked out to use. Do you think this is a legal loophole meaning that you don't have to make a bitmap font? OR is the issue that you are still using the font "code" in your code (rather than one of distribution)? But then if you use a program to make a bitmap font, you are using the font "code" too...


Fry Crayola(Posted 2006) [#2]
As far as I know, the deal is that you can't distribute the font code - including as an inc bin. You can use it all you like, and make bitmap fonts.

I'd love to know where to find some decent free fonts that might be used "regularly" (like a mimic of Tahoma) rather than special fonts of little use.


GfK(Posted 2006) [#3]
I don't think I can put it any clearer than to read the recent threads about mmEngine3D. Point being, indirectly using someone else's work is morally wrong at best, illegal at worst. Either way it gets people's backs up.

I've written my own bitmap font class which take output (images and INI files) from FONText. It performs better than BlitzMax's native DrawText function anyway, so the way I see it, there's no disadvantage (other than the half day or so that it took me to write the font class).


pls(Posted 2006) [#4]
Regarding your question:

Incbin "sudoku.ttf"
Global myfont18:TImageFont=LoadImageFont("incbin::sudoku.ttf", 18, SMOOTHFONT)


Copyright issues apply regardless of you distributing the ttf file or incbin alternative. If the font is yours or public domain you can, if it is not you need permission for distribution.

PLS


Grey Alien(Posted 2006) [#5]
Yeah I'll be going the Bitmap font route for sure and using free fonts for now. I just thought I'd open the can of worms.


GfK(Posted 2006) [#6]
A bitmap font class would be a good addition to your framework wotsit anyway. Surprised you haven't done one already actually.


Grey Alien(Posted 2006) [#7]
Yeah I know. I made one in BlitzPlus for my framework (which I gave away when I moved to BMax). I just haven't needed it yet as BMax Font support is really good with scaling, alpha blending etc.


skidracer(Posted 2006) [#8]
Surely ttf -> png is like dvd->vhs, the font (and any other artistic work) doesn't magically become your property due to a format shift.


Grey Alien(Posted 2006) [#9]
yes they become non copyright when in bitmap form. Wiki (if you believe if) tells all:


In short: Scalable fonts as such are copyrighted as computer programs; typefaces as such may be protected by design patents, and, in a few countries, by copyright; actual use of the typeface is not restricted, even if the font used was based illegally on a protected typeface.
Under U.S. law, typefaces and the characters they contain are considered to be utilitarian objects whose utility outweighs any merit that may exist in protecting their creative elements. As such, typefaces are exempt from copyright protection in the United States (Code of Federal Regulations, Ch 37, Sec. 202.1(e); Eltra Corp. vs. Ringer). However, this finding was limited in Adobe vs. Southern Software, Inc., wherein it was held that scalable computer fonts, ie., the instructions necessary to render a typeface, constitute a "computer program" for the purposes of copyright law and hence are subject to protection. Hence the computer file(s) associated with a scalable font will generally be protected even though the specific design of the characters is not. Furthermore, a rasterized representation (e.g. bitmap) of the characters in a scalable font is not protected by copyright in the United States. According to section 503.02(a) of the Compendium II, typography and calligraphy are not copyrightable in themselves in the U.S. This treatment of fonts is not very unusual with respect to international law, and most other jurisdictions do not consider fonts subject to copyright either (with the notable exception of the UK, which however also only covers typefaces as such, as they are for example employed in fonts, and not their actual use.[3]). However, typefaces as such may be protected by design patents in many countries (either automatically, or by registration, or by some combination thereof). A prominent example is the European Union,[4] where the automatic protection (without registration) expires after three years and can be extended (by registration) up to 25 years.[5]


Gabriel(Posted 2006) [#10]
Be very wary. I read up on this extensively in the past and from what I can tell, it's not so much about copyright law as it is about copyright office policy. The law is not clear and they currently interpret the law to say that images of fonts cannot be copyrighted. It wouldn't require a change of law, just a rethink or a successful lawsuit to change this. And I know of at least one company ( who sell fonts for $1,000's of dollars each ) who have said they plan to start just such a lawsuit.


Grey Alien(Posted 2006) [#11]
well like I said I only use free ones but it's worth knowing the rules.


Tachyon(Posted 2006) [#12]
There are thousands of "royalty free" fonts out there with very relaxed copyright claims to them...

A font might be royalty free to use in printed material, but can not be redistributed for profit (as in a CD collection of fonts). So, if you incbin this royalty free font and use it for the digital print displayed in your game, and the font itself is not available to the purchaser of your game because it is encoded in the product, I don't see how this would violate the "royalty free use" claim on the font.

Of course with all the frivolous lawsuits in the US, you could probably get sued by Coca-Cola for using the color Red in your game, so I don't take chances. The fonts that I incbin are 100% public domain.


plash(Posted 2006) [#13]
QFT..
... you could probably get sued by Coca-Cola for using the color Red in your game ...



Grey Alien(Posted 2006) [#14]
A font might be royalty free to use in printed material, but can not be redistributed for profit (as in a CD collection of fonts). So, if you incbin this royalty free font and use it for the digital print displayed in your game, and the font itself is not available to the purchaser of your game because it is encoded in the product, I don't see how this would violate the "royalty free use" claim on the font.
Yeah that's really what I meant. The Incbin can get around the do not distribute for clause.


xlsior(Posted 2006) [#15]
There are thousands of "royalty free" fonts out there with very relaxed copyright claims to them...


The one dangerous thing there, though, is that I've seen a *ton* of 'free' or 'public domain' fonts on various websites that I know for a fact are indeed copyrighted by someone else... Personally I like the aenigmafonts.com site, where there are a ton of fonts done by a single person who expressely made them royalty free, and even allows them to be used for commercial purposes.


xlsior(Posted 2006) [#16]
Surely ttf -> png is like dvd->vhs, the font (and any other artistic work) doesn't magically become your property due to a format shift.


You'd be surprised.. Like Grey Alien mentioned, doing TTF -> PNG shifts it from a 'computer program' to a 'typeface', which have different legal protections. It doesn't automatically always make it free everwhere, but they are definitely considered entirely different cases.

TTF is considered to be a 'program', since it contains instructions to 'run' for the computer that generate a specific output (the letters in question), which has different protection than just a bitmap containing the output of the 'program'.

It's closer to spreading a screenshot of another program vs. spreading the actual program itself, plus there are seperate rules dealing with typefaces, which pretty much predate computers altogether. showing a typeface in a computer program isn't much different from using a typeface to print a newspaper or brochure, just to name something. A newspaper can print in pretty much any font they choose to as well.

Similarly, MIDI files supposedly are considered to be sheet music (which is a set of instructions), and not a sound recording, and because of that have different protections associated with them than a .wav or .mp3. Not sure if it still applies under the current copyright laws, but there used to be cases where it was legal to use the one royalty free but not the other.