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

Import #35

Open
1 task
davelab6 opened this issue Jun 14, 2016 · 12 comments
Open
1 task

Import #35

davelab6 opened this issue Jun 14, 2016 · 12 comments

Comments

@davelab6
Copy link
Contributor

davelab6 commented Jun 14, 2016

  • The Number 4 feature is importing a binary-format font into the editor

Let's start with OTF only for now

@YashAgarwal
Copy link
Contributor

Both OTF and TTF are imported in Trufont using

extractor.extractUFO(file_path, self.main_font)

I'm can't figure out what should be given in the path variable
if I use file_path = "./<name>.ttf" it doesn't work

I tried this outside sugar and works just fine

@davelab6
Copy link
Contributor Author

What is the full path of the TTF?

@davelab6
Copy link
Contributor Author

file_path = "NotoSerif-Regular.ttf" might work

@YashAgarwal
Copy link
Contributor

@davelab6 the .ttf file is in the main activity folder together with the ufo files (which I can access with file_path = "<name>.ufo" using defcon)

@davelab6
Copy link
Contributor Author

What is the error?

https://github.com/sugarlabs/Flappy-Birds/blob/testing/scorescreen.py#L47 suggests it will work without ./

@YashAgarwal
Copy link
Contributor

YashAgarwal commented Jun 21, 2016

This is working now, but only if the file_name is hardcoded.
I don't know what FILTER_TYPE to use in the Objectchooser Dialog for loading a ttf/otf font file.

@davelab6
Copy link
Contributor Author

davelab6 commented Jul 6, 2016

@YashAgarwal what is the status of this?

@davelab6
Copy link
Contributor Author

davelab6 commented Jul 6, 2016

@eliheuer in the same way that kidpix isn't photoshop, I wonder that perhaps we should not enable import and only allow editing UFOs (potentially even UFOs with a flag to show they are compatible with Edit Fonts activity...)

@davelab6
Copy link
Contributor Author

Next action is to add a button to the welcome screen for 'import' that uses the Extractor python library to convert an OTF or TTF to a UFO

@davelab6
Copy link
Contributor Author

davelab6 commented Aug 2, 2016

Reopening to ensure we track answering the questions in #84 :)

@davelab6 davelab6 reopened this Aug 2, 2016
@YashAgarwal
Copy link
Contributor

YashAgarwal commented Aug 3, 2016

Here is the Import function in action!
image

I this I have to set the filter to Anything before selecting any file so can I set the filter to Anything or to a mime type for otf or ttf in the code itself
I don't think sugar has any .otf or .ttf mime type incorporate, but I'd be happy to be wrong on this

davelab6 pushed a commit that referenced this issue Aug 6, 2016
* removing the git submodules

* import otf, tf is now working

* creating welcome screen

* # This is a combination of 2 commits.
# The first commit's message is:

completing the welcome page UI

add user color to the icons
Fixes #32 
Fixes #35 
Fixes #62 
Fixes #82

add load, save, import, export buttons to the top bar

add buttons for welcome, manager, summary and editor pages (but note that on the welcome page these wont be active sometimes

Use a UFO of Geo with just 101 glyphs as the demo font Fixes #82

# The 2nd commit message will be skipped:

#	fixing some thing

* resolving conflicts
davelab6 pushed a commit that referenced this issue Aug 6, 2016
* removing the git submodules

* import otf, tf is now working

* creating welcome screen

* # This is a combination of 2 commits.
# The first commit's message is:

completing the welcome page UI

add user color to the icons
Fixes #32 
Fixes #35 
Fixes #62 
Fixes #82

add load, save, import, export buttons to the top bar

add buttons for welcome, manager, summary and editor pages (but note that on the welcome page these wont be active sometimes

Use a UFO of Geo with just 101 glyphs as the demo font Fixes #82

# The 2nd commit message will be skipped:

#	fixing some thing

* resolving conflicts
@davelab6 davelab6 assigned davelab6 and unassigned YashAgarwal Aug 6, 2016
@davelab6
Copy link
Contributor Author

davelab6 commented Aug 6, 2016

Reopening to confirm

@davelab6 davelab6 reopened this Aug 6, 2016
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

2 participants