Browse Source

Introjucer: added Xcode frameworks setting. Fix for win32 bold fonts. Fix for 64-bit plugin builds.

tags/2021-05-28
jules 13 years ago
parent
commit
a6069d1c02
5 changed files with 21 additions and 8 deletions
  1. +7
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  2. +1
    -0
      extras/Introjucer/Source/Utility/jucer_PresetIDs.h
  3. +1
    -1
      modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h
  4. +1
    -1
      modules/juce_audio_processors/juce_audio_processors.h
  5. +11
    -6
      modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp

+ 7
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -79,6 +79,7 @@ public:
//==============================================================================
Value getObjCSuffix() { return getSetting ("objCExtraSuffix"); }
Value getPListToMerge() { return getSetting ("customPList"); }
Value getExtraFrameworks() { return getSetting (Ids::extraFrameworks); }
int getLaunchPreferenceOrderForCurrentOS()
{
@@ -131,6 +132,10 @@ public:
"You can paste the contents of an XML PList file in here, and the settings that it contains will override any "
"settings that the Introjucer creates. BEWARE! When doing this, be careful to remove from the XML any "
"values that you DO want the introjucer to change!");
props.add (new TextPropertyComponent (getExtraFrameworks(), "Extra Frameworks", 2048, false),
"A comma-separated list of extra frameworks that should be added to the build. "
"(Don't include the .framework extension in the name)");
}
void launchProject()
@@ -706,6 +711,8 @@ private:
if (! projectType.isLibrary())
{
StringArray s (xcodeFrameworks);
s.addTokens (getExtraFrameworks().toString(), ",;", "\"'");
s.trim();
s.removeDuplicates (true);
s.sort (true);


+ 1
- 0
extras/Introjucer/Source/Utility/jucer_PresetIDs.h View File

@@ -61,6 +61,7 @@ namespace Ids
DECLARE_ID (osxSDK);
DECLARE_ID (osxCompatibility);
DECLARE_ID (osxArchitecture);
DECLARE_ID (extraFrameworks);
DECLARE_ID (winArchitecture);
DECLARE_ID (winWarningLevel);
DECLARE_ID (bigIcon);


+ 1
- 1
modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h View File

@@ -47,7 +47,7 @@
#undef Time
#else
#ifndef JUCE_SUPPORT_CARBON
#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT)
#define JUCE_SUPPORT_CARBON 1
#endif


+ 1
- 1
modules/juce_audio_processors/juce_audio_processors.h View File

@@ -54,7 +54,7 @@
// #error "You need to set either the JUCE_PLUGINHOST_AU anr/or JUCE_PLUGINHOST_VST flags if you're using this module!"
#endif
#ifndef JUCE_SUPPORT_CARBON
#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT)
#define JUCE_SUPPORT_CARBON 1
#endif


+ 11
- 6
modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp View File

@@ -153,8 +153,8 @@ namespace DirectWriteTypeLayout
HRESULT hr = fontCollection->GetFontFromFontFace (glyphRun->fontFace, dwFont.resetAndGetPointerAddress());
jassert (dwFont != nullptr);
if (dwFont->GetWeight() == DWRITE_FONT_WEIGHT_BOLD) styleFlags &= Font::bold;
if (dwFont->GetStyle() == DWRITE_FONT_STYLE_ITALIC) styleFlags &= Font::italic;
if (dwFont->GetWeight() == DWRITE_FONT_WEIGHT_BOLD) styleFlags |= Font::bold;
if (dwFont->GetStyle() == DWRITE_FONT_STYLE_ITALIC) styleFlags |= Font::italic;
ComSmartPtr<IDWriteFontFamily> dwFontFamily;
hr = dwFont->GetFontFamily (dwFontFamily.resetAndGetPointerAddress());
@@ -248,12 +248,17 @@ namespace DirectWriteTypeLayout
range.startPosition = attr.range.getStart();
range.length = jmin (attr.range.getLength(), textLen - attr.range.getStart());
if (attr.getFont() != nullptr)
const Font* const font = attr.getFont();
if (font != nullptr)
{
textLayout->SetFontFamilyName (attr.getFont()->getTypefaceName().toWideCharPointer(), range);
textLayout->SetFontFamilyName (font->getTypefaceName().toWideCharPointer(), range);
const float fontHeightToEmSizeFactor = getFontHeightToEmSizeFactor (*font, *fontCollection);
textLayout->SetFontSize (font->getHeight() * fontHeightToEmSizeFactor, range);
const float fontHeightToEmSizeFactor = getFontHeightToEmSizeFactor (*attr.getFont(), *fontCollection);
textLayout->SetFontSize (attr.getFont()->getHeight() * fontHeightToEmSizeFactor, range);
if (font->isBold()) textLayout->SetFontWeight (DWRITE_FONT_WEIGHT_BOLD, range);
if (font->isItalic()) textLayout->SetFontStyle (DWRITE_FONT_STYLE_ITALIC, range);
}
if (attr.getColour() != nullptr)


Loading…
Cancel
Save