update receipt and oqs font

This commit is contained in:
Aung Myo
2017-06-28 16:18:14 +06:30
parent ab7f08b1d6
commit 02f9245c7f
4 changed files with 10 additions and 20 deletions

View File

@@ -16,8 +16,9 @@ class OrderItemPdf < Prawn::Document
# super(:margin => [10, 5, 30, 5], :page_size => [200,400])
# font "public/fonts/#{font_name}".to_s + ".ttf".to_s
font "public/fonts/Zawgyi-One.ttf"
font "public/fonts/padauk.ttf"
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
#font "public/fonts/Chinese.ttf"
self.header_font_size = 12
self.item_font_size = 10
@@ -86,7 +87,8 @@ class OrderItemPdf < Prawn::Document
if alt_name
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "(#{order_item.alt_name})", :size => self.item_font_size,:align => :left
font "public/fonts/Chinese.ttf"
text "(#{order_item.alt_name})", :size => self.item_font_size,:align => :left, :inline_format => true
end
end

View File

@@ -29,7 +29,7 @@ class OrderSummaryPdf < Prawn::Document
# order items
if order_items == nil
order_items(order)
order_items(order, alt_name)
else
order_items(order_items, alt_name)
end
@@ -102,7 +102,8 @@ class OrderSummaryPdf < Prawn::Document
if alt_name
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "(#{odi.alt_name})", :size => self.item_font_size,:align => :left
font "public/fonts/Chinese.ttf"
text "(#{odi.alt_name})", :size => self.item_font_size,:align => :left
end
end
move_down 5

View File

@@ -194,10 +194,10 @@ class ReceiptBillPdf < Prawn::Document
y_position = cursor
move_down 5
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Grand Total", :size => self.header_font_size,:align => :left
text "Grand Total",:style => :bold, :size => self.header_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{sale_data.grand_total}" , :size => self.header_font_size,:align => :right
text "#{sale_data.grand_total}" , :style => :bold, :size => self.header_font_size,:align => :right
end
move_down 5