zoukankan      html  css  js  c++  java
  • 理解NSTypesetter 和 NSATSTypesetter

    先说通常意义上的typeset(排字、排版),然后再说NSTypesetter 和 NSATSTypesetter,最后是它们的区别。

    Typesetting is the composition of text by means of types.

    这里的type是什么意思呢?In typesetting by hand compositing, a sort or type is a piece of type representing a particular letter or symbol, cast from a matrix mould and assembled with other sorts bearing additional letters into lines of type to make up a forme from which a page is printed.

    在手工排版时,一个sort或者type是一块文字代表由矩阵模浇筑的一个字母或者符号,然后和其他sorts和额外的字母组装在一行行的type中,从而构成一个印板,用这个印板就可以打印一页出来。

    Diagram of a cast metal sort. a face, b body or shank, c point size, 1 shoulder, 2 nick, 3 groove, 4 foot.一个金属浇筑字模,a是face,

    Typesetting requires the prior process of designing a font and storing it in some manner. Typesetting is the retrieval of the stored letters (called sorts in mechanical systems and glyphs in digital systems) and the ordering of them according to a language's orthography for visual display.

    越往下看,觉得NSTypesetter的水挺深,有点犹豫要不要继续下去,走的有点远。要继承NSTypesetter,需要override 一共19个方法,要想能正确的实现这个子类,就必须对这19个方法应该干什么非常清楚。而且没有实例代码供研究,所以暂时先到此为止。

    NSATSTypesetter encapsulates the advanced typesetting capabilities of Core Text. NSATSTypesetter provides enhanced line and character spacing accuracy and supports more languages, including bidirectional languages, than the original, built-in typesetter class NSSimpleHorizontalTypesetter (which is deprecated in OS X version 10.4 and later).

    Reference

    1. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSATSTypesetter_Class/Reference/Reference.html

    2. http://en.wikipedia.org/wiki/Sort_(typesetting)

  • 相关阅读:
    编译原理
    C++的RTTI
    静态加载dll的问题
    COM编程中的接口查询QueryInterface的实现原理
    com学习笔记(2)基本的com接口QueryInterface的实现
    如何从DLL中生成LIB文件
    CMAP原理及其在MFC中的实现(MAP模板没有顺序遍历的功能)
    多态性vptrvtable
    技术网站
    垃圾事务
  • 原文地址:https://www.cnblogs.com/whyandinside/p/3495036.html
Copyright © 2011-2022 走看看