Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2231)

Issue 2946041: PDF: Add text support with a font framework (font embedding to come). (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by Steve VanDeBogart
Modified:
14 years ago
Reviewers:
agl
CC:
skia-review_googlegroups.com, James Hawkins, reed
Base URL:
http://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

PDF: Add text support with a font framework (font embedding to come). Supports fakeBold, underline, strikethrough, mode (fill, stroke, both), size, skew, alignment (left, center, right). Missing is drawFontOnPath and font lookup and embedding. Changed SkPDFString to support how it is used from drawText methods. Moved compile assert into SkTypes. Moved constants and utility function used to support fakeBold, underline, and strikethrough into higher level locations. Committed: http://code.google.com/p/skia/source/detail?r=624

Patch Set 1 #

Patch Set 2 : nit #

Patch Set 3 : missed minor cleanup #

Patch Set 4 : Rename COMPILE_ASSERT to not conflict. #

Total comments: 7

Patch Set 5 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+718 lines, -124 lines) Patch
M include/core/SkPaint.h View 1 chunk +2 lines, -1 line 0 comments Download
M include/core/SkScalar.h View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M include/core/SkTypes.h View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M include/pdf/SkPDFDevice.h View 5 chunks +8 lines, -1 line 0 comments Download
A include/pdf/SkPDFFont.h View 1 chunk +92 lines, -0 lines 0 comments Download
M include/pdf/SkPDFTypes.h View 3 chunks +14 lines, -1 line 0 comments Download
A include/utils/SkTextFormatParams.h View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
M src/core/Makefile.am View 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkDraw.cpp View 2 chunks +1 line, -4 lines 0 comments Download
M src/core/SkPaint.cpp View 1 2 3 chunks +6 lines, -44 lines 0 comments Download
src/core/SkScalar.cpp View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
src/core/core_files.mk View 1 chunk +1 line, -0 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 4 16 chunks +230 lines, -24 lines 0 comments Download
A src/pdf/SkPDFFont.cpp View 1 chunk +199 lines, -0 lines 0 comments Download
M src/pdf/SkPDFGraphicState.cpp View 3 chunks +1 line, -25 lines 0 comments Download
M src/pdf/SkPDFTypes.cpp View 3 chunks +46 lines, -11 lines 0 comments Download
M src/pdf/pdf_files.mk View 1 chunk +1 line, -0 lines 0 comments Download
M src/ports/SkThread_win.cpp View 1 2 3 2 chunks +2 lines, -13 lines 0 comments Download

Messages

Total messages: 4
Steve VanDeBogart
14 years ago (2010-11-05 22:55:46 UTC) #1
Steve VanDeBogart
Did you miss this?
14 years ago (2010-11-09 18:24:01 UTC) #2
agl
I managed to star this one, but I starred so many other ones that it ...
14 years ago (2010-11-09 19:45:19 UTC) #3
Steve VanDeBogart
14 years ago (2010-11-11 00:57:15 UTC) #4
Thanks for the review!

http://codereview.appspot.com/2946041/diff/10001/include/utils/SkTextFormatPa...
File include/utils/SkTextFormatParams.h (right):

http://codereview.appspot.com/2946041/diff/10001/include/utils/SkTextFormatPa...
include/utils/SkTextFormatParams.h:23: #define kStdStrikeThru_Offset      
(-SK_Scalar1 * 6 / 21)
On 2010/11/09 19:45:19, agl wrote:
> I think these magic numbers need some more explanation.

I only moved these values.  However, I added comments describing how they are
used.  I have no ideas how they where derived.

http://codereview.appspot.com/2946041/diff/10001/src/core/SkScalar.cpp
File src/core/SkScalar.cpp (right):

http://codereview.appspot.com/2946041/diff/10001/src/core/SkScalar.cpp#newcode40
src/core/SkScalar.cpp:40: SkASSERT(rightKey != leftKey);
On 2010/11/09 19:45:19, agl wrote:
> if (rightKey == leftKey)
>   return values[right-1];

Looking at this more closely: The while loop currently ensures that this assert
is always true. Removed.

http://codereview.appspot.com/2946041/diff/10001/src/pdf/SkPDFDevice.cpp
File src/pdf/SkPDFDevice.cpp (right):

http://codereview.appspot.com/2946041/diff/10001/src/pdf/SkPDFDevice.cpp#newc...
src/pdf/SkPDFDevice.cpp:449: const char* procs[] = {"PDF", "Text", "ImageB",
"ImageC", "ImageI"};
On 2010/11/09 19:45:19, agl wrote:
> const char procs[][7] (saves the relocation records)

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b