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

Simple Web App UI #1121

Closed
davelab6 opened this issue Oct 13, 2016 · 2 comments
Closed

Simple Web App UI #1121

davelab6 opened this issue Oct 13, 2016 · 2 comments
Assignees

Comments

@davelab6
Copy link
Contributor

davelab6 commented Oct 13, 2016

Expected behaviour

Many font designers feel uncomfortable using a command line, and expect a drag and drop web app, similar to https://github.com/graphicore/nametableswapper

Observed behaviour

Font Bakery has a command line interface.

How to replicate

Using nametableswapper as a model, make an appengine web app UI for fontbakery, such that:

  1. a user visits the page and drops the files to check
  2. user hits the 'go' button
  3. fonts are uploaded to the server, and fb is run on them
  4. the output is shown to the user

The first 3 items seem very close to what Lasse has done already; for 4, to start, just printing the MarkDown output as HTML will be sufficient.

@davelab6 davelab6 added this to the 0.2.0 milestone Oct 13, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 14, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 17, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 17, 2016
the command line arguments parsing so that we can also invoke it as an imported python module.

(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 17, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 17, 2016
fontbakery_check_ttf as a python module. It will soon be used also to validate passing font files as in-memory ByteIO objects instead of filepaths.
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 17, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 19, 2016
lots of capabilities are restricted on google app engine though, so I had to disable them when running as a webapp.
(issue fonttools#1121)
@davelab6
Copy link
Contributor Author

Felipe wrote me,

Initially I have put aside for a while the in-memory handling of TTFs
and tried to hookup fontbakery to the webapp via bad temp files to get
an initial working prototype. But then I figured that filesystem
operations are not only discouraged (as I had already hinted at) but
actually forbidden on Google App Engine for security (and maybe also
performance) reasons.

So I did all the tweaks necessary to optionally pass
TTFont(BytesIO(stream)) objects to the check_ttf function.

Great!

Then I found a few other restrictions imposed by GAppEngine. For
instance, subprocess.Popen can't be used, so this makes all auxiliary
tools unavailable on the webapp such as ttfautohint, ftxvalidator and
other tools that we typically invoke as a subprocess. For now I simply
skip these when I detect we're running in webapp mode,

Sounds good

but I really wish there's some workaround to this restriction.

That's fine, I think: lets plan to set up a container based version of the web app with everything (except ftxval which is os x only)

Another issue with the GAppEngine environment is that it does not
support ctypes so I also had to disable the check that relies on the
libmagic module (which depends on ctypes).

Cool - that's not a very important check :)

@graphicore
Copy link
Collaborator

What's with the "App Engine Flexible Environment" https://cloud.google.com/appengine/docs/flexible/ It seems to me it can do all those thing, as they say you can somehow supply your own docker image.

felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 21, 2016
triggers a server-side fontbakery-check-ttf run and displays the markdown report.
It surely still needs to have the UI polished tough.
(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
the command line arguments parsing so that we can also invoke it as an imported python module.

(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
fontbakery_check_ttf as a python module. It will soon be used also to validate passing font files as in-memory ByteIO objects instead of filepaths.
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
lots of capabilities are restricted on google app engine though, so I had to disable them when running as a webapp.
(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
triggers a server-side fontbakery-check-ttf run and displays the markdown report.
It surely still needs to have the UI polished tough.
(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 25, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 26, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 26, 2016
animation attributes.
To be used as "loading spinner" in the webapp UI.
(issues fonttools#1131 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 26, 2016
This  is fixed by reseting the check results logger object after outputing each individual report, so that it avoinds accumulating the previous messages.
(issues fonttools#1133 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
animation attributes.
To be used as "loading spinner" in the webapp UI.
(issues fonttools#1131 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
This  is fixed by reseting the check results logger object after outputing each individual report, so that it avoinds accumulating the previous messages.
(issues fonttools#1133 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
the command line arguments parsing so that we can also invoke it as an imported python module.

(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
fontbakery_check_ttf as a python module. It will soon be used also to validate passing font files as in-memory ByteIO objects instead of filepaths.
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
lots of capabilities are restricted on google app engine though, so I had to disable them when running as a webapp.
(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
triggers a server-side fontbakery-check-ttf run and displays the markdown report.
It surely still needs to have the UI polished tough.
(issue fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
animation attributes.
To be used as "loading spinner" in the webapp UI.
(issues fonttools#1131 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
This  is fixed by reseting the check results logger object after outputing each individual report, so that it avoinds accumulating the previous messages.
(issues fonttools#1133 & fonttools#1121)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 27, 2016
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Oct 28, 2016
(We may design a new UI for the webapp later.

 Step fonttools#2 was initially meant to be for the user
 to choose whether or not to get hotfixing, but
 I think that we can always provide hotfixed
 files via blob-links.

 The user can choose whether or not to save
 them simply by clicking the links.)

This seems enough for us to merge the webapp
 into master and then work on gradual
 improvements here and there...

(closes issue fonttools#1121)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants