doubletype-dev-en Mailing List for DoubleType
Status: Alpha
Brought to you by:
eed3si9n
You can subscribe to this list here.
2005 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Neateye <nit...@ao...> - 2005-05-26 21:30:11
|
Call out Gouranga be happy!!! Gouranga Gouranga Gouranga .... That which brings the highest happiness!! |
From: e.e <eed...@us...> - 2005-01-13 06:16:54
|
Hi Yannik, Yannik De Valck wrote: > what if you want to read an existing truetype font-file? > Is that an option? And if so: which package or class is responsible > for the conversion from the truetype font-file to all the seperate glyph-files for all the glyphs in the application? Currently DoubleType does not decompile TrueType font file into .glyph files. Technically it is not difficult once you understand the structure of the TrueType font file. My original motive for creating DoubleType was to provide an open source tool to create open source typeface. It would be tempting for people to base their work on commercial typeface especially for asian character set which contains thousands of Chinese characters. At this point, I would not like DoubleType to be associated with tyepface theft before it's even known for open source typefaces, so I intentionally did not implement the feature. Having said that, I can explain how it could be implemented. As I've said, DoubleType uses different data structure than TrueType font file. For example, in DoulbeType, each .glyph file stores its own advance width, which would make sense from type designer's point of view. However, in TrueType font file, advance width for all glyphs are stored in a "table" called hmtx (horizontal metrics) and hhea (horizontal header) stores the max value of advance widths. - http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hmtx.html - http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html TrueType font's structure makes sense from font engine's point of view. Considering relatively poor computing power at the time it came to the market, you can find a trace of effort to optimize the performance by precalculating many values. While X-prefixed classes and E-prefixed classes map to DoubleType's glyph file, writer classes and TTGlyph class in org.doubletype.ossa.truetype package maps closely to the data structure in TrueType font file. The writer classes such as HtmxWriter extends FontFormatWriter which has facility to write out data into in-memory buffer according to TrueType font's specification. FontFileWriter class acts as a facade and orchestrates the writer classes. If I were to implement decompilation of TrueType file into .glyph files, I would implement reader classes which does exatcly the opposite of the writer classes. Thanks, e.e |
From: Yannik De V. <Yan...@vu...> - 2005-01-12 13:23:16
|
Hello, Thank you for your excellent explanation, I really starting to understand the application as a whole thanks to you. There's just one thing I don't quite understand (there's always a thing I don't understand it seems :) ): You say everything is stored in glyph-files and then build to a truetype font-file, which is good, but what if you want to read an existing truetype font-file? Is that an option? And if so: which package or class is responsible for the conversion from the truetype font-file to all the seperate glyph-files for all the glyphs in the application? Yet again: thank you for the response and help, it's really great to receive so much help from you. Kindest regards, Yannik >Hi Yannik and David, > >Yannik De Valck wrote: >> I don't know much about Truetypes or Openfonts, >> but is it normal for a glyph-file to be in XML? > > And are truetype fontfiles also standardly in XML? > > Or is just for this application that they're in XML? > >TrueType font file is a binary format described in: >- http://developer.apple.com/fonts/TTRefMan/ > >XML-derived glyph language used in DoubleType is an original schema, >defined with glyph.rng. >DoubleType builds TrueType font file from the glyph files, just like >a compiler compiles executables from source codes. > >Storing the data in glyph files, as opposed to editting the TrueType >font file directly, has several benefits. >First, the code is much cleaner. Second, I can add extra >functionalities. For example, DoubleType can handle cubic bezier curves, >but TrueType font stores only quadratic curves. >Third, because XML files are essentially text file, it allows >collaborative development of a typeface, like open source software. >This is the reason glyphs are stored seperately in a file. > >Thanks, >e.e > > >------------------------------------------------------- >The SF.Net email is sponsored by: Beat the post-holiday blues >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >_______________________________________________ >DoubleType-dev-en mailing list >Dou...@li... >https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en > > |
From: e.e <eed...@us...> - 2005-01-12 11:13:28
|
Hi Yannik and David, Yannik De Valck wrote: > I don't know much about Truetypes or Openfonts, > but is it normal for a glyph-file to be in XML? > And are truetype fontfiles also standardly in XML? > Or is just for this application that they're in XML? TrueType font file is a binary format described in: - http://developer.apple.com/fonts/TTRefMan/ XML-derived glyph language used in DoubleType is an original schema, defined with glyph.rng. DoubleType builds TrueType font file from the glyph files, just like a compiler compiles executables from source codes. Storing the data in glyph files, as opposed to editting the TrueType font file directly, has several benefits. First, the code is much cleaner. Second, I can add extra functionalities. For example, DoubleType can handle cubic bezier curves, but TrueType font stores only quadratic curves. Third, because XML files are essentially text file, it allows collaborative development of a typeface, like open source software. This is the reason glyphs are stored seperately in a file. Thanks, e.e |
From: e.e <eed...@us...> - 2005-01-12 10:38:49
|
Hello, e.e wrote: > This idea of mapping XML document and object is called XML data binding. > Relaxer is a XML data binding tool that uses RELAX NG as input. > # There are other tools that does XML data binding. > # Castor is more popular, I think. Other platforms have their own stuff. > X-prefixed classes in org.doubletype.ossa.xml package generated by Relaxer. > > I put anything that needs to be saved into the file into my glyph > language. This saves a lot of work because I only need to define it once > in the schema and it would be in both Java object and XML. So X-prefixed classes such as XContour would take care of saving and loading data from .glyph file. But from object-oriented perspective these classes are pretty "dumb", because they only store the data and it doesn't have any behavior associated with them. To overcome this issue, Relaxer has a facility called abstract factory to let me extend the X-prefixed classes. When Relaxer finds a <contour> tag, it creates EContour object instead of XContour object. # E is for extend, not Emulator EContour defines methods such as display() and move(), so it's more smarter because it knows what to do with the data. As it turns out, most of the objects in DoubleType requires similar operation such as displaying and moving. In that case, it would be useful to define an interface so I can treat them the same way. This way, I can put whatever objects in a list and let each object decide how to display or move itself. For example, take a look at GlyphFile class's display method: public void display(Graphics2D g, AffineTransform a_trans) { Iterator i = createIterator(); while (i.hasNext()) { GlyphObject object = (GlyphObject) i.next(); object.display(g, a_trans); } // while } A point and a contour would have totally different logic for displaying but GlyphFile doesn't have to know about it. In other words, E-prefixed classes are acting as an adapter from X-prefixed classes to GlyphObject based classes. Design architecture such as abstract factory and adapter are called Design Patterns. The following page lists some of the patterns that's used in my code: - http://doubletype.sourceforge.net/?DesignPatterns Thanks, e.e |
From: e.e <eed...@us...> - 2005-01-12 09:45:23
|
Hi Nemesis, > I think i kinda understand the most of it, but > I can't seem to understand what the Relaxer-part is all about. > I can find it's a tool to put XML-code into java-code, > and so it generates the whole xml-package, but i don't understand the > meaning of it within the program... You've mentioned you wanted to know the thinking process behind DoubleType so I'll try to explain that. When I started designing the program I knew XML would be used. XML is simple but deep. From simple point of view, XML is just HTML look-alike. Bunch of tags. More modern way of looking as XML is XML as a meta-language: a language that lets you define your own language. For example, we can define a language where you have a <root> tag, and within the <root> tag, you have zero or more <employee> tags, and within each <employee> tag you have a <lastname> tag. A sample document in the language would look like this: <root> <employee><lastname>Smith</lastname></employee> <employee><lastname>Brown</lastname></employee> </root> It would be useful if we can describe the grammer in some way. A language that let's you describe the grammer of XML-derived language is called schema language. The most standard schema language is W3C XML Schema (.xsd file) but it is too difficult for human to use it. As an alternative schema language, there is RELAX NG. There are two notations for RELAX NG, the original XML syntax (.rng) and compact syntax (.rnc). I personally prefer compact syntax now, but for DoubleType XML syntax is used. - http://www.oasis-open.org/committees/relax-ng/tutorial.html - http://relaxng.org/compact-tutorial-20030326.html Let's describe our sample language using RELAX NG compact syntax: element root { element employee { element lastname { text } }* } One of the benefit to define the grammar of your language using using a schema language is that there are tools that lets you parse the XML document into object automatically. Without those tools, you would have to manually parse/generate XML documents, which people used to do. Since we defined <root> tag and <employee> tag, it would be convenient if a tool can generate root class and employee class so you can just use it in code like m_root.getEmployee(0).lastname = "smith"; This idea of mapping XML document and object is called XML data binding. Relaxer is a XML data binding tool that uses RELAX NG as input. # There are other tools that does XML data binding. # Castor is more popular, I think. Other platforms have their own stuff. X-prefixed classes in org.doubletype.ossa.xml package generated by Relaxer. I put anything that needs to be saved into the file into my glyph language. This saves a lot of work because I only need to define it once in the schema and it would be in both Java object and XML. It's kind of getting long, so I'll send it here and continue. Thanks, e.e |
From: Yannik De V. <Yan...@vu...> - 2005-01-12 09:22:54
|
Hello, Thanks a lot for your help David! I really appreciate it! So, if I understand it correctly, the Relaxer takes a glyph-file and puts i= t into java-code, so the program can work with it? I have just 2 other questions: I don't know much about Truetypes or Openfonts, but is it normal for a glyp= h-file to be in XML? And are truetype fontfiles also standardly in XML? Or = is just for this application that they're in XML? Second question: to make sure: There is a package "adapter", with some clas= ses with the same name as in the xml-package, online with an E instead of a= n X (e.g. XContour becomes EContour). I allready figured out where the E st= ands for (comes from the Emulator, right?), but I'm not sure what it does..= . I'm thinking that part is for the objects (like contour, contourpoint,...= ) where you want to do some special things with, like moving it around, or = such. Is this thought correct, or am I just missing the point? Again, thanks a lot for your help, it's really kind of you to take the time= to help me on this matter. Kind regards, Yannik >Hello Yannick, > >The Relaxer things allow to load an XML file (e.g, a glyph file in=20 >double type) to get a Java object (a Glyph object... don't remember the=20 >class name), and the way back (from a glyph object to a glyph=20 >description in XML) > >In double-type, all the files of the project are XML files, and Relaxer=20 >is used to load/save the files. > >Relaxer use the RelaxNG language to describe the structure of an XML=20 >File. There is another package called "Castor"=20 >(http://castor.exolab.org/) that do the same using XmlSchema. > >Regards >David > > >dou...@li... a =E9crit : >> Send DoubleType-dev-en mailing list submissions to >> =09d...@li... >>=20 >> To subscribe or unsubscribe via the World Wide Web, visit >> =09https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en >> or, via email, send a message with subject or body 'help' to >> =09d...@li... >>=20 >> You can reach the person managing the list at >> =09d...@li... >>=20 >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of DoubleType-dev-en digest..." >>=20 >>=20 >> Today's Topics: >>=20 >> 1. Question Relaxer (Yannik De Valck) >>=20 >> --__--__-- >>=20 >> Message: 1 >> Date: Wed, 12 Jan 2005 00:15:04 +0100 (MET) >> From: Yannik De Valck <Yan...@vu...> >> To: dou...@li... >> Subject: [DoubleType-dev-en] Question Relaxer >>=20 >> Hello, >>=20 >> As you said, I subscribed myself to the mailinglist, this will be a lot = easier to communicate. Thanks a lot for wanting to help me in the first pla= ce! >> As I said, I'm trying to make an application just like yours, and during= a little search on the web, I stumbled across your program. I instantly in= stalled it, and found it to be great! >> So I downloaded the source-code to try to understand you ways of thinkin= g, of getting it all together. I think i kinda understand the most of it, b= ut I can't seem to understand what the Relaxer-part is all about. I can fin= d it's a tool to put XML-code into java-code, and so it generates the whole= xml-package, but i don't understand the meaning of it within the program..= . >> I'm sorry if I'm being stupid and this is obvious :( >> Many thanks in advance, >>=20 >> Kind regards, >>=20 >> Nemesis >>=20 >>=20 >>=20 >>=20 >> --__--__-- >>=20 >> _______________________________________________ >> DoubleType-dev-en mailing list >> Dou...@li... >> https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en >>=20 >>=20 >> End of DoubleType-dev-en Digest >>=20 >>=20 > > > >------------------------------------------------------- >The SF.Net email is sponsored by: Beat the post-holiday blues >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >_______________________________________________ >DoubleType-dev-en mailing list >Dou...@li... >https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en > > |
From: David S. <dav...@wa...> - 2005-01-12 07:04:12
|
Hello Yannick, The Relaxer things allow to load an XML file (e.g, a glyph file in=20 double type) to get a Java object (a Glyph object... don't remember the=20 class name), and the way back (from a glyph object to a glyph=20 description in XML) In double-type, all the files of the project are XML files, and Relaxer=20 is used to load/save the files. Relaxer use the RelaxNG language to describe the structure of an XML=20 File. There is another package called "Castor"=20 (http://castor.exolab.org/) that do the same using XmlSchema. Regards David dou...@li... a =E9crit : > Send DoubleType-dev-en mailing list submissions to > dou...@li... >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en > or, via email, send a message with subject or body 'help' to > dou...@li... >=20 > You can reach the person managing the list at > dou...@li... >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of DoubleType-dev-en digest..." >=20 >=20 > Today's Topics: >=20 > 1. Question Relaxer (Yannik De Valck) >=20 > --__--__-- >=20 > Message: 1 > Date: Wed, 12 Jan 2005 00:15:04 +0100 (MET) > From: Yannik De Valck <Yan...@vu...> > To: dou...@li... > Subject: [DoubleType-dev-en] Question Relaxer >=20 > Hello, >=20 > As you said, I subscribed myself to the mailinglist, this will be a lot= easier to communicate. Thanks a lot for wanting to help me in the first = place! > As I said, I'm trying to make an application just like yours, and durin= g a little search on the web, I stumbled across your program. I instantly= installed it, and found it to be great! > So I downloaded the source-code to try to understand you ways of thinki= ng, of getting it all together. I think i kinda understand the most of it= , but I can't seem to understand what the Relaxer-part is all about. I ca= n find it's a tool to put XML-code into java-code, and so it generates th= e whole xml-package, but i don't understand the meaning of it within the = program... > I'm sorry if I'm being stupid and this is obvious :( > Many thanks in advance, >=20 > Kind regards, >=20 > Nemesis >=20 >=20 >=20 >=20 > --__--__-- >=20 > _______________________________________________ > DoubleType-dev-en mailing list > Dou...@li... > https://lists.sourceforge.net/lists/listinfo/doubletype-dev-en >=20 >=20 > End of DoubleType-dev-en Digest >=20 >=20 |
From: Yannik De V. <Yan...@vu...> - 2005-01-11 23:15:08
|
Hello, As you said, I subscribed myself to the mailinglist, this will be a lot easier to communicate. Thanks a lot for wanting to help me in the first place! As I said, I'm trying to make an application just like yours, and during a little search on the web, I stumbled across your program. I instantly installed it, and found it to be great! So I downloaded the source-code to try to understand you ways of thinking, of getting it all together. I think i kinda understand the most of it, but I can't seem to understand what the Relaxer-part is all about. I can find it's a tool to put XML-code into java-code, and so it generates the whole xml-package, but i don't understand the meaning of it within the program... I'm sorry if I'm being stupid and this is obvious :( Many thanks in advance, Kind regards, Nemesis |