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

CompositeFont.m setWidthsWithArray: replace break with continue #71

Open
ldenoue opened this issue Oct 21, 2013 · 3 comments
Open

CompositeFont.m setWidthsWithArray: replace break with continue #71

ldenoue opened this issue Oct 21, 2013 · 3 comments

Comments

@ldenoue
Copy link

ldenoue commented Oct 21, 2013

https://github.com/KurtCode/PDFKitten/blame/master/PDFKitten/CompositeFont.m#L46

should replace "break;" with "continue;" because some W arrays are formatted like this:
W[753[201]900[234]907 908 271 909[217 234 649]913 914 271 915[343 415]919 920 271 927 928 523 931 932 523 935 936 523 937 938 343 941 942 433 945 946 899 948[608]952[608]963 964 523 971[541 360]983[305 324]987[360]989[451]991 992 234 993[360]995 996 415 997 998 541 1000[271 343]1003[469 451]1005 1006 451 1007[645 554]1010[577 271]1012[271]1019[486]]

Laurent

@hugo53
Copy link

hugo53 commented Oct 30, 2013

@ldenoue Could you explain more? I encountered some mistakes relating to character 'w', ex. in appendString:(NSString*) inputString method in StringDetector.m, the inputString is 'Materialien dieser W' whereas it must be 'Materialien dieser Welt' or is 'elt. W' whereas it must be 'elt. Wir'. That means it is broken when the scanner meets 'w'. If you found this problem was solved by the above comment, please let me know! Thank you very much!

@ldenoue
Copy link
Author

ldenoue commented Oct 30, 2013

I noticed that with break; the loop stops parsing the remaining array of W.
If instead you put "continue;" then it keeps parsing the rest of the array.
Laurent.

@hugo53
Copy link

hugo53 commented Nov 4, 2013

@ldenoue Thanks for your quick responding. I will test this case more!

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

2 participants