Giter Club home page Giter Club logo

Comments (10)

ftake avatar ftake commented on August 22, 2024

I think an important issue is that Scribus does not support embedding (subsets of) Japanese fonts. I guess it also does not Chinese ones.

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

@ftake, yes, the plan is to have CJK support as well. I don't know which library is related to that. I'm still waiting on @andreas-vox to help me organize this issue so I will offer guidance to developers

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

@ftake a forum post pointed me to this: https://sites.google.com/a/borndigital.jp/scribus/scribus-en
looks like a patch to support Top to Bottom text for Scribus 1.4

from scribusctl.

ftake avatar ftake commented on August 22, 2024

Thanks, there seems to be many things to do. I have to know the inside of cairo to port this feature into Scribus.

By the way, the problem (and the patch above) is not related to top to bottom layout (aka. vertical writing). That is also an interesting (but heavy) challenge.

from scribusctl.

andreas-vox avatar andreas-vox commented on August 22, 2024

Ok, here's some elaboration on steps 1 and 2:

The old Scribus way to store text is a long list of characters for each story (represented as C++ class StoryText):

1: unicode char | charstyle | glyphlayout | more glyphlayouts if necessary ...
2: unicode char | charstyle | glyphlayout | more glyphlayouts if necessary ...
3: unicode char | charstyle | glyphlayout | more glyphlayouts if necessary ...
4: unicode char | charstyle | glyphlayout | more glyphlayouts if necessary ...
5: unicode char | charstyle | glyphlayout | more glyphlayouts if necessary ...
...
Each line is represented by the soon-to-be-obsolete class ScText (this is the result type of nearly-obsolete method StoryText::item(int pos) ).
Class GlyphLayout contains a glyph ID and relative positioning/scaling for this glyph.

This design has several drawbacks:

  • there's a 1:n relation from unicode characters to glyphs, i.e. each glyph needs a unicode char
  • the order of glyphs is tied to the logical order of characters
  • charstyle information is repeated for each character (not critical to CTL but bad design)
  • no hierarchical structure of blocks and paragraphs

So the new way I'm aiming at looks like this:

  • class StoryText stores only the unicode, charstyle and special items like paragraph separators, inline objects and footnotes
  • a new class TextLayout stores the glyphs, their relations to the unicode text and their visual positioning
  • the visual positioning is represented by a tree of boxes, which come in several flavors: class GlyphBox for a sequence of glyphs which all have the same font and formatting, class LineBox for a sequence of glyphboxes, class BlockBox for a sequence of lineboxes, class InlineBox for embedded pageitems and other boxes for more fancy layout (if you know TeX you'll get the picture)
  • class TextLayout will also provide all methods for cursor positioning (next line, end of column, selection, screen coordinate to StoryText position mapping, ...)
  • Boxes will have a method render(ScPainterEx* painter)
  • The interface ScPainterEx will have a method drawGlyphs(const GlyphBox& glyphrun)
  • PS and PDF export will be implementations of the ScPainterEx interface.

The last three points require some heavy lifting with the ScPainterEx interface, so for now I'll concentrate on the text part with the class GlyphRun which will be what's passed to PS and PDF export instead of the old ScText structure.

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

@andreas-vox thanks for the elaborations. I've updated the top comment of this thread.

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

Discussion ongoing in "ScribusCTL" threads:
http://lists.scribus.net/pipermail/scribus-dev/2015-November/thread.html#start
http://lists.scribus.net/pipermail/scribus-dev/2015-December/thread.html#start

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

@dawoodalbadi would you be so kind to help me understand where we're at in regards to milestones reached with the ScribusCTL so far? Thanks!

from scribusctl.

dawoodalbadi avatar dawoodalbadi commented on August 22, 2024

from scribusctl.

luzpaz avatar luzpaz commented on August 22, 2024

@dawoodalbadi do you mind checking off (or even modifying by adding/removing subtasks) from Step 1 & 2 (AKA Phase 1 & 2) from #3 (comment)

from scribusctl.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.