10 Replies - 545 Views - Last Post: 21 January 2014 - 08:28 AM Rate Topic: -----

#1 evildead9000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-November 10

How can I change the internal name of a font?

Posted 18 January 2014 - 03:02 PM

Unfortunately, I don't have any code as an example. I've searched a lot, but can't seem to find anything that can point me in the right direction.

I'd also like to be able to modify the properties of an existing font, like Title, Company, File Version etc.

Is there a VB class that I'm unaware of or not utilizing? As far as I know, the general Font class will allow me to control font properties such a Bold, and Size and things like that.

I've been thinking about coding my own font creation software and would appreciate any guidance.

Is This A Good Question/Topic? 0
  • +

Replies To: How can I change the internal name of a font?

#2 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3214
  • View blog
  • Posts: 10,777
  • Joined: 12-December 12

Re: How can I change the internal name of a font?

Posted 18 January 2014 - 06:58 PM

View Postevildead9000, on 18 January 2014 - 10:02 PM, said:

I've been thinking about coding my own font creation software and would appreciate any guidance.

Are you intending to create entirely new fonts? Quite a bit of work involved in that ;)

Font Class

I haven't don't much work with this class, so I may be corrected, but I don't believe you can change the font-name, or font-family name. These names have to reflect fonts that already exist, otherwise it defaults to particular system fonts.

For example, creating a new FontFamily will cause an ArgumentException if its:

Quote

name specifies a font that is not installed on the computer running the application.


(You can Clone() a font but I don't think this will help.)

I'm guessing also that, in order to access properties such as Title, Company, you would need to access the font-file and read its file-properties. They might be read-only(?).

Someone with more knowledge on this subject may respond ;). In the meantime, you might clarify what you want to achieve.
Was This Post Helpful? 0
  • +
  • -

#3 thecoat  Icon User is offline

  • D.I.C Head

Reputation: 68
  • View blog
  • Posts: 224
  • Joined: 07-December 13

Re: How can I change the internal name of a font?

Posted 18 January 2014 - 07:27 PM

View Postevildead9000, on 18 January 2014 - 03:02 PM, said:

I've been thinking about coding my own font creation software and would appreciate any guidance.


WPF has some Glyph classes under the system.windows.media namespace, however I'm not aware of any part of the framework that is going to do the heavy lifting for you in developing font creation and editing software. The most interesting class in this regard, the GlyphTypeface, looks like it only allows get on it's property accessors though, and doesn't really have a save method, so I suspect it might be useful to look up info about a font out of the font file, but not so much in modifying or creating new ones.

http://msdn.microsof...(v=vs.110).aspx

Keep in mind there isn't just one single standard for font file formats, here is a good MS resource page concerning fonts, if nothing else it will let you know what you are getting into:

http://www.microsoft...lsOverview.mspx

http://www.microsoft...nsOverview.mspx

I'm no expert on the concepts around font design, but it sure looks like you are going to be pretty close to the metal in a lot of ways.

This post has been edited by thecoat: 18 January 2014 - 07:30 PM

Was This Post Helpful? 1
  • +
  • -

#4 evildead9000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-November 10

Re: How can I change the internal name of a font?

Posted 18 January 2014 - 07:33 PM

To clarify:

Quite some time ago I made a bunch of my own fonts using a freeware program, but I don't remember which one. There are tons! And some are really advanced. My fonts are simple.

Either way I just want to modify the internal names of them and the property info with my own code.

I don't want to make font creation software, I want to EDIT the info LIKE font creation software. Sorry for describing it so broad!

Coding one from scratch would take me forever. Hopefully with some guidance, I can code what I want in a few hours or so!

Thanks for your feedback.
Was This Post Helpful? 0
  • +
  • -

#5 thecoat  Icon User is offline

  • D.I.C Head

Reputation: 68
  • View blog
  • Posts: 224
  • Joined: 07-December 13

Re: How can I change the internal name of a font?

Posted 18 January 2014 - 11:50 PM

You will likely need to look at the file format for the font type, then use bytestreams to edit it much like you would with a hex editor. Responding from an ER waiting room on my tablet, may be able to help more later on.
Was This Post Helpful? 0
  • +
  • -

#6 evildead9000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-November 10

Re: How can I change the internal name of a font?

Posted 20 January 2014 - 01:41 PM

I hope everything's okay in the ER.

It sounds complicated and it appears there isn't a specific class to do so.

Would the steps be similar to this:

1) Use a ByteStream to read my font into memory.
2) Somehow analyze the file or read the current info I want to modify.
3) Change that data.
4) Save the ByteStream data as a new font.

Is this in the ball park?

Also, some previous posts did provide some useful links. Thanks!
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8937
  • View blog
  • Posts: 33,473
  • Joined: 12-June 08

Re: How can I change the internal name of a font?

Posted 20 January 2014 - 01:48 PM

I really doubt you would be able to edit font properties by reading it as a byte stream. Unless you have something that breaks apart the relevant data into a class - then mucking around in the binary array bits is not a decent avenue.

So this is the app you were looking to make?

http://www.microsoft...erty/fpedit.htm
Was This Post Helpful? 0
  • +
  • -

#8 evildead9000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-November 10

Re: How can I change the internal name of a font?

Posted 20 January 2014 - 02:57 PM

Yes! That's what I would like to make.

It's 315 KB, so I hope it's not that difficult to code.
Was This Post Helpful? 0
  • +
  • -

#9 thecoat  Icon User is offline

  • D.I.C Head

Reputation: 68
  • View blog
  • Posts: 224
  • Joined: 07-December 13

Re: How can I change the internal name of a font?

Posted 20 January 2014 - 04:13 PM

ER trip results were they found a 1 cm kidney stone blocking the path between the kidney and the bladder, he had to have a stint put in the next morning to make sure he didn't suffer kidney damage before they could get it broken down.

Anyway I just looked closer at the TTF format, egad. I was thinking the basic font info was stored in a fixed position near the beginning of the file. Really the "Header" has references to tables, and the various pieces of data would be under the name table. Yea it's possible to do, but you'd probably end up writing the "something that breaks apart the relevant data into a class" that modi123_1 was talking about, only all data is going to be relevant, because if you expand the size of a given table you'd then need to change pointers for successive tables, oh and checksums at the table and file level.

From a personal standpoint before I'd go to the effort to do this, I'd spend the time getting more familiar with C++ or learning Python for which there are already extensive libraries for dealing with fonts (not telling you to do so, just realistically looking at it from the perspective that I've never really been that interested in fonts as is hehe).
Was This Post Helpful? 0
  • +
  • -

#10 evildead9000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-November 10

Re: How can I change the internal name of a font?

Posted 20 January 2014 - 04:26 PM

I'm somewhat familiar with C++. I wouldn't mind coding in it if that's the best language for my request.

Does anyone of particular classes that I would use? I'm Googling around now.
Was This Post Helpful? 0
  • +
  • -

#11 thecoat  Icon User is offline

  • D.I.C Head

Reputation: 68
  • View blog
  • Posts: 224
  • Joined: 07-December 13

Re: How can I change the internal name of a font?

Posted 21 January 2014 - 08:28 AM

http://freetype.sour....net/freetype2/

This was the C library I ran across while digging up info on it.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1