Permalink
Browse files

Finished porting.

  • Loading branch information...
1 parent 57e8cac commit 4d4edb6f7f92065e15fc6a8511a58fa903a3b6dd 安志钢 committed Jan 6, 2017
Showing with 38,900 additions and 0 deletions.
  1. +630 −0 MacOSMath.xcodeproj/project.pbxproj
  2. +7 −0 MacOSMath.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  3. BIN MacOSMath.xcodeproj/project.xcworkspace/xcuserdata/AnZhg.xcuserdatad/UserInterfaceState.xcuserstate
  4. +96 −0 MacOSMath.xcodeproj/xcuserdata/AnZhg.xcuserdatad/xcschemes/MacOSMath.xcscheme
  5. +27 −0 MacOSMath.xcodeproj/xcuserdata/AnZhg.xcuserdatad/xcschemes/xcschememanagement.plist
  6. BIN MacOSMath/.DS_Store
  7. +21 −0 MacOSMath/AZGAppDelegate.h
  8. +31 −0 MacOSMath/AZGAppDelegate.m
  9. +34 −0 MacOSMath/MacOSMath-Info.plist
  10. +7 −0 MacOSMath/MacOSMath-Prefix.pch
  11. BIN MacOSMath/Rendering Engine/.DS_Store
  12. +11 −0 MacOSMath/Rendering Engine/MacOSMath.h
  13. BIN MacOSMath/Rendering Engine/font/.DS_Store
  14. +30 −0 MacOSMath/Rendering Engine/font/GUST-FONT-LICENSE.txt
  15. +103 −0 MacOSMath/Rendering Engine/font/OFL.txt
  16. +92 −0 MacOSMath/Rendering Engine/font/README-Latin-Modern-Math.txt
  17. +91 −0 MacOSMath/Rendering Engine/font/README-TeX-Gyre-Termes-Math.txt
  18. BIN MacOSMath/Rendering Engine/font/latinmodern-math.otf
  19. +10,157 −0 MacOSMath/Rendering Engine/font/latinmodern-math.plist
  20. +203 −0 MacOSMath/Rendering Engine/font/math_table_to_plist.py
  21. BIN MacOSMath/Rendering Engine/font/texgyretermes-math.otf
  22. +9,107 −0 MacOSMath/Rendering Engine/font/texgyretermes-math.plist
  23. BIN MacOSMath/Rendering Engine/font/xits-math.otf
  24. +6,631 −0 MacOSMath/Rendering Engine/font/xits-math.plist
  25. BIN MacOSMath/Rendering Engine/lib/.DS_Store
  26. +141 −0 MacOSMath/Rendering Engine/lib/MTMathAtomFactory.h
  27. +839 −0 MacOSMath/Rendering Engine/lib/MTMathAtomFactory.m
  28. +429 −0 MacOSMath/Rendering Engine/lib/MTMathList.h
  29. +950 −0 MacOSMath/Rendering Engine/lib/MTMathList.m
  30. +87 −0 MacOSMath/Rendering Engine/lib/MTMathListBuilder.h
  31. +774 −0 MacOSMath/Rendering Engine/lib/MTMathListBuilder.m
  32. +132 −0 MacOSMath/Rendering Engine/lib/MTMathListIndex.h
  33. +273 −0 MacOSMath/Rendering Engine/lib/MTMathListIndex.m
  34. +29 −0 MacOSMath/Rendering Engine/lib/MTUnicode.h
  35. +32 −0 MacOSMath/Rendering Engine/lib/MTUnicode.m
  36. BIN MacOSMath/Rendering Engine/render/.DS_Store
  37. +34 −0 MacOSMath/Rendering Engine/render/MTFont.h
  38. +114 −0 MacOSMath/Rendering Engine/render/MTFont.m
  39. +175 −0 MacOSMath/Rendering Engine/render/MTMathListDisplay.h
  40. +840 −0 MacOSMath/Rendering Engine/render/MTMathListDisplay.m
  41. +104 −0 MacOSMath/Rendering Engine/render/MTMathUILabel.h
  42. +311 −0 MacOSMath/Rendering Engine/render/MTMathUILabel.m
  43. BIN MacOSMath/Rendering Engine/render/internal/.DS_Store
  44. +34 −0 MacOSMath/Rendering Engine/render/internal/MTFont+Internal.h
  45. +168 −0 MacOSMath/Rendering Engine/render/internal/MTFontMathTable.h
  46. +539 −0 MacOSMath/Rendering Engine/render/internal/MTFontMathTable.m
  47. +113 −0 MacOSMath/Rendering Engine/render/internal/MTMathListDisplayInternal.h
  48. +22 −0 MacOSMath/Rendering Engine/render/internal/MTTypesetter.h
  49. +1,577 −0 MacOSMath/Rendering Engine/render/internal/MTTypesetter.m
  50. +29 −0 MacOSMath/en.lproj/Credits.rtf
  51. +2 −0 MacOSMath/en.lproj/InfoPlist.strings
  52. +3,619 −0 MacOSMath/en.lproj/MainMenu.xib
  53. +14 −0 MacOSMath/main.m
  54. +22 −0 MacOSMathTests/MacOSMathTests-Info.plist
  55. +13 −0 MacOSMathTests/MacOSMathTests.h
  56. +32 −0 MacOSMathTests/MacOSMathTests.m
  57. +2 −0 MacOSMathTests/en.lproj/InfoPlist.strings
  58. +172 −0 README.md
  59. BIN img/.DS_Store
  60. BIN img/MacOSMath.png
Oops, something went wrong.
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:MacOSMath.xcodeproj">
+ </FileRef>
+</Workspace>
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0460"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26E343691E1F6F1600D63A80"
+ BuildableName = "MacOSMath.app"
+ BlueprintName = "MacOSMath"
+ ReferencedContainer = "container:MacOSMath.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26E343891E1F6F1700D63A80"
+ BuildableName = "MacOSMathTests.octest"
+ BlueprintName = "MacOSMathTests"
+ ReferencedContainer = "container:MacOSMath.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26E343691E1F6F1600D63A80"
+ BuildableName = "MacOSMath.app"
+ BlueprintName = "MacOSMath"
+ ReferencedContainer = "container:MacOSMath.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26E343691E1F6F1600D63A80"
+ BuildableName = "MacOSMath.app"
+ BlueprintName = "MacOSMath"
+ ReferencedContainer = "container:MacOSMath.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26E343691E1F6F1600D63A80"
+ BuildableName = "MacOSMath.app"
+ BlueprintName = "MacOSMath"
+ ReferencedContainer = "container:MacOSMath.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>MacOSMath.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>26E343691E1F6F1600D63A80</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>26E343891E1F6F1700D63A80</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
Binary file not shown.
@@ -0,0 +1,21 @@
+//
+// AZGAppDelegate.h
+// MacOSMath
+//
+// Created by 安志钢 on 17-01-06.
+// Copyright (c) 2017年 安志钢. All rights reserved.
+//
+// This software may be modified and distributed under the terms of the
+// MIT license. See the LICENSE file for details.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "MacOSMath.h"
+
+@interface AZGAppDelegate : NSObject <NSApplicationDelegate>
+
+@property (assign) IBOutlet NSWindow *window;
+@property (assign) IBOutlet MTMathUILabel *mathLabel;
+@property (assign) IBOutlet NSTextField *input;
+
+@end
@@ -0,0 +1,31 @@
+//
+// AZGAppDelegate.m
+// MacOSMath
+//
+// Created by 安志钢 on 17-01-06.
+// Copyright (c) 2017年 安志钢. All rights reserved.
+//
+// This software may be modified and distributed under the terms of the
+// MIT license. See the LICENSE file for details.
+//
+
+#import "AZGAppDelegate.h"
+
+@implementation AZGAppDelegate
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ // Insert code here to initialize your application
+}
+
+- (IBAction)clickUpdate:(NSButton *)sender
+{
+ self.mathLabel.latex = self.input.stringValue;
+}
+
+@end
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>AnZhg.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2017年 安志钢. All rights reserved.</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'MacOSMath' target in the 'MacOSMath' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
Binary file not shown.
@@ -0,0 +1,11 @@
+//
+// MacMath.h
+// MacMath
+//
+// This software may be modified and distributed under the terms of the
+// MIT license. See the LICENSE file for details.
+
+#import "MTMathUILabel.h"
+#import "MTMathListDisplay.h"
+#import "MTMathList.h"
+#import "MTMathListBuilder.h"
Binary file not shown.
@@ -0,0 +1,30 @@
+% This is a preliminary version (2006-09-30), barring acceptance from
+% the LaTeX Project Team and other feedback, of the GUST Font License.
+% (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
+%
+% For the most recent version of this license see
+% http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
+% or
+% http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
+%
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version.
+%
+% Please also observe the following clause:
+% 1) it is requested, but not legally required, that derived works be
+% distributed only after changing the names of the fonts comprising this
+% work and given in an accompanying "manifest", and that the
+% files comprising the Work, as listed in the manifest, also be given
+% new names. Any exceptions to this request are also given in the
+% manifest.
+%
+% We recommend the manifest be given in a separate file named
+% MANIFEST-<fontid>.txt, where <fontid> is some unique identification
+% of the font family. If a separate "readme" file accompanies the Work,
+% we recommend a name of the form README-<fontid>.txt.
+%
+% The latest version of the LaTeX Project Public License is in
+% http://www.latex-project.org/lppl.txt and version 1.3c or later
+% is part of all distributions of LaTeX version 2006/05/20 or later.
+
@@ -0,0 +1,103 @@
+STIX Font License
+
+24 May 2010
+
+Copyright (c) 2001-2010 by the STI Pub Companies, consisting of the American
+Institute of Physics, the American Chemical Society, the American Mathematical
+Society, the American Physical Society, Elsevier, Inc., and The Institute of
+Electrical and Electronic Engineers, Inc. (www.stixfonts.org), with Reserved
+Font Name STIX Fonts, STIX Fonts (TM) is a trademark of The Institute of
+Electrical and Electronics Engineers, Inc.
+
+Portions copyright (c) 1998-2003 by MicroPress, Inc. (www.micropress-inc.com),
+with Reserved Font Name TM Math. To obtain additional mathematical fonts, please
+contact MicroPress, Inc., 68-30 Harrow Street, Forest Hills, NY 11375, USA,
+Phone: (718) 575-1816.
+
+Portions copyright (c) 1990 by Elsevier, Inc.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+---------------------------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+---------------------------------------------------------------------------
+
+PREAMBLE
+
+The goals of the Open Font License (OFL) are to stimulate worldwide development
+of collaborative font projects, to support the font creation efforts of academic
+and linguistic communities, and to provide a free and open framework in which
+fonts may be shared and improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and redistributed
+freely as long as they are not sold by themselves. The fonts, including any
+derivative works, can be bundled, embedded, redistributed and/or sold with any
+software provided that any reserved names are not used by derivative works. The
+fonts and derivatives, however, cannot be released under any other type of license.
+The requirement for fonts to remain under this license does not apply to any
+document created using the fonts or their derivatives.
+
+DEFINITIONS
+
+"Font Software" refers to the set of files released by the Copyright Holder(s) under
+this license and clearly marked as such. This may include source files, build
+scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the copyright
+statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting, or
+substituting -- in part or in whole -- any of the components of the Original Version,
+by changing formats or by porting the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical writer or other
+person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of the
+Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell
+modified and unmodified copies of the Font Software, subject to the following
+conditions:
+
+1) Neither the Font Software nor any of its individual components, in Original or
+Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled, redistributed
+and/or sold with any software, provided that each copy contains the above copyright
+notice and this license. These can be included either as stand-alone text files,
+human-readable headers or in the appropriate machine-readable metadata fields within
+text or binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless
+explicit written permission is granted by the corresponding Copyright Holder. This
+restriction only applies to the primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall
+not be used to promote, endorse or advertise any Modified Version, except to
+acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with
+their explicit written permission.
+
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed
+entirely under this license, and must not be distributed under any other license. The
+requirement for fonts to remain under this license does not apply to any document
+created using the Font Software.
+
+TERMINATION
+
+This license becomes null and void if any of the above conditions are not met.
+
+DISCLAIMER
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
+RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Oops, something went wrong.

0 comments on commit 4d4edb6

Please sign in to comment.