Skip to content

Commit

Permalink
set shaping direction from left to right
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Jan 22, 2024
1 parent 692954f commit 69230ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/PDF/Font/Loader/Enc/Identity16.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use PDF::Font::Loader::Enc;
class PDF::Font::Loader::Enc::Identity16
is PDF::Font::Loader::Enc {

use PDF::Content::Font::Encoder;
also does PDF::Content::Font::Encoder;
use PDF::Content::Font::Encoder;
also does PDF::Content::Font::Encoder;

use Font::FreeType::Face;
use Font::FreeType::Raw;
Expand Down
3 changes: 2 additions & 1 deletion lib/PDF/Font/Loader/FontObj.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use Font::FreeType;
use HarfBuzz::Feature;
use HarfBuzz::Font;
use HarfBuzz::Font::FreeType;
use HarfBuzz::Raw::Defs :hb-direction;
use HarfBuzz::Glyph;
use HarfBuzz::Shaper;
use NativeCall;
Expand Down Expand Up @@ -495,7 +496,7 @@ method !harfbuzz-font {
multi method shape(Str $text where $!face.font-format ~~ 'TrueType'|'OpenType') {
my HarfBuzz::Font $font = self!harfbuzz-font;
my HarfBuzz::Shaper $shaper .= new: :buf{ :$text }, :$font;
my HarfBuzz::Shaper $shaper .= new: :buf{ :$text, :direction(HB_DIRECTION_LTR) }, :$font;
my uint32 @ords = $text.ords;
my @shaped;
my uint16 @cids;
Expand Down

0 comments on commit 69230ba

Please sign in to comment.