Skip to content

Conversation

ctrlcctrlv
Copy link
Member

Even with the low compression setting to keep speed the same as writing uncompressed bitmaps (on my system), this saves 60% over the previous method.

Unfortunately this doesn't really fix the speed problem, but it does make my SFD file size much more manageable for putting on GitHub et cetera.

This was a lot of work. I also added a new setting, WritePNGInSFD, so this version of FontForge can generate SFD 3.1 files. It's not quite #3800, but it should be enough for a merge before the next release.

@frank-trampe
Copy link
Contributor

The general arrangement seems fine to me. I'll review the code a little closer Saturday if nobody else gets to it first.

@ctrlcctrlv
Copy link
Member Author

I think this is OK to merge now. Here's what I did:

  • Cherry-picked the two commits from jtanx/fontforge images ; it builds on OS X fine now
  • Stopped offering WritePNGInSFD as an option to those stubborn users compiling with --without-cairo --without-libpng
  • Moved the MIME type reading into its own function as requested by @skef

@ctrlcctrlv ctrlcctrlv requested a review from skef July 20, 2019 09:12
* Add UNKNOWN to enum
* ImageX -> Image2
* Only bump to 3.0 on !UndoRedoLimitToSave if already 3.1
@skef
Copy link
Contributor

skef commented Jul 20, 2019

@ctrlcctrlv This is probably there or very close by now but I want to look at it with fresh eyes tomorrow to be more confident. I promise I'll be prompt.

jtanx
jtanx previously requested changes Jul 20, 2019
Copy link
Contributor

@jtanx jtanx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This started as just a review, but it turned out easier to just test it out myself.

I've made relevant changes here: jtanx@6528b87

@ctrlcctrlv on those exit statements, yeah not a fan of those ones either. But those ones are slightly more justified; they are error conditions on an internal inconsistency, whereas in some cases, this image2 code is just exiting because it hasn't been compiled with the support in.

My commit changes that to just skip loading the image, which I think is nicer behaviour.

At the very least, that EndImageX needs addressing.

@ctrlcctrlv
Copy link
Member Author

✔️ ❓

Turns out it's not rusty at all but rather OG

Thanks @jtanx
@ctrlcctrlv ctrlcctrlv requested a review from jtanx July 20, 2019 12:24
Copy link
Contributor

@jtanx jtanx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, but I'll leave it to someone else to give final approval, since I wrote the png buffer loading/saving code

@jtanx jtanx dismissed their stale review July 20, 2019 12:28

as commented

@ctrlcctrlv ctrlcctrlv requested a review from skef July 20, 2019 12:30
@frank-trampe
Copy link
Contributor

It didn't seem like I slept that long...

@frank-trampe
Copy link
Contributor

I'm okay with all this.

Copy link
Contributor

@skef skef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@ctrlcctrlv ctrlcctrlv merged commit d1b6c46 into fontforge:master Jul 21, 2019
Omnikron13 pushed a commit to Omnikron13/fontforge that referenced this pull request May 31, 2022
Assuming libpng is in use, a `WritePNGInSFD` exists so users can disable this new feature.
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

Successfully merging this pull request may close these issues.

5 participants