Re: [ft-devel] Porting to C#/Mono

2012-11-13 Thread Werner LEMBERG
 
 I was wondering what license concerns there might be over porting
 FreeType 2 to C#.

Just use the same licenses as FreeType, and you are done.

 I was also wondering if there would be a recommended path to
 porting.  Currently I planned on implementing the TTF driver to test
 the port, and implement other formats as the need grows.

This sounds like a good idea.

If you are done please tell us!


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Porting to C#/Mono

2012-11-13 Thread Graham Asher
It may be of interest to know that some time ago I successfully got 
FreeType working as a pure .Net assembly - in other words, I compiled it 
as C++/CLI, which made it usable with general .Net applications. Of 
course, pure compilation is not necessary when using native-code 
assemblies, so this is probably of academic interest only, but may give 
some general guidance. There were just two problems, easily overcome; 
(i) the use of 'generic' as an identifier (e.g., in FT_FaceRec) - I 
changed them all to _generic to avoid conflicts with a C++/CLI keyword); 
and (ii) the use of setjmp/longjmp; I replaced these with the returning 
of error codes.


What I was trying to do (unsuccessfully, as it turned out) was to create 
a pure .Net assembly for CartoType, my map rendering library, for use on 
platforms like Windows Phone 7 which don't allow native assemblies or 
indeed any native code. That was impossible because (I believe) I had 
not removed dependencies on native run-time libraries; and now the task 
has been rendered unnecessary by the release of Windows Phone 8, which 
supports native C or C++.


Graham Asher
CartoType Ltd.

On 13/11/2012 08:12, Werner LEMBERG wrote:



I was wondering what license concerns there might be over porting
FreeType 2 to C#.

Just use the same licenses as FreeType, and you are done.


I was also wondering if there would be a recommended path to
porting.  Currently I planned on implementing the TTF driver to test
the port, and implement other formats as the need grows.

This sounds like a good idea.

If you are done please tell us!


 Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Porting to C#/Mono

2012-11-13 Thread Trevor Sundberg
Thanks for getting back to me (I saw the email bounced when it was sent to
jinbo...@naver.com, so I thought it was lost!). I'm actually creating the
C# version for a lot of the same reasons as Graham (unlike the Windows
Phone, the Xbox with XNA can still only run pure C#). I've currently
implemented most of the major structures, and I'm also reading 'The design
of FreeType 2' which is incredibly helpful. It's not a direct port as I'm
using C# features (namespaces instead of FT_, inheritance/interfaces for
Module/Driver, etc). Overall it doesn't look like it will be too hard,
though I didn't realize TTF was actually a byte code interpreter :P

Best Regards,
Trevor Sundberg



On Tue, Nov 13, 2012 at 1:33 AM, Graham Asher graham.as...@cartotype.comwrote:

 It may be of interest to know that some time ago I successfully got
 FreeType working as a pure .Net assembly - in other words, I compiled it as
 C++/CLI, which made it usable with general .Net applications. Of course,
 pure compilation is not necessary when using native-code assemblies, so
 this is probably of academic interest only, but may give some general
 guidance. There were just two problems, easily overcome; (i) the use of
 'generic' as an identifier (e.g., in FT_FaceRec) - I changed them all to
 _generic to avoid conflicts with a C++/CLI keyword); and (ii) the use of
 setjmp/longjmp; I replaced these with the returning of error codes.

 What I was trying to do (unsuccessfully, as it turned out) was to create a
 pure .Net assembly for CartoType, my map rendering library, for use on
 platforms like Windows Phone 7 which don't allow native assemblies or
 indeed any native code. That was impossible because (I believe) I had not
 removed dependencies on native run-time libraries; and now the task has
 been rendered unnecessary by the release of Windows Phone 8, which supports
 native C or C++.

 Graham Asher
 CartoType Ltd.


 On 13/11/2012 08:12, Werner LEMBERG wrote:


  I was wondering what license concerns there might be over porting
 FreeType 2 to C#.

 Just use the same licenses as FreeType, and you are done.

  I was also wondering if there would be a recommended path to
 porting.  Currently I planned on implementing the TTF driver to test
 the port, and implement other formats as the need grows.

 This sounds like a good idea.

 If you are done please tell us!


  Werner

 __**_
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 https://lists.nongnu.org/**mailman/listinfo/freetype-**develhttps://lists.nongnu.org/mailman/listinfo/freetype-devel



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel