Wox-launcher / Wox

A cross-platform launcher that simply works
http://wox-launcher.github.io/Wox/
GNU General Public License v3.0
24.33k stars 2.37k forks source link

does not support otf font #217

Closed JayXon closed 10 months ago

JayXon commented 9 years ago

Exception

System.IO.FileFormatException: 'file:///C:/WINDOWS/FONTS/NotoSansCJKsc-Black_0.otf' file does not conform to the expected file format specification.
   Source: PresentationCFFRasterizer
   TargetAssembly: PresentationCFFRasterizer, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationCFFRasterizer.dll
   TargetSite: Void MapErrorCode(Adobe.CffRasterizer.AdobeErrorCode)
   at Adobe.CffRasterizer.OTFRasterizer.MapErrorCode(AdobeErrorCode error)
   at Adobe.CffRasterizer.OTFRasterizer.NewFont(UnmanagedMemoryStream fontFileStream, Uri sourceUri, Int32 faceIndex)
   at MS.Internal.FontFace.TrueTypeFontDriver.ReadCFFMetrics(FontFaceLayoutInfo cache, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   at MS.Internal.FontFace.TrueTypeFontDriver.ReadGlyfMetrics(FontFaceLayoutInfo cache, UInt16 indexToLocFormat, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   at MS.Internal.FontFace.TrueTypeFontDriver.ReadAdvances(FontFaceLayoutInfo cache, CheckedPointer hmtxTable, UInt16 numberOfMetrics, UInt16 indexToLocFormat, UInt16 typoAscent, UInt16 typoDescent)
   at MS.Internal.FontFace.TrueTypeFontDriver.GetLayoutFontFaceInfo(FontFaceLayoutInfo cache)
   at MS.Internal.FontCache.FontFaceLayoutInfo.MS.Internal.FontCache.IFontCacheElement.AddToCache(CheckedPointer newPointer, ElementCacher cacher)
   at MS.Internal.FontCache.HashTable.Lookup(IFontCacheElement e, Boolean add)
   at MS.Internal.FontCache.CacheManager.Lookup(IFontCacheElement e)
   at System.Windows.Media.GlyphTypeface.Initialize(Uri typefaceSource, StyleSimulations styleSimulations, Boolean fromPublic)
   at MS.Internal.FontCache.CachedFontFace.CreateGlyphTypeface()
   at MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)
   at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)
   at System.Windows.Media.Typeface.ConstructCachedTypeface()
   at System.Windows.Media.Typeface.get_CachedTypeface()
   at System.Windows.Media.Typeface.get_UnderlinePosition()
   at System.Windows.Media.FamilyTypeface..ctor(Typeface face)
   at System.Windows.Media.FamilyTypefaceCollection.InitializeItemsFromInnerList()
   at System.Windows.Media.FamilyTypefaceCollection.Enumerator.MoveNext()
   at System.Windows.Data.CollectionView..ctor(IEnumerable collection, Int32 moveToFirst)
   at System.Windows.Data.ListCollectionView..ctor(IList list)
   at MS.Internal.Data.ViewManager.GetViewRecord(Object collection, CollectionViewSource cvs, Type collectionViewType, Boolean createView)
   at MS.Internal.Data.DataBindEngine.GetViewRecord(Object collection, CollectionViewSource key, Type collectionViewType, Boolean createView)
   at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, Boolean createView)
   at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, DependencyObject d)
   at System.Windows.Controls.ItemCollection.SetItemsSource(IEnumerable value)
   at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Controls.Primitives.Selector.UpdatePublicSelectionProperties()
   at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
   at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Object item, Boolean assumeInItemsCollection)
   at System.Windows.Controls.ComboBox.NotifyComboBoxItemMouseUp(ComboBoxItem comboBoxItem)
   at System.Windows.Controls.ComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Environment

russelg commented 8 years ago

I've been having the same issue with Noto. Why does wox not like this font series???

bao-qian commented 8 years ago

This is WPF issue. Pull Request welcome.