Text preview of complex scripts


#21

the Microsoft_Intermediate_Certificates messages have nothing to do with Glyphs.


#22

OK, this is the real problem. I wonder why…

Please open up the Lua Console window from the “Window” menu, type require("GlyphSILE") and hit Compile, and tell me if you get an error.


#23

I’ve posted a new version of the plugin, which I think addresses the problem. If not, try the debugging step above.


#24

error while running string require(“GlyphSILE”): …/GlyphSILE.glyphsPlugin/Contents/Resources/core/sile.lua:14: module ‘lfs’ not found:
no field package.preload[‘lfs’]
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lfs.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lua-libraries/lfs.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lua-libraries/lfs/init.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lfs.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lua-libraries/lfs.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/lua-libraries/lfs/init.lua’
no file ‘/usr/local/share/lua/5.2/lfs.lua’
no file ‘/usr/local/share/lua/5.2/lfs/init.lua’
no file ‘/usr/local/lib/lua/5.2/lfs.lua’
no file ‘/usr/local/lib/lua/5.2/lfs/init.lua’
no file ‘./lfs.lua’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/shared-libraries/lfs.so’
no file ‘/Users/sarathykr/Library/Application Support/Glyphs/Repositories/GlyphSILE/GlyphSILE.glyphsPlugin/Contents/Resources/shared-libraries/lfs.so’
no file ‘/usr/local/lib/lua/5.2/lfs.so’
no file ‘/usr/local/lib/lua/5.2/loadall.so’
no file ‘./lfs.so’


#25

OK, thanks for being willing to try. I’ve had another go - uninstall and reinstall again and see what you get this time. (The reason I can’t do it myself is because I don’t have a spare Mac without all the required libraries installed already, so naturally everything works here for me and I can’t test it elsewhere.)


#26

You could quite easily set up a virtual machine. I use VMWare but Virtual Box or Parallels work quite, too.


#27

Of course! Yes, I have got that working now and it seems like the latest version of the plugin works fine.


#28

:+1::ok_hand:

Sile Preview is working like a charm now.

One feature request:

Is it possible to add ability to chose the shaping engine?

at least Harfbuzz and CoreText in mac

Please check this project


#29

CMIIW but I guess SILE is interwoven with Harfbuzz from the ground up that this would be quite a big change. For CoreText testing, your current best choice is TextPreview.

But I also have a feature request: autocomplete or help for finding the right command (and syntax). E.g. suggestions in a popup as soon as you type a backslash, much like autocomplete for glyph names in Glyphs.


#30

SILE can support multiple shaping engines but I have not written a CoreText backend yet.

However, Harfbuzz does support calling out to CoreText, and SILE does support passing shaping options to Harfbuzz. However, the version of Harfbuzz that ships with GlyphSILE does not link with CoreText. I should sort that out, and expose it as an option in the interface. :slight_smile:

I have lots of day job stuff to work on this week but should get to it next week.

This sounds like a great idea but I don’t know how to implement it. :confused:


#31

When we can test the font and feature, with the realworld text (Unicode), why would we need to test the glyphname (\) in SILE preview?
We can already do that inside Glyphs.

This feature inside Glyphs’s for Text(T) would be great.

Text preview app requires, the font generation and installation to preview. We can do the same in pages for CoreText, LibreOffice for Harfbuzz, MS Office (Mac version) for DirectWrite.

SILE Preview, allows the user to test the complex font without outputing the font. This is fantastic.


#32

Currently, we can save the Sile preview text and reopen it. This is great.

In my personal view, what would we even powerful feature is ability to set "Working directory and load all Sile preview files in that directory automatically. This would enable font developers keep multiple text/test files with usual suspects to preview before generating the font.
Also add left side window to select different sile files.

image


#33

@SimonC https://stackoverflow.com/questions/7304183/completion-in-nstextview

The TextPreview app has several advantage over the standard apps. It is immune to font cache problems and it reloads the fonts automatically. The fonts dont need to be installed in the system.


#34

I’ve just pushed a new update which allows for selecting the shaper between CoreText and Harfbuzz.


#35

Thanks.

Here is

  1. Plugin is not drawing the text anymore for either of the shaping engine
  2. shaper dropdown box overlaps the font size, with smaller window size. Perhaps, the second windows carries the same property as the first.
  3. PDF button is always greyed out.
  4. Draw button is redundant. If the text is drawn as its typed, it might save a click.
  5. Adding ability to list the Sile files in a working directory and view the list of files in the left hand side column. It will make the plugin very powerful.

image


#36

I fixed the first two and can’t replicate the third but I think it’s fixed? The problem was I released a version from the wrong directory. (xcodebuild and Xcode Build put things in different places, what fun.)

Hmm, maybe. But then you would be running the whole typesetting algorithm (macro expansion, paragraph builder, hyphenation, page builder) every time you hit a key. It would be very sluggish. And if you’re entering SILE commands, you’d get an error every time you were half-way through a command. So it would save a click but I think it would actually increase frustration.

This would involve major and complex rewriting and I’m not convinced it’s worth it. You can already save and load your SILE documents within Glyphs at the moment. If you’re using multiple SILE files as part of your font testing workflow (as I know the SIL people are doing) then you are better off doing that workflow outside of Glyphs, not inside it.


#37

Great. Shaper option is working now.

Also, window resizing issue is resolved.

If the master is selected, PDF is greyed out.
If the instances are selected, PDF button will be active.

image

In the preview window and PDF generated, there are some junk characters

image

These junks characters doesn’t bother me.

Also, since I know how to generate PDF with instances. This works for me.

But for other users, this could be a bothering, until they figure out the work around.

This is very powerful plugin for me.

Thanks a ton for making this work.


#38

Hello @SimonC

switching to Coretext shaper has to effect. It is using harfbuzz.

I have a known case, where the font displays different in the two shaping engine. But the SILE preview renders text per harfbuzz in both shapers.


#39

It does use Harfbuzz, but HarfBuzz itself interfaces to multiple shaping engines. One of them is CoreText, and one of them is its own internal engine. Choosing the CoreText option here should prioritise that shaper within Harfbuzz. It sounds like it isn’t doing that. I don’t have an example which shapes differently so it is hard for me to test. Contact me privately with the font and sample text and I will get it working.