====== システムフォントをNotoにしてるとVisual Studio 2013がインストールできない件 ====== Windows 10のシステムフォントを書き換えてNoto Sans CJKにしてるとVisual Studio 2013がインストール出来ないっぽい。 インストーラであるvs_community.exeを実行すると、画面中央に「Visual Studio」ロゴが表示された後、お馴染みの縦長インストーラUIが出るんだけれども、ただの真っ黒ウィンドウで1分程すると勝手に終了してしまう。 {{ :blog:2019:vs2013_installer_black_screen.png |}} プロパティから「互換モードでこのプログラムを実行する」にチェックを入れて起動すると、画面は正しく出るものの今度は互換性エンジンが云々でインストールが出来ない。これは既知の問題というか、そういう仕様っぽいのである意味正常。 %TEMP%に作られるインストーラのログ(dd_vs_community_日付.logってファイル)を見たら\\ 「%%[4F88:2824][2019-08-17T11:40:29]e000: MUX: ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。%%」\\ という怪しげな一文が…!当該箇所のログ全文は↓の通り。どう見てもフォントのインスタンスを作ってるっぽい所で落ちてる。 [4F88:2824][2019-08-17T11:40:29]e000: MUX: ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。 [4F88:2824][2019-08-17T11:40:29]e000: MUX: Stack: 場所 Adobe.CffRasterizer.OTFRasterizer.MapErrorCode(AdobeErrorCode error) 場所 Adobe.CffRasterizer.OTFRasterizer.NewFont(UnmanagedMemoryStream fontFileStream, Uri sourceUri, Int32 faceIndex) 場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadCFFMetrics(FontFaceLayoutInfo cache, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent) 場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadGlyfMetrics(FontFaceLayoutInfo cache, UInt16 indexToLocFormat, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent) 場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadAdvances(FontFaceLayoutInfo cache, CheckedPointer hmtxTable, UInt16 numberOfMetrics, UInt16 indexToLocFormat, UInt16 typoAscent, UInt16 typoDescent) 場所 MS.Internal.FontFace.TrueTypeFontDriver.GetLayoutFontFaceInfo(FontFaceLayoutInfo cache) 場所 MS.Internal.FontCache.FontFaceLayoutInfo.MS.Internal.FontCache.IFontCacheElement.AddToCache(CheckedPointer newPointer, ElementCacher cacher) 場所 MS.Internal.FontCache.HashTable.Lookup(IFontCacheElement e, Boolean add) 場所 MS.Internal.FontCache.CacheManager.Lookup(IFontCacheElement e) 場所 System.Windows.Media.GlyphTypeface.Initialize(Uri typefaceSource, StyleSimulations styleSimulations, Boolean fromPublic) 場所 MS.Internal.FontCache.CachedFontFace.CreateGlyphTypeface() 場所 MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch) 場所 MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch) 場所 System.Windows.Media.Typeface.ConstructCachedTypeface() 場所 System.Windows.Media.Typeface.get_CachedTypeface() 場所 System.Windows.Media.Typeface.CheckFastPathNominalGlyphs(CharacterBufferRange charBufferRange, Double emSize, Double widthMax, Boolean keepAWord, Boolean numberSubstitution, CultureInfo cultureInfo, Int32& stringLengthFit) 場所 MS.Internal.TextFormatting.SimpleRun.CreateSimpleTextRun(CharacterBufferRange charBufferRange, TextRun textRun, TextFormatterImp formatter, Int32 widthLeft, Boolean emergencyWrap) 場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, CharacterBufferRange charString, TextRun textRun, Int32 runLength, Int32 widthLeft) 場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, Int32 cp, Int32 cpFirst, Int32 widthLeft, Int32 widthMax) 場所 MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth) 場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache) 場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache) 場所 System.Windows.Controls.TextBlock.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 場所 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 場所 System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Border.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Control.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Decorator.MeasureOverride(Size constraint) 場所 System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.ContextLayoutManager.UpdateLayout() 場所 System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) 場所 System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() 場所 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 場所 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 場所 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) 場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 場所 System.Windows.Threading.DispatcherOperation.InvokeImpl() 場所 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) 場所 System.Threading.ExecutionContext.runTryCode(Object userData) 場所 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) 場所 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) 場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 場所 System.Windows.Threading.DispatcherOperation.Invoke() 場所 System.Windows.Threading.Dispatcher.ProcessQueue() 場所 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 場所 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 場所 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 場所 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) 場所 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) 場所 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 場所 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 場所 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 場所 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) 場所 System.Windows.Threading.Dispatcher.Run() 場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.RunUI(ViewModelCommonUi viewModel) 場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.InternalRun() 場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.Run() 場所 System.Threading.ThreadHelper.ThreadStart_Context(Object state) 場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 場所 System.Threading.ThreadHelper.ThreadStart() まさかと思ってシステムフォントを標準のYu Gothic UIに戻してみたら無事インストーラが立ち上がった。マジかよーって感じ。 確認してないけど、Notoの問題ってよりシステムフォントにOTF指定したのが不味いのかも?とりあえず無事インスコ出来てよかった。