Skip to content

Commit

Permalink
Merge branch 'release/1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
usami-k committed Mar 19, 2014
2 parents af4243a + 5364d2d commit f7c559b
Show file tree
Hide file tree
Showing 640 changed files with 51,596 additions and 82,342 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: objective-c
xcode_project: CotEditor.xcodeproj
xcode_scheme: CotEditor
17 changes: 9 additions & 8 deletions CEATSTypesetter.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
CEATSTypesetter
(for CotEditor)
Copyright (C) 2004-2007 nakamuxu.
http://www.aynimac.com/
Copyright (C) 2004-2007 nakamuxu.
Copyright (C) 2014 CotEditor Project
http://coteditor.github.io
=================================================
encoding="UTF-8"
Expand Down Expand Up @@ -63,7 +64,7 @@ + (CEATSTypesetter *)sharedSystemTypesetter
//=======================================================

// ------------------------------------------------------
- (id)init
- (instancetype)init
// 初期化
// ------------------------------------------------------
{
Expand All @@ -86,18 +87,18 @@ - (BOOL)usesFontLeading


// ------------------------------------------------------
- (float)lineSpacingAfterGlyphAtIndex:(unsigned)inGlyphIndex withProposedLineFragmentRect:(NSRect)inRect
- (CGFloat)lineSpacingAfterGlyphAtIndex:(NSUInteger)inGlyphIndex withProposedLineFragmentRect:(NSRect)inRect
// 行間ピクセル数を返す
// ------------------------------------------------------
{
CELayoutManager *theManager = (CELayoutManager *)[self layoutManager];
float theLineSpacing = [(CETextViewCore *)[[self currentTextContainer] textView] lineSpacing];
float theFontSize;
CGFloat theLineSpacing = [(CETextViewCore *)[[self currentTextContainer] textView] lineSpacing];
CGFloat theFontSize;

if (([theManager isPrinting]) || (![theManager fixLineHeight])) {
// 印刷時または複合フォントでの行間固定をしないときは、システム既定値に、設定された行間を追加するだけ
// ([NSGraphicsContext currentContextDrawingToScreen] が真を返す時があるため、専用フラグで印刷中を確認)
float theSpacing = [super lineSpacingAfterGlyphAtIndex:inGlyphIndex withProposedLineFragmentRect:inRect];
CGFloat theSpacing = [super lineSpacingAfterGlyphAtIndex:inGlyphIndex withProposedLineFragmentRect:inRect];
theFontSize = [[[[self currentTextContainer] textView] font] pointSize];

return (theSpacing + theLineSpacing * theFontSize);
Expand All @@ -109,7 +110,7 @@ - (float)lineSpacingAfterGlyphAtIndex:(unsigned)inGlyphIndex withProposedLineFra
// (CETextViewCore で、NSParagraphStyle の lineSpacing を設定しても行間は制御できるが、
// 「文書の1文字目に1バイト文字(または2バイト文字)を入力してある状態で先頭に2バイト文字(または1バイト文字)を
// 挿入すると行間がズレる」問題が生じる)
float theDefaultLineHeight = [theManager defaultLineHeightForTextFont];
CGFloat theDefaultLineHeight = [theManager defaultLineHeightForTextFont];
theFontSize = [theManager textFontPointSize];

// 小数点以下を返すと選択範囲が分離することがあるため、丸める
Expand Down
20 changes: 10 additions & 10 deletions CEAppController.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
CEAppController
(for CotEditor)
Copyright (C) 2004-2007 nakamuxu.
http://www.aynimac.com/
Copyright (C) 2004-2007 nakamuxu.
Copyright (C) 2014 CotEditor Project
http://coteditor.github.io
=================================================
encoding="UTF-8"
Expand Down Expand Up @@ -41,13 +42,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#import "CEHexColorTransformer.h"
#import "constants.h"

@interface CEAppController : NSObject
@interface CEAppController : NSObject <NSApplicationDelegate>
{
CEPreferences *_preferences;
NSMenu *_encodingMenu;
NSMenu *_syntaxMenu;
NSArray *_invalidYenEncodings;
NSString *_thousandsSeparator;

BOOL _didFinishLaunching;
}
Expand All @@ -63,15 +63,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- (void)setSyntaxMenu:(NSMenu *)inSyntaxMenu;
- (void)buildAllEncodingMenus;
- (void)buildAllSyntaxMenus;
- (NSString *)invisibleSpaceCharacter:(unsigned int)inIndex;
- (NSString *)invisibleTabCharacter:(unsigned int)inIndex;
- (NSString *)invisibleNewLineCharacter:(unsigned int)inIndex;
- (NSString *)invisibleFullwidthSpaceCharacter:(unsigned int)inIndex;
- (NSString *)invisibleSpaceCharacter:(NSUInteger)inIndex;
- (NSString *)invisibleTabCharacter:(NSUInteger)inIndex;
- (NSString *)invisibleNewLineCharacter:(NSUInteger)inIndex;
- (NSString *)invisibleFullwidthSpaceCharacter:(NSUInteger)inIndex;
- (NSStringEncoding)encodingFromName:(NSString *)inEncodingName;
- (BOOL)isInvalidYenEncoding:(NSStringEncoding)inEncoding;
- (NSString *)keyEquivalentAndModifierMask:(unsigned int *)ioModMask
- (NSString *)keyEquivalentAndModifierMask:(NSUInteger *)ioModMask
fromString:(NSString *)inString includingCommandKey:(BOOL)inBool;
- (NSString *)stringFromUnsignedInt:(unsigned int)inInt;

// Action Message
- (IBAction)openPrefWindow:(id)sender;
Expand All @@ -81,5 +80,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- (IBAction)newInDockMenu:(id)sender;
- (IBAction)openInDockMenu:(id)sender;
- (IBAction)openBundledDocument:(id)sender;
- (IBAction)openWebSite:(id)sender;

@end
Loading

0 comments on commit f7c559b

Please sign in to comment.