Apple的NSTextField
和NSTextView
,甚至TextEdit应用程序都能够检测并使用New Tai Lue字符的特殊字体,例如ᦀᦐᦑᦁ - 一旦检测到字符字符串/部分字符串使用 Noto Sans New Tai Lue 字体或 Helvetica Neue (在OS X 10.11上)呈现
不幸的是,系统字体(Apple' s San Fransisco
)如果放在NSTabViewController的其中一个标签内,则无法呈现标签
新的大略支持是Chinese GB 18030 government standard
的要求下面是故事板代码,它可以重现问题,并说明它在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>
答案 0 :(得分:1)
Apple在MacOS 10.12(Sierra)中解决了这个问题