Microsoft Visual TrueType compilers open sourced

The compilers of Visual TrueType are now open sourced and shared at the following site. The included command line tool that uses the compilers is vttcompile and similar to the vttshell tool included with VTT download.

 https://github.com/microsoft/VisualTrueType 

The project includes build action for Windows. There is no dependency on ‘window.h’ in the code but there is still work to be done to port the code for MacOS or Linux. 

There are no unit tests in the project yet. 

I have created a number of issues to track needed enhancements and bug fixes.

Thanks

Comments

  • I made it compile on the mac: https://github.com/schriftgestalt/VisualTrueType
    This is more a prove of concept, very rough and dirty.
  • That’s great, Paul! Always nice to see more tools going open source. Perhaps this will lead to some more serious hinting tools out there!
  • @Georg Seifert Great, I'll take a look. 

  • This is great news and the first important step to make open source projects with proper TT hinting possible. Thank you Microsoft.
  • Sounds great! I'll look at what @Georg Seifert did and see what else needs to be done for the Linux port to happen - likely linux port straightforward if it builds for macs.

    Would like to see the main vtt open-sourced also (I know apparently it was written in VB6...) - one step at a time :smile:
  • @Hin-Tak Leung VTT is written in C/C++ not VB. This project is mostly composed of parts of the full VTT source. 
  • @Paul Linnerud thanks. I must have got it confused - some still-used Microsoft font tool is written in VB6 and I forgot which one it is.

    I had a quick look at @Georg Seifert 'port - the change is extensive and quite repetitious? most of the non-portable stuff are wide-char string functions I think? Some replacement exists in glibc, but the easier way is perhaps looking at how the wine people wrap the windows wide-char functions with unix replacements, given that wine also runs on macs. It is probably unwise to cut and paste as wine source is LGPL, unlike VTT.
  • Hin-Tak Leung
    Hin-Tak Leung Posts: 363
    edited October 2021
    I opened a new issue instead of a pull,
    https://github.com/microsoft/VisualTrueType/issues/8
    for my mingw port (https://github.com/HinTak/VisualTrueType/tree/mingw-port). i.e. using mingw gcc to build or cross-build the windows binary, instead of visual studios.

    Most of the earliest changes are just renamings - to let it build on case-sensitive file systems Mac's is case-preserving but not case-sensitive so @Georg Seifert didn't encounter anything affecting mac builds - but it does affect build or cross-build on linux. The rest shouldn't break visual studio build either.


    on the way to making it work on linux, I thought it is easier going via mingw first.

  • I'll fork off my mingw-port branch to a linux-port branch; watch that branch for those who are interested.
  • John Hudson
    John Hudson Posts: 3,229
    some still-used Microsoft font tool is written in VB6 and I forgot which one it is.
    VOLT

  • Thanks @John Hudson for the VOLT reference!

    Finished porting to linux - it is on the linux-port branch, but I reckon it works for mac's too, so
    the default branch on my repo is called "opencompiler-port" (and it also cross-builds for 32-bit/64-bit windows too ; for now it is identical to the "linux-port" branch, which will be left to rot). I stole some ideas from @Georg Seifert 's work, but thought of a neater way of doing all the massive swprintf replacement, so the bulk of the portability change is just a dozen of lines instead of about 500 swprintf changes  (see  https://github.com/HinTak/VisualTrueType/commit/017591981104f68610887f73fa471f9ec7f77d69 ) . See the change log history for what changed and why... as I mentioned earlier, the beginning of getting it to work with mingw gcc involves renaming files, to proper mixed cases, since linux file systems are  case-sensitive.

    And opened a new issue for discussion:
    https://github.com/microsoft/VisualTrueType/issues/9
  • The changes for non-visual-studio builds has been merged - thanks @Georg Seifert for contributing xcode related material and @Simon Cozens for cmake related work. So besides visual studio for windows, you can now use xcode to build for Apple macs, use GNU make to build for Linux and cross-compiling, and cmake for what platforms cmake supports.

    The discussion issue will stay open for a little while longer, to address compiler warnings etc.

  • Yes, thanks @Hin-Tak Leung, @Georg Seifert, @Simon Cozens, @Jens Kutilek and others for your excellent contributions. We’re happy to see so much interest in the few days since we opened this repo.