Code Duplication    Length = 12-12 lines in 2 locations

lib/Cpdf.php 2 locations

@@ 4298-4309 (lines=12) @@
4295
                    $char = $current_font['differences'][$char];
4296
                }
4297
4298
                if (isset($current_font['C'][$char])) {
4299
                    $char_width = $current_font['C'][$char];
4300
4301
                    // add the character width
4302
                    $w += $char_width;
4303
4304
                    // add additional padding for space
4305
                    if (isset($current_font['codeToName'][$char]) && $current_font['codeToName'][$char] === 'space') {  // Space
4306
                        $w += $word_spacing * $space_scale;
4307
                        $n_spaces++;
4308
                    }
4309
                }
4310
            }
4311
4312
            // add additional char spacing
@@ 4334-4345 (lines=12) @@
4331
                    $char = $current_font['differences'][$char];
4332
                }
4333
4334
                if (isset($current_font['C'][$char])) {
4335
                    $char_width = $current_font['C'][$char];
4336
4337
                    // add the character width
4338
                    $w += $char_width;
4339
4340
                    // add additional padding for space
4341
                    if (isset($current_font['codeToName'][$char]) && $current_font['codeToName'][$char] === 'space') {  // Space
4342
                        $w += $word_spacing * $space_scale;
4343
                        $n_spaces++;
4344
                    }
4345
                }
4346
            }
4347
4348
            // add additional char spacing