CodeIgniter Forums

Full Version: arabic letters in watermark
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello every body
watermark library is very good
yet I could not make it write RTL

I change the font and kept an arabic font , used it
it write arabic but in revers 
like this
ARAB ==> BARA
Big Grin of course in arabic like this
أحمد ==> د م ح أ
see the attachment
I wrote
بسم الله الرحمن الرحيم

plz help me with a solution
(04-17-2017, 04:35 AM)InsiteFX Wrote: [ -> ]Let's Talk About RTL

Here's a better idea: Let's talk about the fact that there's no "watermark library" in CI.
(04-18-2017, 02:18 AM)Narf Wrote: [ -> ]
(04-17-2017, 04:35 AM)InsiteFX Wrote: [ -> ]Let's Talk About RTL

Here's a better idea: Let's talk about the fact that there's no "watermark library" in CI.

@Narf,

I thought that he was using an add-on third party library, sorry if I was mistaken.

In which case he was doing something wrong in it.
wow  Confused Confused Confused Confused Confused Confused Confused
am talking about image_lib library -->> watermark

PHP Code:
      $config['source_image'] = 'XXXX/xxxx.jpg';
      $config['wm_text'] = 'بسم الله الرحمن الرحيم';
      $config['wm_type'] = 'text';
      $config['wm_font_path'] = './system/fonts/vazir.ttf';
      $config['wm_font_size'] = '14';
      $config['wm_font_color'] = '000000';
      $config['wm_vrt_alignment'] = 'top';
      $config['wm_hor_alignment'] = 'center';
      $config['wm_padding'] = '10';
      $config['dynamic_output'] = true;

      $this->load->library('image_lib',$config); 
      $this
->image_lib->initialize($config);

      if ( ! $this->image_lib->watermark())
      {
              echo $this->image_lib->display_errors();
      
well .. thank you very much for nothing
I got the answer am searching for

I used this library and it workd as charm
http://www.ar-php.org/Glyphs-example-php-arabic.html

just like this



PHP Code:
      $config['source_image'] = /XXXXX/xxxx.jpg';
      $config['
wm_text'] = 'بسم الله الرحمن الرحيم';
      $this->load->library('
Arabic',array());
      $this->arabic->load('
Glyphs');
      $config['
wm_text'] = $this->arabic->utf8Glyphs($config['wm_text']);
      $config['
wm_type'] = 'text';
      $config['
wm_font_path'] = './application/fonts/vazir.ttf';
      $config['
wm_font_size'] = '14';
      $config['
wm_font_color'] = '000000';
      $config['
wm_vrt_alignment'] = 'top';
      $config['
wm_hor_alignment'] = 'center';
      $config['
wm_padding'] = '10';
      $config['
dynamic_output'] = true;

      $this->load->library('
image_lib',$config); 
      $this->image_lib->initialize($config);

      if ( ! $this->image_lib->watermark())
      {
              echo $this->image_lib->display_errors();
      } 
Maybe next time you will name the library by its right name...

We do not have a crystal ball.
(04-18-2017, 02:10 PM)InsiteFX Wrote: [ -> ]Maybe next time you will name the library by its right name...

We do not have a crystal ball.

wondering ... where dose the word "watermark" comes in the codeigniter framework other than images_lib ?
(04-18-2017, 02:28 PM)arabgenius Wrote: [ -> ]
(04-18-2017, 02:10 PM)InsiteFX Wrote: [ -> ]Maybe next time you will name the library by its right name...

We do not have a crystal ball.

wondering ... where dose the word "watermark" comes in the codeigniter framework other than images_lib ?

Don't blame others for not understanding what you didn't communicate clearly. Especially when you're asking for help - nobody owes you nothing, everybody around here contributes in their spare time.
(04-19-2017, 01:30 AM)Narf Wrote: [ -> ]
(04-18-2017, 02:28 PM)arabgenius Wrote: [ -> ]
(04-18-2017, 02:10 PM)InsiteFX Wrote: [ -> ]Maybe next time you will name the library by its right name...

We do not have a crystal ball.

wondering ... where dose the word "watermark" comes in the codeigniter framework other than images_lib ?

Don't blame others for not understanding what you didn't communicate clearly. Especially when you're asking for help - nobody owes you nothing, everybody around here contributes in their spare time.

I did not blame any body
and I did not say any one owes me 

but also I did not ask for a sarcasm from InsiteFX crystall ball
and once again .. maybe Iam new here and I dont know how to present my problem or name it properly.
Yet again .. watermark only came in images library , no other where. if he could not understand .. he should keep quite or ask for more details.
Pages: 1 2