Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Dec 30, 2012
  1. fixed wrong !

    authored
  2. Merge branch 'master' of github.com:Cocoanetics/DTCoreText

    authored
    Conflicts:
    	Core/Source/NSString+CSS.h
  3. Added capability to preserve the parse tree for debugging

    authored
    - default is off. This means that if an element has been output then all of its child nodes are discarded.
    - if you set it to on then you can output _rootNode after the parsing is done
  4. add space after list

    authored
Commits on Dec 29, 2012
  1. Fixed bug in DTLinkButton

    authored
    - if the link text was made up of more than one glyph run (e.g. chinese text) then only the first glyph run would be drawn
  2. Major Parsing Rework

    authored
     - The string assembly is more tag based now
     - Before this there where several states that needed to be kept track of
     - Now the assembly of suitable attributed strings are delegated to a variety of specialized sub-classes of DTHTMLElement
  3. Fixed handling of pt

    authored
    Previously px and pt where treated as 1:1, but looking at the Mac apparently the factor is 1 pt = 1.3333 px
Commits on Dec 25, 2012
  1. fixed MacUnitTest

    authored
Commits on Dec 23, 2012
  1. Fixed #218

    authored
    A list bullet would get the text color and font of the following text. This would cause the list bullet to have the color of a hyperlink or also be bold.
  2. Added deduplication of styles in DTHTMLWriter

    authored
    Now styles are collected by tag in a lookup array. Then the actual tag gets a sequential key that consists of the first letter of the tag name and an index beginning with 1.
    The same structure and meta information is included as NSHTMLWriter does.
    
    	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html40/strict.dtd">
    	<html>
    	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<meta http-equiv="Content-Style-Type" content="text/css">
    	<meta name="Generator" content="DTCoreText HTML Writer">
    	<style type="text/css">
    	p.p1 {margin-bottom:12px;}
    	p.p2 {margin-bottom:12px;font-family:'Courier';font-size:12px;}
    	span.s1 {font-family:'Helvetica';font-size:12px;color:#ff0000;}
    	span.s2 {font-family:'Helvetica';font-size:12px;font-weight:bold;}
    	span.s3 {font-family:'Helvetica';font-size:12px;font-style:italic;}
    	span.s4 {font-family:'Courier';font-size:12px;color:#008000;}
    	</style>
    	</head>
    	<body>
    	<p class="p1"><span class="s1">Hello</span><span class="s2"> bold</span><span class="s3"> italic</span><span class="s4"> World!</span></p>
    	<p class="p1"><span class="s1">Hello</span><span class="s2"> bold</span><span class="s3"> italic</span><span class="s4"> World!</span></p>
    	<p class="p1"><span class="s1">Hello</span><span class="s2"> bold</span><span class="s3"> italic</span><span class="s4"> World!</span></p>
    	<p class="p2"></p>
    	</body>
  3. Removed log

    authored
  4. modified pixelSizeOfCSSMeasureRelativeToCurrentTextSize

    authored
    to consistently use the textScale if it is set
  5. Moved HTML generation into DTHTMLWriter

    authored
    Added textScale property to reduce absolute px sizes if you generated the attributed string with a text size multiplicator. If set then this will divide all absolute font-size and line-height by this amount.
  6. Added missing scaling of absolute font-size and line-height

    authored
    If you use the text scaling facility then relative sizes (e.g. em) are fine, but a px size would not get scaled.
Commits on Dec 22, 2012
  1. improved CSS scanning

    authored
    - now both single and double quotes are recognized
    - attribute values that are not quoted are now concatenated until a semicolon is encountered or the end of the string is reached
    - previously 'font name' would not remove the quotes
    - also an attribute with trailing whitespace would need to be trimmed
    
    Closes #252
    
    Note: I would like to replaces all the NSScanner stuff for CSS syntax with a proper parser. Anybody interested in helping there?
  2. Updated DTFoundation

    authored
Something went wrong with that request. Please try again.