mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Show unicode name of each individual character
This commit is contained in:
parent
4f333405a5
commit
d5a9e5112c
@ -7,8 +7,10 @@ develop
|
||||
|
||||
### Improvements
|
||||
|
||||
- Improve character inspector:
|
||||
- Display also Unicode block if selected letter consists of one character.
|
||||
- Display unicode names of each character if selected letter consist of multiple characters.
|
||||
- Improve text selection by clicking line numbers view.
|
||||
- Improve character info popover to show also Unicode group if selected letter consists of one character.
|
||||
- Tweak style of popup menus in toolbar.
|
||||
- Update Python syntax style:
|
||||
- Add `__copy__` and `__deepcopy__` to commands.
|
||||
|
@ -15,11 +15,11 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView horizontalHuggingPriority="249" verticalCompressionResistancePriority="250" id="c22-O7-iKe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="266" height="71"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="266" height="73"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="500" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" preferredMaxLayoutWidth="500" translatesAutoresizingMaskIntoConstraints="NO" id="Lnp-OL-NAu">
|
||||
<rect key="frame" x="8" y="7" width="58" height="54"/>
|
||||
<rect key="frame" x="8" y="9" width="58" height="54"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" secondItem="Lnp-OL-NAu" secondAttribute="height" multiplier="1:1" id="DOs-QH-6yH"/>
|
||||
</constraints>
|
||||
@ -34,7 +34,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="5tD-mh-lm6">
|
||||
<rect key="frame" x="70" y="10" width="188" height="14"/>
|
||||
<rect key="frame" x="70" y="12" width="188" height="14"/>
|
||||
<animations/>
|
||||
<textFieldCell key="cell" controlSize="small" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="U+86D9" id="Atm-wm-Ocl">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@ -46,7 +46,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="cvP-MD-1SF">
|
||||
<rect key="frame" x="70" y="45" width="188" height="16"/>
|
||||
<rect key="frame" x="70" y="47" width="188" height="16"/>
|
||||
<animations/>
|
||||
<textFieldCell key="cell" controlSize="small" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="CJK UNIFIED IDEOGRAPH-86D9" id="H6i-fn-bnL">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
@ -58,7 +58,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="V7B-LW-D7y">
|
||||
<rect key="frame" x="70" y="28" width="188" height="14"/>
|
||||
<rect key="frame" x="70" y="30" width="188" height="14"/>
|
||||
<animations/>
|
||||
<textFieldCell key="cell" controlSize="small" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="CJK Unified Ideographs" id="h7A-Kh-GoY">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@ -78,11 +78,10 @@
|
||||
<constraint firstItem="V7B-LW-D7y" firstAttribute="leading" secondItem="Lnp-OL-NAu" secondAttribute="trailing" constant="8" symbolic="YES" id="JzA-kM-gRT"/>
|
||||
<constraint firstItem="5tD-mh-lm6" firstAttribute="leading" secondItem="Lnp-OL-NAu" secondAttribute="trailing" constant="8" symbolic="YES" id="TEN-2w-O09"/>
|
||||
<constraint firstItem="Lnp-OL-NAu" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="10" id="Vj2-pk-Yi8"/>
|
||||
<constraint firstAttribute="bottom" relation="lessThanOrEqual" secondItem="Lnp-OL-NAu" secondAttribute="bottom" constant="10" id="ZP1-LR-aaH"/>
|
||||
<constraint firstItem="V7B-LW-D7y" firstAttribute="top" secondItem="cvP-MD-1SF" secondAttribute="bottom" constant="3" id="cW3-TS-n9I"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5tD-mh-lm6" secondAttribute="trailing" constant="10" id="e7L-Ya-1fM"/>
|
||||
<constraint firstItem="cvP-MD-1SF" firstAttribute="leading" secondItem="Lnp-OL-NAu" secondAttribute="trailing" constant="8" symbolic="YES" id="e8Y-ow-6K9"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="5tD-mh-lm6" secondAttribute="bottom" constant="10" id="ggB-LH-qfa"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="5tD-mh-lm6" secondAttribute="bottom" constant="12" id="ggB-LH-qfa"/>
|
||||
<constraint firstItem="Lnp-OL-NAu" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="10" id="sWg-5J-zQW"/>
|
||||
<constraint firstItem="Lnp-OL-NAu" firstAttribute="top" secondItem="cvP-MD-1SF" secondAttribute="top" id="zIk-gW-Q8x"/>
|
||||
</constraints>
|
||||
|
@ -65,15 +65,21 @@
|
||||
_unicodeName = [characterInfo prettyDescription];
|
||||
_unicodeBlockName = [characterInfo isComplexChar] ? nil : [[[characterInfo unicodes] firstObject] localizedBlockName];
|
||||
|
||||
// build Unicode code point string
|
||||
NSMutableString *unicode = [NSMutableString string];
|
||||
for (CEUnicodeCharacter *character in [characterInfo unicodes]) {
|
||||
if ([unicode length] != 0) {
|
||||
[unicode appendString:@" "];
|
||||
[unicode appendString:@"\n"];
|
||||
}
|
||||
[unicode appendString:[character unicode]];
|
||||
if ([character isSurrogatePair]) {
|
||||
[unicode appendFormat:@" (%@)", [[character surrogateUnicodes] componentsJoinedByString:@" "]];
|
||||
}
|
||||
|
||||
// append Unicode name
|
||||
if ([[characterInfo unicodes] count] > 1) {
|
||||
[unicode appendFormat:@"\t%@", [character name]];
|
||||
}
|
||||
}
|
||||
_unicode = [unicode copy];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user