gpt4 book ai didi

macos - NSTextField 无法在 NSTabViewController 中渲染新泰略

转载 作者:行者123 更新时间:2023-12-03 16:21:11 29 4
gpt4 key购买 nike

Apple 的 NSTextFieldNSTextView,甚至 TextEdit 应用程序都能够检测和使用 New Tai Lue 的特殊字体。字符,如 ᦀᦐᦑᦁ - 一旦检测到字符,字符串/字符串的一部分将使用 Noto Sans New Tai Lue 字体或 Helvetica Neue 呈现(在 OS X 10.11 上) )

不幸的是,如果将系统字体(Apple 的 San Fransisco)放置在 NSTabViewController 的选项卡之一内,则无法呈现标签

新太略支持是 Chinese GB 18030 government standard 的要求

下面是重现该问题的 Storyboard 代码,并说明了它在 Helvetica Neue 中为何不是问题。使用此代码替换示例应用程序中的 Main.storyboard 以查看问题。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="gAs-9S-689">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
<capability name="stacking Non-gravity area distributions on NSStackView" minToolsVersion="7.0" minSystemVersion="10.11"/>
</dependencies>
<scenes>
<!--Window Controller-->
<scene sceneID="wme-sq-rO2">
<objects>
<customObject id="OcQ-dx-Qcl" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
<windowController showSeguePresentationStyle="single" id="gAs-9S-689" sceneMemberID="viewController">
<window key="window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="eeb-fj-fEf" customClass="NSPanel">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<rect key="contentRect" x="425" y="0.0" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
</window>
<connections>
<segue destination="dTb-iK-pp7" kind="relationship" relationship="window.shadowedContentViewController" id="guv-gU-4Rk"/>
</connections>
</windowController>
</objects>
<point key="canvasLocation" x="117" y="102"/>
</scene>
<!--Tab View Controller-->
<scene sceneID="0yz-G7-5qk">
<objects>
<tabViewController selectedTabViewItemIndex="0" tabStyle="toolbar" id="dTb-iK-pp7" sceneMemberID="viewController">
<tabViewItems>
<tabViewItem identifier="" id="iID-PM-Tm3" userLabel="Debug Tab View Item"/>
</tabViewItems>
<viewControllerTransitionOptions key="transitionOptions"/>
<tabView key="tabView" type="noTabsNoBorder" id="mma-f0-sta">
<rect key="frame" x="0.0" y="0.0" width="467" height="300"/>
<autoresizingMask key="autoresizingMask"/>
<font key="font" metaFont="message"/>
<tabViewItems/>
<connections>
<outlet property="delegate" destination="dTb-iK-pp7" id="4Es-TA-rVr"/>
</connections>
</tabView>
<connections>
<outlet property="debugTabItemView" destination="iID-PM-Tm3" id="6Et-PM-Q3z"/>
<segue destination="dxy-Yn-i28" kind="relationship" relationship="tabItems" id="AC0-xw-WVl"/>
</connections>
</tabViewController>
<customObject id="KDj-aN-t0B" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="211" y="545"/>
</scene>
<!--Debug View Controller-->
<scene sceneID="uZa-Jc-edu">
<objects>
<viewController id="dxy-Yn-i28" userLabel="Debug View Controller" customClass="DebugViewController" customModule="NewTaiLue" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="gqP-Df-xL9">
<rect key="frame" x="0.0" y="0.0" width="450" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5cM-le-1O0">
<rect key="frame" x="151" y="41" width="147" height="44"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J0h-Jz-L33">
<rect key="frame" x="-2" y="27" width="151" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="System Regular: ᦀᦐᦑᦁ" id="AOD-Mp-Pqf">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AtH-gl-fNJ">
<rect key="frame" x="-2" y="0.0" width="144" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Helvetica Neue: ᦀᦐᦑᦁ" id="g3K-HT-4ux">
<font key="font" size="13" name="HelveticaNeue"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstItem="5cM-le-1O0" firstAttribute="centerX" secondItem="gqP-Df-xL9" secondAttribute="centerX" id="6UO-7V-O0y"/>
<constraint firstItem="5cM-le-1O0" firstAttribute="top" secondItem="gqP-Df-xL9" secondAttribute="top" constant="15" id="KqN-Ej-1EC"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="5cM-le-1O0" secondAttribute="bottom" constant="15" id="uLl-a1-LA2"/>
</constraints>
</view>
</viewController>
<customObject id="fm7-yt-7T9" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
<customObject id="FeH-Cm-LSF" customClass="Preferences" customModule="NewTaiLue" customModuleProvider="target"/>
<userDefaultsController representsSharedInstance="YES" id="noL-bh-qcN"/>
</objects>
<point key="canvasLocation" x="935" y="214"/>
</scene>
</scenes>
</document>

最佳答案

Apple 已在 MacOS 10.12 (Sierra) 中修复了此问题

关于macos - NSTextField 无法在 NSTabViewController 中渲染新泰略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39476778/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com