New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content Pipleine Xamarin Studio Addin #1937
Conversation
…compiling content Bump ThirdParty/Libs to include new mac dylibs
… is currently supported. Added Windows projects and solution. Fixed a bug in the TextureProcessor
Added support for using Content Pipeline Extensions Updated the Content Pipeline Extension template Fixed an issue with the FontDescriptionProcessor where if the font didn't exist it would crash the IDE
Test PASSed. |
Pipeline - Add new Font Glyph classes for Font Processing
Test FAILed. |
Test PASSed. |
Almost ready people :D |
Sorry Dean. Let me clean up some things in there as it totally slipped by me. I should get to it today. |
Code cleanup
Test PASSed. |
Test FAILed. |
Test PASSed. |
Test PASSed. |
Test PASSed. |
We need to get this merged. The currently committed changes to the |
if (File.Exists(Path.Combine(directory,fontName+".ttf"))) fontName += ".ttf"; | ||
if (File.Exists(Path.Combine(directory,fontName+".ttc"))) fontName += ".ttc"; | ||
if (File.Exists(Path.Combine(directory,fontName+".otf"))) fontName += ".otf"; | ||
var directories = new string[] { directory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to eventually be fixed.
The FontName in a FontDescription is not necessarily the filename of a TTF font. Resolving the font name to a font file is a more complex process.
We can deal with that AFTER this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomspilman the problem is FreeType NEEDS the font file name, it can't use the Fontname (unlike the .net Font class). This is a change that we'll need to live with I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be done. The Nuclex font processor supports both font name and font filename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts to iterate installed fonts on Windows. That is how the Nuclex font processor does it. For reference
https://devel.nuclex.org/framework/svn/graphics/fonts/Nuclex.Fonts.Content.TrueTypeImporter/trunk/Source/FreeTypeManager.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added code to lookup in the registry based on the fontName. This is only applied to windows though, so it means if you use a FontName in your spritefont on a Mac the chances are it wont work, unless the Font Filename matches the FontName+.ttf etc. However the improvement is if you use the Font filename, you can just drop the font in the same directory as the .spritefont file and it will pick it up without having to install it.
…d content. This will need to be enhanced
…iscarding formats that were better than the source wave format. This caused a crash.
Test PASSed. |
Test PASSed. |
…Audio does not support Mac.
Test FAILed. |
Test PASSed. |
Test PASSed. |
Test PASSed. |
Massive Thanks for this : Content Pipleine Xamarin Studio Addin
This PR includes
a) Textures - DXT and PVRTC compression support
b) SpriteFonts - Can use system fonts like XNA does, BUT you can also put the font file in the same directory as the .spritefont and it will pick that file up.
It also has some changes to support Audio processing on Mac and a fix for NAudio on Windows when producing .mp4 files. The Audio processing seems to be working ok on Mac and can convert a .wav to an .mp4, and a .wav to an .xnb which can then be used.
This has been tested on Mac and Windows.