From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DB62047541 for ; Mon, 11 Sep 2023 14:48:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C7E2D68C928; Mon, 11 Sep 2023 17:48:29 +0300 (EEST) Received: from smtp.tiscali.it (santino-notr.mail.tiscali.it [213.205.33.215]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7ECF668C772 for ; Mon, 11 Sep 2023 17:48:22 +0300 (EEST) Received: from [192.168.20.100] ([95.243.137.154]) by santino.mail.tiscali.it with id keoH2A01S3L3PKz01eoJft; Mon, 11 Sep 2023 14:48:21 +0000 X-Spam-Final-Verdict: clean X-Spam-State: 0 X-Spam-Score: 0 X-Spam-Verdict: clean x-auth-user: klimklim@tiscali.it Content-Type: multipart/mixed; boundary="------------uH6Zt5C6a7VYldct5B0XGO0B" Message-ID: <7fc3d15e-ab08-8e7b-cd68-2308e548906d@tiscali.it> Date: Mon, 11 Sep 2023 16:48:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 References: Content-Language: it To: ffmpeg-devel From: Francesco Carusi In-Reply-To: X-Forwarded-Message-Id: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tiscali.it; s=smtp; t=1694443701; bh=9tIRt1O9xKgf7owWNvumK10hsJB7xdSBPBvKrUNBLCg=; h=Date:Subject:References:To:From:In-Reply-To; b=pVOeTY9aEbwuu/VaYg8WYUAsVVLd9fy4bR/NLsCuVS4GB21giwOn3YgJkLHpvXSav QeOFM+SizXxMEHZr5HHLHXKmoFS21fMItKpZL3plj4QPs3PRIV6BJWjINxMOvH2QRO 8iRQkOsCFcoPh9sKP+7GgBaB5V2//esoNL3L85b0= Subject: [FFmpeg-devel] fix for defect #10531 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This is a multi-part message in MIME format. --------------uH6Zt5C6a7VYldct5B0XGO0B Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I attached a patch for defect [ #10531: vf_drawtext causing font rendering jitter after libharfbuz commit. ] Before the patch the width of a text line was measured up to the rightmost visible pixel of the last character. Pros: the right padding specified with the boxborderw parameter is exact with respect to the visible text Cons: the width of a text line depends on the last character, even with monospaced fonts After the patch the width of the last character is set equal to the width specified in the font file, which may include some empty space. Pros: when using monospaced fonts the width of a line depends only on the number of characters, this is also the standard behavior adopted by other rendering strategies, e.g. in browsers Cons: the user specified right padding may not be equal to the distance between the background box right border and the rightmost visible pixel of the text. --------------uH6Zt5C6a7VYldct5B0XGO0B Content-Type: text/plain; charset=UTF-8; name="0001-text-width-measurement-fixed.patch" Content-Disposition: attachment; filename="0001-text-width-measurement-fixed.patch" Content-Transfer-Encoding: base64 RnJvbSA2MmNjZjNmYzI3ZjJhN2RmN2I3OWE2MjQxYWFlMmU4ZDdmZDgwNThkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiB5ZXRoaWUgPGtsaW1rbGltQHRpc2NhbGkuaXQ+CkRh dGU6IFRodSwgNyBTZXAgMjAyMyAxODozOToyNSArMDIwMApTdWJqZWN0OiBbUEFUQ0ggMS8x XSB0ZXh0IHdpZHRoIG1lYXN1cmVtZW50IGZpeGVkCgotLS0KIGxpYmF2ZmlsdGVyL3ZmX2Ry YXd0ZXh0LmMgfCAxNCArKysrKysrKysrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDExIGluc2Vy dGlvbnMoKyksIDMgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGliYXZmaWx0ZXIvdmZf ZHJhd3RleHQuYyBiL2xpYmF2ZmlsdGVyL3ZmX2RyYXd0ZXh0LmMKaW5kZXggZWM4ZDIxNTc5 NS4uOWU1ZjAxM2MwOSAxMDA2NDQKLS0tIGEvbGliYXZmaWx0ZXIvdmZfZHJhd3RleHQuYwor KysgYi9saWJhdmZpbHRlci92Zl9kcmF3dGV4dC5jCkBAIC0xNzU3LDkgKzE3NTcsMTcgQEAg Y29udGludWVfb25fZmFpbGVkMjoKICAgICAgICAgICAgICAgICAgICAgZmlyc3RfbWluX3g2 NCA9IEZGTUlOKGdseXBoLT5iYm94LnhNaW4sIGZpcnN0X21pbl94NjQpOwogICAgICAgICAg ICAgICAgIH0KICAgICAgICAgICAgICAgICBpZiAodCA9PSBoYi0+Z2x5cGhfY291bnQgLSAx KSB7Ci0gICAgICAgICAgICAgICAgICAgIHc2NCArPSBnbHlwaC0+YmJveC54TWF4OwotICAg ICAgICAgICAgICAgICAgICBsYXN0X21heF94NjQgPSBGRk1BWChnbHlwaC0+YmJveC54TWF4 LCBsYXN0X21heF94NjQpOwotICAgICAgICAgICAgICAgICAgICBjdXJfbGluZS0+b2Zmc2V0 X3JpZ2h0NjQgPSBnbHlwaC0+YmJveC54TWF4OworICAgICAgICAgICAgICAgICAgICAvLyBU aGUgZm9sbG93aW5nIGNvZGUgbWVhc3VyZXMgdGhlIHdpZHRoIG9mIHRoZSBsaW5lIHVwIHRv IHRoZSBsYXN0CisgICAgICAgICAgICAgICAgICAgIC8vIGNoYXJhY3RlcidzIGhvcml6b250 YWwgYWR2YW5jZQorICAgICAgICAgICAgICAgICAgICBpbnQgbGFzdF9jaGFyX3dpZHRoID0g aGItPmdseXBoX3Bvc1t0XS54X2FkdmFuY2U7CisKKyAgICAgICAgICAgICAgICAgICAgLy8g VGhlIGZvbGxvd2luZyBjb2RlIG1lYXN1cmVzIHRoZSB3aWR0aCBvZiB0aGUgbGluZSB1cCB0 byB0aGUgcmlnaHRtb3N0CisgICAgICAgICAgICAgICAgICAgIC8vIHZpc2libGUgcGl4ZWwg b2YgdGhlIGxhc3QgY2hhcmFjdGVyCisgICAgICAgICAgICAgICAgICAgIC8vIGludCBsYXN0 X2NoYXJfd2lkdGggPSBnbHlwaC0+YmJveC54TWF4OworICAgICAgICAgICAgICAgICAgICAK KyAgICAgICAgICAgICAgICAgICAgdzY0ICs9IGxhc3RfY2hhcl93aWR0aDsKKyAgICAgICAg ICAgICAgICAgICAgbGFzdF9tYXhfeDY0ID0gRkZNQVgobGFzdF9jaGFyX3dpZHRoLCBsYXN0 X21heF94NjQpOworICAgICAgICAgICAgICAgICAgICBjdXJfbGluZS0+b2Zmc2V0X3JpZ2h0 NjQgPSBsYXN0X2NoYXJfd2lkdGg7CiAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAg ICAgICAgICAgICAgICAgaWYgKGlzX3RhYikgewogICAgICAgICAgICAgICAgICAgICAgICAg aW50IHNpemUgPSBzLT5ibGFua19hZHZhbmNlNjQgKiBzLT50YWJzaXplOwotLSAKMi4zMC4y Cgo= --------------uH6Zt5C6a7VYldct5B0XGO0B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --------------uH6Zt5C6a7VYldct5B0XGO0B--