7 Replies - 3045 Views - Last Post: 31 March 2014 - 02:23 AM

#1 Sewe21  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-October 12

How to convert from TrueTypeFonts to TinyFonts

Posted 26 March 2014 - 07:34 AM

Hello, first of all. I'm pretty sure this post doesn't belong in the C# category, but i had no idea on where to post it and since im trying to convert fontfiles to work with C# this was the most appropiate category I could think of. I will delete this post and make a new one in the right category if someone would be nice enough to tell me where to post it.

So I'm wondering on how to convert ttf files to tinyFNT. http://msdn.microsof...y/cc533019.aspx I've understood that i have to first create a Font Definition File(fntdef) then use TFConvert to convert it into a tinyfnt. But following this guide: http://www.annabooks...0Fonts_v2.1.pdf I wrote "AddFontToProcess", "ImportRange" and all that good stuff in notepad. But since I want a .deffnt file and not a .txt file I'm guessing that I'm doing something wrong here.

And then there's that problem with TFConvert. Both links say that I'm supposed to write "TFConvert fontname.fntdef fontname.tinyfnt" in the command prompt to use it, but it didn't work for me. I downloaded Microsoft .Net Micro Framework 4.3 to get TFConvert because I didn't have it before, so I'm sure the issue is not that I don't have it. Maybe I should have downloaded something else? It might just be that it won't work because i don't have a valid fntdef file to convert, but that seems highly unlikely too. Because there's no error saying valid fntdef file was not found.

I would be grateful for any help I can get, even something as a new thing I can google for.

Is This A Good Question/Topic? 0
  • +

Replies To: How to convert from TrueTypeFonts to TinyFonts

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3574
  • View blog
  • Posts: 11,115
  • Joined: 05-May 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 26 March 2014 - 08:15 AM

Make sure you have Windows Explorer set to show file extensions. Make sure that you've got the right file extension on your file after you save with Notepad.
Was This Post Helpful? 1
  • +
  • -

#3 Sewe21  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-October 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 27 March 2014 - 01:51 AM

Thanks for the help! Now that I got a deffnt file, I only need to get TFConvert to work. Anything that will help me find a solution is greatly appreciated!
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3574
  • View blog
  • Posts: 11,115
  • Joined: 05-May 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 27 March 2014 - 05:42 AM

When you say it won't work, what error message are you getting? Most modern tools have helpful error messages that identify the problem and will lead you to how to fix the problem.
Was This Post Helpful? 0
  • +
  • -

#5 Sewe21  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-October 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 28 March 2014 - 04:15 AM

The error message i get when writing either "TFConvert", "tfconvert" or "tfconvert temp.deffnt temp.tinyfny" is: TFconvert är inte ett internt kommande, externt kommando, program eller kommandofil. Which translated from Swedish to English is: TFConvert is not an internal command, extrernal command, program or commandfile.

And if I try to run TFConvert.exe directly it just closes right after opening. This makes me believe that im missing some essential files, but I haven't found a fix yet.
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3574
  • View blog
  • Posts: 11,115
  • Joined: 05-May 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 28 March 2014 - 06:05 AM

Do you have TFConvert.exe as part of your search path? If you type in 'where tfconvert.exe' in a command window, what is the output?

I'm not familiar enough with the Micro SDK, but the typical Microsoft SDK layout will put their binaries into a "tools" folder. Any which way, you need to find which folder the conversion tool is installed in and make it part of your search path.

This question is devolving away from a C# question into a .NET Framework question. I may decide to move this thread...
Was This Post Helpful? 0
  • +
  • -

#7 Sewe21  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-October 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 31 March 2014 - 12:20 AM

Please move this trhread if you want, I new that this posting this in C# was probably wrong. But didn't know a better place to post it, sorry for that. Anyways, thanks for the tip. I will try what you mentioned now and see if I can make it work.
Was This Post Helpful? 0
  • +
  • -

#8 Sewe21  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-October 12

Re: How to convert from TrueTypeFonts to TinyFonts

Posted 31 March 2014 - 02:23 AM

Nice! TFConvert now works, all I had to do was to add the .NET Micro Framework tools folder pathname with 'PATH' in cmd.

But another problem ocurred now, I get an error message saying 'Cannot open 'bgothm.fntdef'!'. This is how my fntdef file looks like:

AddFontToProcess C:\Users\Te-dator\Desktop\bgothm.ttf

SelectFont "FN:"Bank Gothic Medium BT",FullName:Bank Gothic Medium BT"

ImportRange 33 126
ImportRange 160 255
ImportRange 262 263
ImportRange 268 273
ImportRange 286 287
ImportRange 304 305
ImportRange 321 322
ImportRange 338 339
ImportRange 350 353
ImportRange 376 376
ImportRange 381 382
ImportRange 402 402
ImportRange 710 711
ImportRange 728 733
ImportRange 937 937
ImportRange 960 960
ImportRange 8211 8230
ImportRange 8240 8240
ImportRange 8249 8250
ImportRange 8355 8355
ImportRange 8482 8482
ImportRange 8706 8710
ImportRange 8719 8734
ImportRange 8747 8747
ImportRange 8776 8776
ImportRange 8800 8805
ImportRange 9647 9647
ImportRange 61440 61443

I tried saving it in the tools folder and desktop(I pathed both pathnames in cmd) but TFConvert still can't open bgothm.fntdef. What I wrote in cmd was 'TFConvert bgothm.fntdef bgothm.tinyfnt', I also tried replacing bgothm.fntdef with it's full pathname, but that didn't do any good. I appreciate any help I can get! Thanks in advance.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1