Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFF #75

Closed
prepare opened this issue Nov 5, 2017 · 16 comments
Closed

CFF #75

prepare opened this issue Nov 5, 2017 · 16 comments

Comments

@prepare
Copy link
Member

prepare commented Nov 5, 2017

@prepare prepare changed the title CCF CFF Jan 28, 2018
@prepare
Copy link
Member Author

prepare commented Apr 6, 2018

@prepare
Copy link
Member Author

prepare commented Apr 12, 2018

Early Preview (YES, with ERRORs) on CFF glyph!

sample font =>https://github.com/verybadcat/CSharpMath/blob/master/CSharpMath.Ios/Resources/latinmodern-math.otf

latin_0

pic 1: glyph 0, Latin Modern Math Regular.otf

Typography's preview of CFF1 glyph rendering.

Just a progression :)

At this stage => I skip all stem instructions.


Reference image,

latin_ref

pic 2: Latin Modern Math Regular.otf from NotePad on Win7

@Happypig375
Copy link
Contributor

Looking great! I hope that this will continue to be worked on so that I can depend CSharpMath on this.

You have my spiritual support 😉

@prepare
Copy link
Member Author

prepare commented Apr 12, 2018

More ...

latin_1
latin_2
latin_3
latin_4
latin_5
latin_6
latin_7
latin_8
latin_9

pic 3: imagine the 'cut-off' parts :), I will scale it down

@prepare
Copy link
Member Author

prepare commented Apr 12, 2018

latin_0_a
latin_1_a

latin_2_a

latin_3_a

latin_4_a

latin_5_a

latin_6_a

latin_7_a

latin_8_a

latin_9_a

pic 4: latin-modern-math-regular.otf, cff font

@prepare
Copy link
Member Author

prepare commented Apr 22, 2018

Hello World!

latin_h
latin_e

latin_l
latin_l
latin_o








latin_w
latin_o
latin_r
latin_l
latin_d
latin_exclaimation


pic 5: hello world!, latin-modern-math-regular.otf, cff font

@prepare
Copy link
Member Author

prepare commented Apr 24, 2018

Scale it :)

latin_long

pic 6, latin-modern-math-regular.otf, 18 pts

see : e67ae56

@prepare
Copy link
Member Author

prepare commented Apr 24, 2018

In this version, the results are not hinted by CFF instructions, so they are not pixel-perfect.

latin_long_compare

pic 7: from pic 6(above), compare with Win7's NotePad, latin-modern-math-regular.otf, 18 pts

@prepare
Copy link
Member Author

prepare commented Apr 25, 2018

Render from GlyphName

cff_iota

pic 8: render from selected GlyphName 'iota.sts'

I provide a GlyphNameListUserControl (1) and
demonstrate how to render from glyphName here
see: => fdc1b81


cff_theta

pic 9: render from selected GlyphName 'Theta.sts'

@prepare
Copy link
Member Author

prepare commented Apr 25, 2018

If you want to render those symbols (eg. for a math equation).

Just find a symbol name and render it.


I demonstrate how to render from glyphName here =>

ushort selectedGlyphIndex =

@prepare
Copy link
Member Author

prepare commented Apr 25, 2018

Asana Math's Cff font

from https://ctan.org/tex-archive/fonts/Asana-Math/

asana_math1

asana_epsilon

pic 10: Asana-math-regular.otf

@prepare
Copy link
Member Author

prepare commented Apr 25, 2018

XITS's font

otf font (cff1) from https://github.com/khaledhosny/xits

xits_regular_2

pic 11: XITS otf font

@prepare
Copy link
Member Author

prepare commented May 16, 2018

@EliotJones (https://github.com/UglyToad/PdfPig)

Even your goal is to port code from
PdfBox and FontBox to your PdfPig.

But I invite you to visit here.
if you need some info about font manipulation. (both ttf, otf, cff ).

this lib may help your speed too.

:)

@EliotJones
Copy link

@prepare thank you, I've not had any time to work on PdfPig recently unfortunately due to time constraints but I'll be sure to consult this code when I get back round to it.

Out of interest, since GitHub search is not great, where do you handle parsing of the CharStrings and Private dictionary in CFF files?

@prepare
Copy link
Member Author

prepare commented Jun 14, 2018

  1. Read CFF structures ( and handle Dictionaries) => https://github.com/LayoutFarm/Typography/blob/dev/Typography.OpenFont/Tables.CFF/CFF.cs

  2. Type2CharString parser =>
    https://github.com/LayoutFarm/Typography/blob/dev/Typography.OpenFont/Tables.CFF/Type2CharStringParser.cs#L365

  3. Cff Evaluation Engine =>https://github.com/LayoutFarm/Typography/blob/dev/Typography.OpenFont/Tables.CFF/CffEvaluationEngine.cs

prepare referenced this issue in MatterHackers/agg-sharp Jul 7, 2018
Started work on a tree view.
@prepare
Copy link
Member Author

prepare commented May 29, 2020

CFF with CID features=> #201

@prepare prepare closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants